Link to home
Start Free TrialLog in
Avatar of Antonio King
Antonio King

asked on

Running a Batch that needs administrator privileges...

Hello everyone,

I work in an IT department for a small company, our size is increasing, and doing things to each pc one by one takes a long time.
We implemented batch scripts to run on logon, but as all our users are not administrators, some of the code in the batch files do not execute. EG: Copying files, or executing programs such as setup programs for software.

My question is, how do I get around all this without granting our users administrator privileges?
I have searched on here, and one solution was to create a service, but in order to get the service running I would need to go to every machine to start the service.
If anyone comes up with a solution, detail would be helpful. Would like to avoid having to visit every machine though.

Any help is appreciated! Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> , how do I get around all this without granting our users administrator privileges?

one is, the admin gets footprint on each pc, their own ID and password, and this ID is then used for the install

two is for use of scheduler, in dos of  'AT' command to start a .cmd  file to run, installing things. When the AT command runs, it has system privilege, which is more powerful than Administrator. That is one main reason I like to use scheduler. No one has to log in to get the authority, and you may not need to force users to log off.
I think that means I like dragon-it 's #2 and #5 best.
low-tech solution:... write a batch file that contains means for authorization (i.e. id and password) and then compile it:

http://www.bdargo.com/

I've used this compiler with success in the past.

-Brian
From One of my previous posts..

***
You will probably need to make a script file that will include both, username and password so they can't see them or get prompted to type them.. See the following link please..

https://www.experts-exchange.com/questions/21369535/how-to-make-a-runas-without-a-prompt-for-password.html

Or use the Runasp third party command line..
http://www.mast-computer.com/c_9-s_34-l_en.html

The password parameter is not supported by the runas command on XP, but this runasp does support it..
http://www.mast-computer.com/c_9-l_en.html
http://www.gold-software.com/download2346.html

BTW: if you didn't find your answear in first link, then the command line runasp will do it..

Alan-Yeo,

Are you still there?  Did any of that help?

Steve
Avatar of Antonio King
Antonio King

ASKER

Very sorry for taking so long to get back to you,

Many thanks for all your help/
No problem, glad if it helped.... got me past the 50k mark in the TA too :-)

Steve