1

Is it possible to run a batch script as an administer? We need this to be done without any user interaction, so there can't be any password prompt or UAC popups - is this possible?

user9517
  • 115,471
  • 20
  • 215
  • 297
naspinski
  • 177
  • 1
  • 4
  • 10

3 Answers3

6

Assuming batch means some sort of windows then you could use the task scheduler to do this.

user9517
  • 115,471
  • 20
  • 215
  • 297
0

You can use a Joeware tool - CPAU.exe to accomplish this:

cpau.exe -u machinename\administrator -p secret_password -ex "path_to_a_program.exe" -lwop

This tool makes easy work of running a program in a privileged context on demand.

RobW
  • 2,806
  • 1
  • 19
  • 22
-2

Assuming batch is refering to the UNIX command, you can issue batch commands as root user, too.

Ztyx
  • 1,385
  • 3
  • 14
  • 28