Calling .exe

Ask your 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.
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
obrienc
Posts: 59
Last visit: Wed Apr 20, 2022 5:43 am

Re: Calling .exe

Post by obrienc »

its grayed out in the ide and says unknown when I hover.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Calling .exe

Post by jvierra »

What is greyed out?
User avatar
obrienc
Posts: 59
Last visit: Wed Apr 20, 2022 5:43 am

Re: Calling .exe

Post by obrienc »

When I hover over qwinsta, it says unknown. I've tried creating a path variable, wrapping in quotes and, used .\qwinsta but it still says unknown. In the PS ISE I can run it no problem. Is there another way I can bring it into the form? I tried copying the file into the directory where the project sits.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Calling .exe

Post by jvierra »

You are likely running the 32 bit PowerShell host/engine. quinsta is only available as a 64 bit tool on 64 bit platforms. Be sure you are using the "PowerShell Vx 64 bit" setting.
User avatar
obrienc
Posts: 59
Last visit: Wed Apr 20, 2022 5:43 am

Re: Calling .exe

Post by obrienc »

It was V5 64 Bit. I gave up and just created it as a script then packaged it as an exe for the CmdLine challenged. Thanks for taking the time to look at it.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Calling .exe

Post by jvierra »

If you are running a 32 bit application on a 64 bit system QWINSTA will not be available.
To access 64 bit programs from a 32 bit session we can do this:

C:\Windows\Sysnative\qwinsta.exe
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked