Why won't my .exe GUI show up when running from PowerShell or CMD?
Asked by
ShinyNinja101
I've got this .exe that functions as a word database for a translation app, and it runs perfectly when I double-click it. However, when I try to launch it through PowerShell, CMD, or even Task Scheduler, it doesn't open the GUI at all, even though I see the process in Task Manager. I'm also unable to connect to it on port 47110. The vendor isn't being very helpful, just saying it works on their end and good luck to me. Does anyone have any idea why this is happening? Why won't it run correctly from Task Scheduler?
Answers
Thinking about this more broadly, shouldnโt this be a Windows Service? Since it's a database on a server, it should be running in the background without a GUI instead of an interactive session. The vendor's lack of support is concerning.
Reply to this answer
It sounds like you might be facing a user context issue here. When you double-click the .exe, it's running in the context of the logged-in user, which allows it to interact with the desktop. If youโre running PowerShell or Task Scheduler under a different account, that could be the problem.
Reply to this answer
What user account are you using for the scheduled task? If it's not your logged-in user, you won't see the GUI or might not even have access to run the program properly.
Reply to this answer
Have you checked if there are any log files generated by the application? Also, when you try to run it from cmd, you could use the `start "" programname.exe` command to see if that makes a difference.
Reply to this answer
Are you executing it from an elevated prompt? Sometimes, apps require admin permissions to run correctly.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions