Run Script as Administrator on Desktop Classic

JD
John Doe
Eisen Karl GmbH

Hello,

i observed scripts run through mobicontrol client always get executed as the current logged in user in the windows desktop classic environment.

Is there anything i can do to execute a script or shellexecute a batch as different user or admin?

As an example i want to run a batch as admin with a mobicontrol script:

shellexecute C:\test\test.cmd -open


The only other solution would be the run everything else as Admin with Autologin, but i am feeling a bit unsecure about that as previlege escalation under a windows admin account can be really concerning...

Has anyone a solution for this?


Edited 5 years ago
Windows
ANSWERS
D
DDMOD@SOTI
5 years ago

Hi John Doe,

Thanks for the post!

Please share the version of MobiControl you are trying to run the script, meanwhile I will work on the solution for you.

Regards,

FS

Did you ever find a solution to run powershell or such as administrator?

EDIT:

This seems to work as I expect, it does require human input to confirm the administrator action.

Start-Process -FilePath "powershell" -Verb RunAs "<input powershell cmd>"

JD
John Doe
5 years ago

Hello DDMOD,

running both 15.02 (production) and 15.1 (testing) .