I am using PrimalScript 2007 Professional. I wrote a simple one line PowerShell(v1) script and packaged it using Script Packager. When I try to run the exe from a command prompt or PowerShell it does not run and displays this error: "Cannot run Script, error: The system cannot find the file specified." If I run the script from within PowerShell is runs without a problem.
While packaging the script I chose the following:
Execute with: Windows PowerShell
Unchecked Delete data files after script executes
Unpack script files and data files to Temporary folder (C:Temp)
Added the one PowerShell script file to Script Files
I have searched for the unpacked script file and it is not found. I am assuming that the exe does not even begin to execute. I have packaged many vbscripts in the past and they run without a problem.
Any assistance would be greatly appreciated.
Chris
Packaged PowerShell exe does not run
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.
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.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Packaged PowerShell exe does not run
What exact build of PS2007 do you have? The exe runs, thats' what is displaying the error message. Can you check your temp folder if you have write access to that?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Packaged PowerShell exe does not run
Alex,
The version is 4.5.581. I have write access to the temp folder. As a test, I also tried to change the folder to Same folder as the executable and again I do not see the unpackaged ps1 file and the same error is displayed.
Chris
The version is 4.5.581. I have write access to the temp folder. As a test, I also tried to change the folder to Same folder as the executable and again I do not see the unpackaged ps1 file and the same error is displayed.
Chris
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Packaged PowerShell exe does not run
Can you please zip and email the the exe to support@sapien.com?
Please also include the packager ESP file.
Please also include the packager ESP file.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Packaged PowerShell exe does not run
Ok, got it. It runs fine here:
So the exe is fine.
So that means it cannot write to the hard drive on your machine or not find PowerShell.exe.
I'll do some digging here and see what could be the cause.
So the exe is fine.
So that means it cannot write to the hard drive on your machine or not find PowerShell.exe.
I'll do some digging here and see what could be the cause.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Packaged PowerShell exe does not run
Alexander,
I was able to get it to work by adding the PowerShell location to my path. When you mentioned that it could not find PowerShell.exe, I tried entering powershell in Run... and it failed. Sorry this was so simple.
Chris
I was able to get it to work by adding the PowerShell location to my path. When you mentioned that it could not find PowerShell.exe, I tried entering powershell in Run... and it failed. Sorry this was so simple.
Chris
- Alexander Riedel
- Posts: 8488
- Last visit: Tue Apr 16, 2024 8:42 am
- Been upvoted: 37 times
Packaged PowerShell exe does not run
No problem. I like simple
I have to point out that in PrimalScript 2009 you can package the exe so it runs the script directly without temporary file. Just saying...
I have to point out that in PrimalScript 2009 you can package the exe so it runs the script directly without temporary file. Just saying...
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.