[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1972
  • Last Modified:

Vista: How to set Compatibiltiy->Privilege Level of application to "run as administrator" in batch-file?

Hi everyone,

i have a setup which deploys some apps, these must be enabled to run as admins afterwards.
I hoped that by running the initial setup with "run as administrator" it would be inherited to the deployed apps, which does not happen. Seems like if you set the "run as admin" once for a file the OS remembers it, but you cannot "carry" the setting to another Vista-PC.
So I would run a batch-file as part of my deployment. With which command(s) in my batch-file do I set the privilege-Level to my apps?

Thanks in advance,
1 Solution
You could apply a so called shim. http://www.microsoft.com/downloads/details.aspx?FamilyID=F3B46BA6-0EF2-47DB-AAEC-ED786109E030&displaylang=en
It's not as difficult as it sounds.
Second possibility is to setup scheduled tasks (command line: schtasks.exe) and create shortcuts to those. Scheduled tasks can be set to run with highest privileges.
If you have the admin right for all the machines, should you be able to batch schtasks.exe to
setup a job with "Run with hightest privileges" to execute the install, then
again with schtasks.exe to tell it to run, then delete the job.

get usage with:
schtasks /?

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now