damienvanrobaeys / Run-in-Sandbox

Run PS1, VBS, CMD, EXE, MSI, Intunewin, MSIX, or extract ISO, ZIP in Windows Sandbox very quickly just from a right-click
https://www.systanddeploy.com/2023/06/runinsandbox-quick-way-to-runextract.html
740 stars 83 forks source link

Wrong desktop directory #1

Closed TheSoulrester closed 4 years ago

TheSoulrester commented 4 years ago

Hey, how is it possible to change the direcotry of the desktop?

my default desktop directory is located at the drive letter f explorer_rr9yDgHP8i

but every sandbox file will be created at drive letter c under users explorer_mgpIJ0JGvn

damienvanrobaeys commented 4 years ago

Hello, indeed this is a case I thought it wouldn't appear lol. So your desktop is redirected to F:\dektop right ?

I will check that and keep you informed.

TheSoulrester commented 4 years ago

yes, my desktop is located at F:\MyName\desktop ;)

it was also changed due to the windows feature like it is mentioned here: https://windowsreport.com/change-download-location-windows-8-windows-10/

thank you ;)

damienvanrobaeys commented 4 years ago

I will add an entry in xml Sandbox_Config.xml to allow user to add where to save the wsb file. Would it be ok for you?

TheSoulrester commented 4 years ago

That would be awesome <3 thanks ;)

damienvanrobaeys commented 4 years ago

ok, will proceed like that and keep you informed. Thx for the feedback :-)

damienvanrobaeys commented 4 years ago

I updated the Sandbox_Config.xml and RunInSandbox.ps1 In the XML I added a node Default

Could you please keep me informed if that works for you ?

TheSoulrester commented 4 years ago

Thank you 4 ur fast support.

4 now, it isn't working as expected.

i changed the "default" to my dir path

F:\MyName\Desktop

also also tried out with double quotes

"F:\MyName\Desktop"

but both didn't work :)

damienvanrobaeys commented 4 years ago

Have you replaced files Sandbox_Config.xml and RunInSandbox.ps1 from programdata with the new one ?

TheSoulrester commented 4 years ago

first i run Remove_Structure.ps1

after that, i was running Add_Structure.ps1 again ;)

TheSoulrester commented 4 years ago

oh, i see. you only made changes in RunInSandbox.ps1

Edit: never mind, Add_Structure.ps1 will create RunInSandbox.ps1 in program files. so it should work as expected, but it does not

damienvanrobaeys commented 4 years ago

Yes i changed RunInSandbox.ps1 and xml file. I also use remove structure then add again. I configured the WSG_Location to c:\test. If I run the context menu for istance from an EXE the wsb file is correctly created in c:\test.

TheSoulrester commented 4 years ago

explorer_S8Mc9Uawpr explorer_ZWRbI5DG4J notepad++_suGRyDegES

hm, now i tried out another folder on c: but this also didnt work

maybe, Remove_Structure.ps1 does not remove necessary files?

what do i have to remove manually?

damienvanrobaeys commented 4 years ago

Could you please check the C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1 ? You should have image

TheSoulrester commented 4 years ago

hm, ok this folder is not available, so it has been completly removed

damienvanrobaeys commented 4 years ago

Have you tested again after add_structure.ps1 ?

TheSoulrester commented 4 years ago

notepad++_dpGH5Fsamb

It seems that while using add_structure.ps1 a wrong RunInSandbox.ps1 will be copied to C:\ProgramData\Run_in_Sandbox because your if condition mentioned above is not available in C:\ProgramData\Run_in_Sandbox\RunInSandbox.ps1

damienvanrobaeys commented 4 years ago

Ohhhh my bad i uploaded the runinsandbox.ps1 at the root instead of the Run_in_sandbox folder

damienvanrobaeys commented 4 years ago

I tested after download once again the zip and now that works. Before I had the same issue than you. It was because I uploaded the main ps1 at the wrong place.

TheSoulrester commented 4 years ago

thank you ;)

everything seems fine now :)

damienvanrobaeys commented 4 years ago

Good news 😁 Thanks for the feedback

damienvanrobaeys commented 4 years ago

Fyi I just added a new functionnality that allows you to extract ZIP file directly in a sandbox

TheSoulrester commented 4 years ago

awesome! thank you ;)