.exe will not run in Windows 7

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
tirwin@iot.in.gov
Posts: 40
Joined: Mon Oct 19, 2015 5:45 am

.exe will not run in Windows 7

Post by tirwin@iot.in.gov » Fri Sep 16, 2016 5:01 am

I have written a Powershell Studio 2015 Windows Form app compiled to .exe. However I have to compile a 32 bit version and a 64 bit version. The customer would like only 1 version that works for all.

Question 1 (is it possible to run 1 version that works on all Win machines?)

Presently I have 2 versions compiled and the 32 bit version works on 32 bit Win 10 machines. And the 64 bit version works ONLY on Win 10 Machines.

Question 2 (how to compile the .exe to work on a Win 7 64 bit, Office 2013 Machine... . When I right click and run as Administrator or Double Click to run it does not open... . Are there some setting wrong here? please see screen shots of my settings.)
Engine Settings.PNG
Engine Settings.PNG (24.67 KiB) Viewed 1481 times
Execution Restrictions.PNG
Execution Restrictions.PNG (22.99 KiB) Viewed 1481 times
Version Information.PNG
Version Information.PNG (14.87 KiB) Viewed 1481 times
Thanks in advance

jvierra
Posts: 13882
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: .exe will not run in Windows 7

Post by jvierra » Fri Sep 16, 2016 5:13 am

Choose the 32 bit version for V2 Host. THIs will run on all machines (32 and 64) that have at least PowerShell V2 installed. AL systems that are currently supported have at least V2 installed by default. All V2 code will run on later versions of PowerShell with some exceptions. Be sure to test by setting PSS correctly for this.

User avatar
tirwin@iot.in.gov
Posts: 40
Joined: Mon Oct 19, 2015 5:45 am

Re: .exe will not run in Windows 7

Post by tirwin@iot.in.gov » Mon Sep 19, 2016 5:08 am

scanstate.PNG
scanstate.PNG (157.51 KiB) Viewed 1443 times
I took your suggestion but when I run the app which does now open. I get a scanstate 36 error which asks me to review the log file which has the following error.

jvierra
Posts: 13882
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: .exe will not run in Windows 7

Post by jvierra » Mon Sep 19, 2016 8:17 am

You didn't say that you were running scanstate. That is not PowerShell and cannot be run on the wrong machine. You must install the corret version of it on each machine. This is not a PowerShell or PSS issue but an issue of design and deployment of Windows utility apps.

Locked