Cannot run compiled VBS on 32-bit

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
User avatar
TOlvera
Posts: 6
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Fri Oct 21, 2011 1:37 pm

Cannot run compiled VBS on 32-bit

Post by TOlvera »

Hello,

I'm using PrimalScript 2015 64-bit installed on my Win 8.1 x64 Pro laptop. I've updated a script that I previously created and compiled years ago. The updated package specifies the engine as CScript Win32 and it compiles fine and runs fine on 64-bit computers however it will not run on 32-bit computers. I get an error that my exe "is not a valid Win32 application". I've tried using the Sapien script host Win32 and receive the same error. When I try the CScript x64 I receive the expected error regarding mismatched architecture. I recall doing this on a previous version of PrimalScript that ran on both 32-bit and 64-bit computers. Why can't I get this to run now using the latest version of PrimalScript?

Thanks,
-Tim

User avatar
SAPIEN Support Forums
Posts: 945
Joined: Wed Dec 03, 2014 2:26 pm

Cannot run compiled VBS on 32-bit

Post by SAPIEN Support Forums »

This is an automated post. A real person will respond soon.

Thank you for posting, TOlvera.

Did you remember to include the following?
  • 1. Product, version and build (e.g. Product: PrimalScript 2014, Version & Build: 7.0.46. Version and build information can be found in the product's About box accessed by clicking the blue icon with the 'i' in the upper right hand corner of the ribbon.)
    2. Specify if you are running a 32 or 64 bit version
    3. Specify your operating system and if it is 32 or 64 bit.
    4. Attach a screenshot if your issue can be seen on the screen
    5. Attach a zip file if you have multiple files (crash reports, log entries, etc.) related to your issue.
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***

User avatar
Alexander Riedel
Posts: 7337
Joined: Tue May 29, 2007 4:43 pm

Re: Cannot run compiled VBS on 32-bit

Post by Alexander Riedel »

I do not know exactly what version you have and what setting you use.

I packaged a little vbs script that starts IE into a 32 bit exe.
The script, the settings file and the exe are in the attached zip.

I verified that it runs fine on a 32 bit machine.
openIE.vbs.zip
(937.51 KiB) Downloaded 127 times
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
TOlvera
Posts: 6
Joined: Fri Oct 21, 2011 1:37 pm

Re: Cannot run compiled VBS on 32-bit

Post by TOlvera »

I'm running PrimalScript 2015 7.1.61.0.

Does it matter that the problematic machines are Server 2003 and a few XP machines (that are unfortunately still in use for a few more months)? I don't know what type of machine you verified your exe on but I tried your exe on one of the Server 2003 machines and it didn't run. I've attached the error message.

I don't recall seeing the error on a Windows 7 x86 machine but unfortunately the problem lies with the Server 2003 machines that are being prep'd for retirement (hence the need for the exe).
Error ScreenShot
Error ScreenShot
2015-03-31_17-28-35.jpg (12.23 KiB) Viewed 3361 times

User avatar
Alexander Riedel
Posts: 7337
Joined: Tue May 29, 2007 4:43 pm

Re: Cannot run compiled VBS on 32-bit

Post by Alexander Riedel »

I tried a Win 7 machine. I will fire up a 2003 server VM later and check there. Please stand by.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
TOlvera
Posts: 6
Joined: Fri Oct 21, 2011 1:37 pm

Re: Cannot run compiled VBS on 32-bit

Post by TOlvera »

Hello, just checking to see if you had any luck or different experience when trying to run the compiled exe on XP or 2003?

User avatar
Alexander Riedel
Posts: 7337
Joined: Tue May 29, 2007 4:43 pm

Re: Cannot run compiled VBS on 32-bit

Post by Alexander Riedel »

We switched compilers for the 2015 version and it seems Microsoft did not document very well that the produced executables no longer run on any OS version prior to Vista. Since we actively no longer test on the unsupported OS versions we did not notice.

Use the script engines from the attached zip and copy the ones needed to
C:\Program Files\SAPIEN Technologies, Inc\PrimalScript 2015\ScriptEngines

The engine names are distinguished by the (XP) in their names.
Restart PrimalScript and select an XP type engine for your package.
Windows XP script hosts.zip
(3.97 MiB) Downloaded 159 times
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
TOlvera
Posts: 6
Joined: Fri Oct 21, 2011 1:37 pm

Re: Cannot run compiled VBS on 32-bit

Post by TOlvera »

Ok I'll give it a try ASAP. Thanks for providing a fix.