Closed TimMangan closed 3 years ago
Interesting. I can't find the website but there was a blog post from a Microsoft employee that said to look there for powershell. I can't find any articles stating how to check to see if powershell is installed. When I have some free time I'll see if I can dig a bit deeper and find another way to check if powershell is installed.
Do you have any ideas?
The file hasn’t moved since version 1.0, why not just look under system32\Windows Powershell...
But maybe there is a better way. I’m sure somebody at Microsoft knows “the best” way.;)
Regards,
Tim
From: Darren Hoehna notifications@github.com Sent: Thursday, July 23, 2020 2:49 PM To: microsoft/MSIX-PackageSupportFramework MSIX-PackageSupportFramework@noreply.github.com Cc: TIMOTHY MANGAN tmangan@tmurgent.com; Author author@noreply.github.com Subject: Re: [microsoft/MSIX-PackageSupportFramework] PSF Scripting fails to find PowerPoint (#152)
Interesting. I can't find the website but there was a blog post from a Microsoft employee that said to look there for powershell. I can't find any articles stating how to check to see if powershell is installed. When I have some free time I'll see if I can dig a bit deeper and find another way to check if powershell is installed.
Do you have any ideas?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/MSIX-PackageSupportFramework/issues/152#issuecomment-663172401, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEVBJFM4BJL3XCLGUF6TESTR5CAYTANCNFSM4PF6YYQQ.
Currently working on a PR for this issue.
Solution will be to look for the "3" key also if the "1" key is missing. This will fully prevent breaking anything while addressing the issue.
Sounds good to me. :)
Resolved in PR #170 to Develop branch.
Hi @TimMangan, I'm working on an MSIX package that require to use PSF to run a PowerShell script before starting the application. I encountered the issue described here https://github.com/microsoft/MSIX-PackageSupportFramework/issues/152 and confirmed it was the same issue by creating the "Install" DWORD under HKLM\SOFTWARE\Microsoft\PowerShell\1 on a test machine. So I decided to use your latest version of PSF where it is supposed to be fixed, but the same issue is still here. Can you check if there was any code regression in the latest version ? Thank you by advance,
@Axelo2 Microsoft has not migrated anything from the Develop branch into the Master (which is where you probably took things) in quite some time.
Additionally, there have been some recent changes to try to improve scripting, however these latest changes are not in the Microsoft repository but in my own fork here: https://github.com/TimMangan/MSIX-PackageSupportFramework
@TimMangan The error :
Correct me if wrong but I used your latest version and not Microsoft one because I seen, that the Microsoft one has not your latest update. I used this one : https://github.com/TimMangan/MSIX-PackageSupportFramework/tree/develop/ZipRelease-v2021.11.02
@Axelo2: I checked the code and the PR#170 is included in the v2021.11.02 release, so I'll need some more information.
Basically, the code tries to locate where powershell.exe is by looking in the registry.
It looks for a registry key HKLM\Software\Microsoft\Powershell\1 and then a value called "Install" for the path.
The previous report was that some of the Azure WVD images were missing the \1 key but that there was a \3 key, and this fix checks for the \3 key when \1 is missing. Please let me know what you are seeing.
Reported via customer.
Customer used the Microsoft QuickCreate Windows 10 VM for Developers and attempted to install and run a package that used the PSF for a start of application script. The script does not run (and therefore the app does not run either).
If appears that the PSF looks for HKLM\SOFTWARE\Microsoft\PowerShell\1 key for a DWORD value called Install as a means to determine if PowerShell is installed. PowerShell is installed but the 1 key is not present (the 3 key is).
I believe that the Psf should use another method to determine if PowerShell is installed.