Problem with Windows 10 starting PowerShell Studio.exe instead of PowerShell.exe

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
FrankAndrew
Posts: 164
Last visit: Sat Apr 01, 2023 1:52 am

Problem with Windows 10 starting PowerShell Studio.exe instead of PowerShell.exe

Post by FrankAndrew »

Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.219
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19044.0

Hi,
I am having a problem on machines where I have "PowerShell Studio.exe" installed and I have to test scripts written for a Window Program installation software called "Desktop & Server Management" or DSM, for short, from Ivanti.

When I use a function in their script called CallScript() it checks with Windows to see which application should be used to run it.
When I have "PowerShell Studio.exe" installed you guys set all kinds of values so that Windows will start it when someone double clicks on a PS1 file in the Windows File Explorer.

That is not a usage that I usually use to edit a PowerShell script file.
I now need a small utility from you guys that will let me remove ALL of the entries in Windows so that when any other software asks the Windows system which EXE should be used that it does NOT call "PowerShell Studio.exe"

I can understand that there may well be lots of your users that think this is a good thing, to start PSS (SPS), so that is why I would like a small tools to "reset" those values.

I have already set in the Windows File Explorer "Start with" to primarily use the normal PowerShell.exe but that is NOT effecting the DSM software so I assume that there are other places where this information is stored.

I will try to get out of the Ivanti company exactly where they are getting that information from and will update this post as soon as I have it.

Thanks for your help, I hope we can find a solution without having to de-install "PowerShell Studio.exe" :-)
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Problem with Windows 10 starting PowerShell Studio.exe instead of PowerShell.exe

Post by Alexander Riedel »

"all kinds of values" is a little bit of an exaggeration :D
HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1
is where the open verb is associated with PowerShell Studio.
If you look in HKEY_CLASSES_ROOT for .ps1, it has a default value of "Microsoft.PowerShellScript.1" which brings you to the entry I mentioned.
Almost all software uses these associations one way or another, they are usually not that hard to figure out. Stuff may break when you mess with entries, so a backup or export before meddling with registry keys is always a good idea.

On a security note, it is a tremendously dangerous idea to associate the open verb for .ps1 files directly with powershell.exe or pwsh.exe. No script file of any kind should be configured to simply execute on a double click in File Explorer.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
FrankAndrew
Posts: 164
Last visit: Sat Apr 01, 2023 1:52 am

Re: Problem with Windows 10 starting PowerShell Studio.exe instead of PowerShell.exe

Post by FrankAndrew »

Hi Alex,
Thanks for the information.
I will check into the details here with that key in the registry.
If that fixes my problem I will let you know.
Thanks again. :-)
This topic is 11 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.