/build/static/layout/Breadcrumb_cap_w.png

Deploy PowerShell to 64-bit Windows XP

Continuing my adventure with developing for a 64-bit XP environment. Has anyone installed PowerShell into this environment, and if so, how do I get the Execution Policy changed from Restricted to Remote Signed?

I'm installing PowerShell along with some other apps and using Wise Package Studio 8 to create an exe that does everything I want. With regards to PowerShell, I install it, then am trying to change the Execution Policy so I can run some scripts.

So far I've tried this code directly in Wise Script Editor:

item: Execute Program
Pathname=%SYS32%\windowspowershell\v1.0\powershell.exe
Command Line=-nologo -executionpolicy bypass -noprofile -file "script.ps1"
Flags=00000010
end


Then I tried this as a .bat and a .cmd file and executed it via my Wise script:

"C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe" Set-ExecutionPolicy RemoteSigned


Then I tried compiling the batch file to an exe and executing that in my Wise script.

But in the end, same result: never works in Wise. The cmd and bat files work if I run them on the target PC, but if I try firing them from my Wise script, no luck. The exe doesn't work at all, possibly because of the compiler I used, but just guessing.

Any suggestions?

0 Comments   [ + ] Show comments

Answers (2)

Posted by: jmcfadyen 13 years ago
5th Degree Black Belt
0
i would suggest you look here.

www.powershell.com there is a pretty good admin guide for general powershell tips such as this.
Posted by: spartacus 13 years ago
Black Belt
0
Could it be that the issue here might be related to a previous post you made on Appdeploy ? As I said in my reply to that post, it is my understanding that compiled WiseScript executables always run in 32-bit mode, so this might account for the different behaviour you are seeing.

Regards

Spartacus
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