Page 1 of 1

Not valid Windows Win32 application error

Posted: Mon Jul 31, 2017 5:27 pm
I`m using PrimalScript Version 7.3.103 x64 in Windows 10 x64.
When I convert vbscript to executable, if I try to run that executable in windows server 2003, I get the error
"C:\windows\MyScriptTest.exe is not a valid Win32 application."
then I close the message window and in the command line console I see a message = "Access Denied".

I already tried to use 32 bit only instead of native, but I get the same error.

I ran this executable with Admin Permissions.

In the package settings I have The script engine option "SAPIEN Script Host (Command Line)" selected with Native Target.

Is this a .NET 4 issue? since Windows 2003 does not have .NET 4 how can I solve this? Can I download a older version of the Primal Script that allows this?

Re: Not valid Windows Win32 application error

Posted: Mon Jul 31, 2017 11:12 pm
by Alexander Riedel
If you use the 'native' option, the starter executable is built against the .NET 4.5 framework. In order to use this mechanism you will need to install that.
If you package the VBScript with the 32 Bit option and the SAPIEN Script Host, there is no dependency on a .NET runtime. The executable uses the Visual Studio runtime.
Since Server 2003 is equivalent to Windows XP, this may no longer be supported.
But ultimately, it depends on your server configuration.
You executable file may be locked, your server may not allow running things form the root directory, your server may be configured to not run files that are not signed etc.
An older version of PrimalScript has ultimately less options and will not alleviate any issues on the machine.
I would suggest to build this for the native platforms you need it for and see that it works on these machines.
You can use this to see what your exeutable needs and what is not there.

Please note that this tool does not work for .NET assemblies in the same manner.

Re: Not valid Windows Win32 application error

Posted: Tue Aug 01, 2017 11:28 am
Ok, I`ll check that , regarding to Native Mode, when I run the in systems that don`t have the correct .NET version, I get a Window Error warning to install the minimum .NET version. If I`m logged to the machine I can click the OK button of that Window Error, but if I use a remote session or a script that "calls" that executable, I end up with a remote command line waiting for someone to hit the OK button of that Windows message. Is it possible to redirect or ignore those Windows Errors when starting the executable?

Re: Not valid Windows Win32 application error

Posted: Mon Aug 07, 2017 7:47 am
by Alexander Riedel
No. Microsoft decided to make the system display a message box. Nothing you or I can do about that.