Closed anl-do closed 2 years ago
Hi,
I haven't tested w11 yet. Have you already tested runinsandbox on it ?
I have upgraded my PC from 10 to 11. RiS was installed perviously and working fine. After the udate, the context menues are not visible anymore. However, the sandbox is still enabled in Win11. When I run "Add_Structure.ps1" in Win11, the powershell is stuck.
The log file says: [10.06.21 14:46:42] - INFO : Starting the configuration of RunInSandbox [10.06.21 14:46:42] - INFO : The script has been launched with admin rights [10.06.21 14:46:43] - INFO : The sources folder exists
[10.06.21 14:46:43] - SUCCESS : Sources have been copied in C:\ProgramData\Run_in_Sandbox [10.06.21 14:46:43] - SUCCESS : Sources files have been unblocked [10.06.21 14:46:43] - INFO : Mapping registry HKCR [10.06.21 14:46:43] - SUCCESS : Mapping registry HKCR [10.06.21 14:46:43] - INFO : Exporting registry path: exefile
Even after minutes, there is no further progress. I'm not a powershell expert. How can I debug? I can't see what exactly the script is trying to do when there is no progress. Sorry, I'm no real help :-(
No worries :-) Could you please check below registry key ? Is there Run PS1 in Sandbox ? HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell
The hive is completely empty.
Which version did you test meaning when have you downloaded ris ?
I have downloaded the latest package this morning. The timestamps of the files are these:
The package that was previously installed in Win 10, I have still in my downloads. It was this timestamp:
I have not tried the "old" package yet. What do you think? Shall I try?
nope, i will install a W11 tonight and try it. I will send you a version tomorrow
That sounds awesome! I really love it and cannot work without ris 😊. If you need anything from me, just let me know. I wished I was a powershell wizard like you...and David Segura and Nickolaj Andersen and and and... THANKS A LOT
You're welcome, thx for the kind words, really appreciate. Could you please test this version by running Add_Structure_test.ps1 ? https://github.com/damienvanrobaeys/RunInSandbix_Dev
Hi Damien, I have tried the DEV version. This one installs without issues.
Not all context menus work like expected:
Hopefully, my tests will help you at least a little. I'm here for more tests. Use me like your labourer 😂. As far as I'm concerned, this is now all I need for most of my usecases. On the other hand, I'm very interested in the code itself and which sections you edit. Maybe I can improve my skills a little...
Thanks for the nice feedback. I just noticed the behavior for ps1 this morning. I will work on that
Could you plz send me a mail at damien.vanrobaeys@gmail.com ?
Have you received my email?
Yep thanks
I really appreciate that you are working on this problem @damienvanrobaeys Thanks!
Have you received my email?
Actually i didn't receive it, it was the notification mail from github lol
Hi Damien, I have tried the DEV version. This one installs without issues.
Not all context menus work like expected:
- the .PS1 context menu does not appear at all
- the .intunewin part redirects all files and folders, where the selected intunewin file is located, to the sandbox
- the command for the intunewin file is not executed in the sandbox (I have no screenshot for that)
- the MSI works fine
- the "extract the ZIP in sandbox" produces an error
- the Regkey part works as expected
- the VBS part also works as expected
Hopefully, my tests will help you at least a little. I'm here for more tests. Use me like your labourer 😂. As far as I'm concerned, this is now all I need for most of my usecases. On the other hand, I'm very interested in the code itself and which sections you edit. Maybe I can improve my skills a little...
Regarding the zip and intunexi part what was the full path of those files ?
I have kicked the ZIP file of a synced Teams folder, when the error occured. C:\Users\AndreasLandry\Blablabla Group\Rollout Locations- MEM Intune - (IFUSA) Blablabla LLC - All locations - (IFUSA) Blablabla LLC - All locations\Apps\Packages
Hearing you asking the question, I have now tried a simple ZIP-file from drive D:\ (USB Disk). That works properly. Path length?
The intunewin files, I have tested with, are also directly on drive D:\ RiS seems to present everything in the root of Drive D in the sandbox.
I'm trying the Dev version now also, I wanted to demo something to a customer and then realized myself.. What if it doesn't work anymore in Windows 11??! :( And it didn't, it did place the intune directory on the desktop though and I could explain the process of testing packages that way but I need this to work again :)
And yes, install.intunewin package works! But..
Run PS1, VBS, EXE, MSI in the Sandbox - Does't work / Not in menu Extract ZIP directly in the Sandbox - Works Share a specific folder in the Sandbox - Works
On my W11 VM EXE, VBS, MSI, ZIP, intunewin work. Have you go into more options as it's something new in Windows 11 (a light context menu). For PowerShell this is a bug I think in W11, I already created a feedback hub.
The intunewin part didn't work for you ?
Don't see the option in the sub-context menu, I did a remove and Add_Structure_test.ps1 again and still the same, intunewin does work and also ZIp extract and share folder. Only run ps1, vb1, exe, msi doesn't because the option is not here
Could you please try with the prod version and not dev ? You need to do a remove structure first.
Ok, did a remove and used the prod version again. And everything works except .ps1 and .cmd files, vbs/msi/exe do work. Intunewin package, zip, share also work
Cooooool Thanks Yes for ps1 this is a w11 bug i think. I will try to solve that by myself or wait for MS
PS1 and cmd in W11? Hope you can solve it or that MS can shine some light :)
Yep see my tweet below
https://twitter.com/syst_and_deploy/status/1447473525586022406?t=AyYY-oxHxDGEpDZBL2RdiA&s=19
I found something interesting. I am now able to create a conext menu for PS1. I will update the runinsandox on Tuesday and will add also some new features:
Yes! Works, context-menu is there for everything.. Except.. For PS1 files, it gave me the error in the screenshot. I did a remove_structure before using the new version, did a remove_structure in the new version just to be sure afterwards and added it again with add_structure. No difference
What do you have in this key ?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes.ps1]
[HKEY_CURRENT_USER\Software\Classes.ps1\OpenWithProgids] "VSCode.ps1"="" "AppXxf01pj590w7z9mxmyv3nx0a9ewj3e51g"=hex(0):
no rOpenWithProgids ?
Correct, this is the complete export from [HKEY_CURRENT_USER\Software\Classes.ps1]
ok, i will update the add_structure.ps1 in few minutes and will inform you when you can test
Thank you!
Could you please download again sources and try again ?
Still the same, value $Get_rOpenWithProgids_Default_Value is not set because (Get-Item "$Default_PS1_HKCU\rOpenWithProgids").Property fails. I don't have the rOpwnWithProgids value and it's not created by the script itself. Perhaps a detect and create if not exist?
and if you check in the registry for OpenWithProgids ?
and if you go in the classes\vscode.ps1\shell ?
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\VSCode.ps1] @="PowerShell Source File" "AppUserModelID"="Microsoft.VisualStudioCode"
[HKEY_CURRENT_USER\Software\Classes\VSCode.ps1\DefaultIcon] @="C:\Users\HarmV\AppData\Local\Programs\Microsoft VS Code\resources\app\resources\win32\powershell.ico"
[HKEY_CURRENT_USER\Software\Classes\VSCode.ps1\shell]
[HKEY_CURRENT_USER\Software\Classes\VSCode.ps1\shell\open] "Icon"="\"C:\Users\HarmV\AppData\Local\Programs\Microsoft VS Code\Code.exe\""
[HKEY_CURRENT_USER\Software\Classes\VSCode.ps1\shell\open\command] @="\"C:\Users\HarmV\AppData\Local\Programs\Microsoft VS Code\Code.exe\" \"%1\""
ok i think i found why, you have another dword that i don't have
Ok, my laptop is pretty standard I guess using Powershell 5 and 7 in conjunction with VScode ;)
could you please do a remove_structure, download again and try again ?
It works!
yihaaa, thanks for the feedback, that was really interesting
No problem, glad to help and your tool is very usefull!
Damiehen :-)? I'm not sure, but the context menus in Win10 and Win11 are configured in different places, right? Will there be two RiS versions for 10 and 11 or will you create a super duper operating system recognition into the script to have it all in one?
You're right I am checking if device is w10 or 11 and then check location but it seems for some other reason some context menu may not work on some w11. Do you have some issues ?
I have not yet tested all. If you agree, I'd close this "issue" here and open a new one as soon as I see something. Regarding the very first question in this issue, we can consider it solved. Thank you for your great efforts!!!! I can not repeat often enough.
😢 When will RiS run on Windows 11? I can't live without it anymore.
best regards Andreas