Click here to Skip to main content
15,796,507 members

Comments by alex giulio (Top 52 by date)

alex giulio 7-Jan-22 22:02pm View    
Thank you for your polite reply!.
I understood what you conveyed.
It seems that using windows service to start GUI with admin rights is not possible.
Right now I'm trying to investigate the direction of using Windows Schedule to do this. Hope this will be resolved soon.
alex giulio 7-Jan-22 3:34am View    
I haven't tried it yet, but if not setting username/password in windows service's logon tab is there any way to do it?
Because I see the windows service is in session 0 that can get the token of the user who is logging in session 1 to interact with the desktop, like starting a GUI. Besides, I see that the logged in user can manipulate to run the GUI as admin.
So I'm not sure if the windows service can get the token of the logged in user and run the app as admin?
alex giulio 7-Jan-22 3:25am View    
So if windows service is running under local system, is there any way to do start GUI as admin?

Because I see the windows service is in session 0 that can get the token of the user who is logging in session 1 to interact with the desktop, like starting a GUI. Besides, I see that the logged in user can manipulate to run the GUI as admin.
So I'm not sure if the windows service can get the token of the logged in user and run the app as admin?
alex giulio 6-Jan-22 23:25pm View    
I have referenced at the link below so that Window Service can start application(GUI):

https://github.com/murrayju/CreateProcessAsUser/blob/master/ProcessExtensions/ProcessExtensions.cs
alex giulio 24-Nov-21 12:36pm View    
Dear Stefan_Lang,

Thank for ur reply,

Yes, i got it.
Currently I have chosen the solution is to change the build engine from devenv to msbuild and this problem has been solved.