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
763 stars 86 forks source link

Context menu for some extensions is missing #18

Closed akuropka closed 1 year ago

akuropka commented 3 years ago

Windows 22000.346

I downloaded the whole set as ZIP (Run-in-Sandbox-master) and extracted it. Afterwards I ran the .\Add_Structure.ps1 which completed without error (running it again without prior remove produces ResourceExists-errors).

The context menu for EXE is there and seems to work. But others are not available... how to track the issue down?

Thank you! (-:

20211116_160939_explorer 20211116_160735_explorer 20211116_160641_explorer 20211116_160825_explorer 20211116_160700_explorer

RunInSandbox_Install.log

damienvanrobaeys commented 3 years ago

what is the third extention ? .SVG right ? You're on Windows 11 ?

akuropka commented 3 years ago

Yes, it's Windows 11. I added the install log (Restore point was not created due to one already created recently).

I tried EXE, ISO, ZIP and PS1 (just took any files for testing).

damienvanrobaeys commented 3 years ago

ok because i don't see picture for iso i thought you tried on svg file. Could you please check below locations: HKCR\Windows.IsoFile\Shell HKCU.iso HKCR\CompressedFolder\Shell HKCR\WinRAR.ZIP\Shell HKCR.7z HKCU.ps1

akuropka commented 3 years ago

HKCR\Windows.IsoFile\Shell 1.txt

HKCR\.iso 2.txt

HKCR\CompressedFolder\Shell 3.txt

HKCR\WinRAR.ZIP\Shell does not exist

HKCR\.7z 4.txt

HKCR\.ps1 does not exist

damienvanrobaeys commented 3 years ago

Actually it was hkcu for .iso and. Ps1

akuropka commented 3 years ago

I was wondering about that but there's nothing like HKCU\.. Screenshot: 20211116_171931_regedit

damienvanrobaeys commented 3 years ago

Hkcu > software > classes

akuropka commented 3 years ago

Ah... HKCU\Software\Classes\.iso and HKCU\Software\Classes\.ps1 do not exist.

damienvanrobaeys commented 3 years ago

Regarding the iso part have you installed a tool for iso like CDBurnerXP ?

akuropka commented 3 years ago

Yes, CDBurnerXP is installed.

damienvanrobaeys commented 3 years ago

Ok I thik that's why when you install some soft it may change the way to integrate context menu. I will proceed step by step, first with ISO. I will update the add_structure and remove_structure in few minutes. I will inform you

akuropka commented 3 years ago

top, thx!

damienvanrobaeys commented 3 years ago

To be sure could you please check if there is something like as below ? HKCR\iso-file OR HKCR\CDBurnerXP

akuropka commented 3 years ago

Yes, HKCR\iso-file exists: 5.txt

damienvanrobaeys commented 3 years ago

Could you please create a key like "hey hey" in HKCR\iso-file\shell ? not a string just a key Then do a right-click on an iso, you should see hey hey

akuropka commented 3 years ago

Yes, it works. 20211116_205304_regedit 20211116_205100_explorer

damienvanrobaeys commented 3 years ago

cool i will update files

damienvanrobaeys commented 3 years ago

just updated sources.

You can test as below: Do a remove-structure.ps1 Download new zip Run add_structure.ps1

akuropka commented 3 years ago

Thank you for your efforts.

Unfortunately it did not work. The logfile did just contain eleven empty lines but there was a console output this time:

[11.17.21 01:42:09] - INFO : Context menus for PS1 have been added [11.17.21 01:42:11] - INFO : Context menus for REG have been added [11.17.21 01:42:13] - INFO : Context menu for ISO has been added [11.17.21 01:42:13] - INFO : Checking content of HKCR.ISO [11.17.21 01:42:13] - INFO : The key HKCR.ISO exists [11.17.21 01:42:13] - INFO : Following subkeys found: (default) Content Type [11.17.21 01:42:13] - INFO : Following property found: iso-file [11.17.21 01:42:13] - INFO : Reg path to test: \iso-file [11.17.21 01:42:13] - INFO : The following reg path does not exist: \iso-file [11.17.21 01:42:13] - INFO : Following property found: CDBurnerXP/iso [11.17.21 01:42:13] - INFO : Reg path to test: \CDBurnerXP/iso [11.17.21 01:42:13] - INFO : The following reg path does not exist: \CDBurnerXP/iso [11.17.21 01:42:15] - INFO : Context menu for PPKG has been added [11.17.21 01:42:26] - INFO : Context menu for PS1 has been added [11.17.21 01:42:26] - INFO : Context menus for VBS have been added [11.17.21 01:42:26] - INFO : Context menus for EXE have been added [11.17.21 01:42:26] - INFO : Context menu for MSI has been added [11.17.21 01:42:26] - INFO : Context menu for ZIP has been added [11.17.21 01:42:30] - INFO : Context menu for 7Z has been added [11.17.21 01:42:33] - INFO : Context menu for MSIX has been added [11.17.21 01:42:33] - INFO : Context menu for ISO has been added [11.17.21 01:42:33] - INFO : Context menus for folder have been added

damienvanrobaeys commented 3 years ago

oops seems a bad copy paste in my scripts will change this

damienvanrobaeys commented 3 years ago

I just updated the add_structure.ps1 could you please try again ?

akuropka commented 3 years ago

Works great for ISO... 👍😀

damienvanrobaeys commented 3 years ago

yeah, now it's not working for PS1, ZIP ? Have you tried msi too ?

akuropka commented 3 years ago

I was just going through the known extensions:

damienvanrobaeys commented 3 years ago

Could you please check below locations ? HKCU\software\classes.ps1 HKCU\software\classes\AppXxf01pj590w7z9mxmyv3nx0a9ewj3e51g HKCR\FirefoxHTML HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.ps1\UserChoice HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.html\UserChoice HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.zip

akuropka commented 3 years ago

HKCU\software\classes\.ps1HKCU\software\classes\AppXxf01pj590w7z9mxmyv3nx0a9ewj3e51g ❌, while some other AppX are there HKCR\FirefoxHTML ❌, but: HKCR\FirefoxHTML-BA1BED273568656F HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ps1\UserChoiceHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoiceHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.zip

damienvanrobaeys commented 3 years ago

For those one below could you please send me a txt file as before ? HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.ps1\UserChoice HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.html\UserChoice HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.zip HKCR.ps1

akuropka commented 3 years ago

Sorry... of course: FileExts.txt

HKCR\.ps1 does not exist

damienvanrobaeys commented 3 years ago

Thanks Could you please check below location: HKCU\software\classes\Applications\powershell_ise.exe

damienvanrobaeys commented 3 years ago

Ok, I think I found why for PS1 and HTML. I will update files soon

akuropka commented 3 years ago

HKCU\software\classes\Applications\powershell_ise.exe: powershell_ise.txt

damienvanrobaeys commented 3 years ago

Just updated files. Could you please test again for PS1 and HTML ?

akuropka commented 3 years ago

Looks both great! 👍😀

damienvanrobaeys commented 3 years ago

cool :-) Now regarding ZIP, do you have below locations ? HKCU\software\classes\7-Zip.zip HKCR\7-Zip.zip

