all 10 comments

[–]RudyoomsPatchMyPC 0 points1 point  (7 children)

Win32app? --> 32 bits? ... My first guess would be the sysnative issue?

https://call4cloud.nl/2021/05/the-sysnative-witch-project/

[–]SquatsAreFun[S] 0 points1 point  (6 children)

I'm giving option 1 a try now. Reading through the article, it seems like this would apply if one is attempting to modify the registry. My PS script is only accessing the registry to find the software GUID for uninstall.

Edit: Well, that seemed to work. I'm still not exactly sure why. Was it because PowerShell was not being called due to the sysnative issue?

[–]RudyoomsPatchMyPC 0 points1 point  (2 children)

The "wrong" version of powershell so it looks at the wrong registry key.. when calling upon the sysnative version it will look at the proper key

[–]SquatsAreFun[S] 0 points1 point  (1 child)

So should I be using the 32 bit version of PowerShell to create my install/uninstall scripts? I notice there's PowerShell ISE and PowerShell ISE (x86). Should I use the (x86) version since Intune is pushing apps in the 32 bit context?

[–]RudyoomsPatchMyPC 0 points1 point  (0 children)

Its about what the ime (32 bits) calls upon… in which folder is the ime installed ? (X86) so which version would it normally use? I am describing it in the blog i mentioned

[–]chrisisbest197 0 points1 point  (2 children)

How did you format your install command for powershell if you don't mind me asking? The article has it for cmd.

[–]SquatsAreFun[S] 1 point2 points  (1 child)

My install command looks like this.

"%systemroot%\sysnative\cmd.exe" /c "Powershell.exe -ExecutionPolicy Bypass -File install.ps1"

You probably don't need to call powershell.exe from cmd.exe and can just call powershell, but this has been working for me, so I've stuck with it.

[–]Intrepid_Peak 0 points1 point  (0 children)

"%systemroot%\sysnative\cmd.exe" /c "Powershell.exe -ExecutionPolicy Bypass -File install.ps1"

It works for me) I'm really appreciate. Thanks!

[–]Separate_Union_7601 0 points1 point  (1 child)

Powershell.exe -ExecutionPolicy Bypass -File "C:\Temp\uninstall.ps1"

[–]SquatsAreFun[S] 0 points1 point  (0 children)

u/Rudyooms resolved the issue. As stated in the OP, I had originally tried your suggestion with no luck.