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:
Then I tried this as a .bat and a .cmd file and executed it via my Wise script:
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?
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)
Please log in to answer
Posted by:
jmcfadyen
13 years ago
Posted by:
spartacus
13 years ago
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
Regards
Spartacus
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.