akuropka commented 3 years ago

Yes... 7-Zip.zip.txt

damienvanrobaeys commented 3 years ago

ok will work on it. thanks

akuropka commented 3 years ago

Great, thank you again.

damienvanrobaeys commented 3 years ago

and if you create a new key like toto in HKCR\7-Zip.zip\shell do you see it when you do a right-click on a zip file ?

akuropka commented 3 years ago

Yes! 20211122_170936

Btw your script is installing 7-Zip (for own purposes) as well. Maybe it makes sense to check if 7z is already installed and skip copying and using the own one in this case.

damienvanrobaeys commented 3 years ago

Actually it doesn't install 7zip just copy required file for extracting iso but nothing is installed on the device

akuropka commented 3 years ago

Yeah, "installing" by copying to ProgramData and using ist. Just noticed...

damienvanrobaeys commented 3 years ago

Just updated sources files. Could you please try again for zip ?

akuropka commented 3 years ago

It works... great! 😀👍

Btw I noticed if you extract an iso in the sandbox there's no progress bar. Depending on the size of the iso or the infrastructure used it may take a while until everything is ready.

Another idea coming into my mind was not to extract an iso but to mount it. This should be sufficient since there's no persistent storage anyway.

damienvanrobaeys commented 3 years ago

You're right i will add a msgbox when iso is flully extracted. Yep, actually the second case is in my plan, thanks for the suggestion. Thanks for your feedback :-)

akuropka commented 3 years ago

Btw do you have any ☕/🍺 box?

damienvanrobaeys commented 3 years ago

You mean something like pay me a coffee on my blog ?

akuropka commented 3 years ago

Exactly, but didn’t find anything.

akuropka commented 3 years ago

Maybe something like Custom Context Menu would make things easier... (however, it's for Windows 11 only)

Joly0 commented 2 years ago

Hey, i have the same (or a similar) issue. Neither HKCU\Software\Classes.ps1 nor HKCU\Software\Classes.iso are there and the context menu option for powershell is missing. I havent tested any other except the app bundle template and exe files, which indeed have the context menu option. As a side note, i am running windows 10, not windows 11 and the log was overall positive, except the restore point, which couldnt be created (though this isnt an issue)

Edit: Intunewin has the option aswell

Joly0 commented 2 years ago

.cmd context menu option is missing aswell, .svg works