How to run executable on Windows guest in foreground

Entretoize

New Member
Oct 13, 2019
8
0
1
42
Hello, I'm trying to run a program (exe) on a Windows guest with that command :

Code:
qm guest exec 100 "C:/Windows/System32/notepad.exe"

But in only run in the background (I see it in task manager but not on screen).
I tried to log on the service as the user, I tried by checking "Allow service to interact with desktop" but that doesn't work.

Thanks
 
Hi,

this is Windows related and has nothing to do with Proxmox VE.
I would ask in a Windows Forum.
 
It is executed in Windows and Proxmox VE has nothing to do with the Windows program fork behavior.
That would be the same if you ask a Windows user about command what you run in putty.
 
qm exec doesn't launch directly the program wanted, it uses qemu-ga that is proxmox related, no ?
 
Yes, that is true but in the end, it passes the command to Windows cmd as the user what qemu-guest-agent run.
And Windows does what Windows does.
I guess you need extra args for bringing this foreground.
 
It's why I ask here, the example I give is about notepad.exe which doesn't need any argument.
That means the problem is qemu guest agent, who created this program ?
 
who created this program ?
this comes from upstream qemu

the problem here is that the qemu-ga runs as a service in windows and not in the context of any current user (how should it find on which login session it should start ? e.g. with remote desktop sessions etc.)
you will have to look for the (windows specific) solution somewhere people know how to do this on windows
 
You can start a service as a user, this is what I tried, but yes this is windows related.
Thanks
 
Reviving this old thread as I'm struggling to come any close to a solution and have the same problem, that is discussed but not resolved above. Need to use "qm guest exec" command to start a program in the foreground on a logged in user in windows 10 VM. Any help appreciated?
 
Reviving this old thread as I'm struggling to come any close to a solution and have the same problem, that is discussed but not resolved above. Need to use "qm guest exec" command to start a program in the foreground on a logged in user in windows 10 VM. Any help appreciated?
Instead of starting notepad.exe directly it might help to use the "start" helper. Please run start /? at a command prompt to see the available options.

Best regards
 
  • Like
Reactions: Sourcenux

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!