administrative rights in Batch file

M

Micah

We currently only allow our end users Power user rights on
there workstation. I have a small update (for a CA
product) I want to deploy to everyone through their batch
file, unfortunatly they need administrative privilages.
Does any know the command to set that task to be installed
as administrator?
 
A

Al Dunbar [MS-MVP]

Micah said:
We currently only allow our end users Power user rights on
there workstation. I have a small update (for a CA
product) I want to deploy to everyone through their batch
file, unfortunatly they need administrative privilages.
Does any know the command to set that task to be installed
as administrator?

There is no built-in command that can do this. RUNAS would, but the user
would then be prompted for the administrator password, and you don't want to
give that out.

Other options are available, including RunAsPro (ten euros per workstation),
SUNAR (freeware) and CPAU:

http://www.jsiinc.com/SUBO/tip7200/rh7258.htm

Just make sure that you do this carefully so as not to inadvertently either
reveal the administrator password, or provide a file with the password
embedded that could be used to run a different command than the one you want
to run to do your installation.


/Al



/Al
 
T

Torgeir Bakken (MVP)

Micah said:
We currently only allow our end users Power user rights on
there workstation. I have a small update (for a CA
product) I want to deploy to everyone through their batch
file, unfortunatly they need administrative privilages.
Does any know the command to set that task to be installed
as administrator?

Hi

You might get something to work using a Runas wrapper utility or similar,
take a look here:

http://groups.google.com/[email protected]
 
J

Jason Moseley

myself said:
may also want to check out NeoExec -> www.neovalens.com
Is there a freeware version of the neovalens solution anywhere? I have
all users on our network as Power Users as well, but some need to run
programs like defragNTFS and such...
 
M

Markus

Micah said:
We currently only allow our end users Power user rights on
there workstation. I have a small update (for a CA
product) I want to deploy to everyone through their batch
file, unfortunatly they need administrative privilages.
Does any know the command to set that task to be installed
as administrator?

Hi micah,
there are several options for supplying a batch file (or any program)
with administrative privileges:
1. create a scheduled task on the computer + supply account name +
password the task should use (manually or using XP command
schtasks /create /u [Domain\]Account /p password - see
online help)
2. use RunAs.exe (MS) + entering the local admin's password
manually
3. combine the the third party freeware tool SANUR.exe with
RunAs which allows to submit user account AND password (see
http://www.commandline.co.uk/sanur/index2.html)
4. if you can be sure the computer is online: on your admin
client run "psexec \\targetcomputer exefile arguments" or
"psexec \\targetcomputer cmd.exe /c batchfile arguments"
(see www.sysinternals.com)
5. use a software distribution tool like SMS, OnCommand,
NetInstall, Novell ZenWorks etc.
7. use the Resource Kit tool "su.exe" (which didn't work for me !?)
6. Distribute a batch file etc. using Active Directory Group Policy
feature "Software installation" + a .ZAP file (see
OR (which I chose before + in addition to a professional
software distribution solution tool):
7. Run a start or shutdown script via Active Directory Group Policy
(everyone group must have read access to \\server\share\subdir\
setup.exe or whatever).
To make sure only specific clients will start the installation
and only ONCE:
- Create a directory structure like \\server\share\autoinstall
\clients\computer1, computer2 and so on
- Create an installation batch file install.cmd + copy it to the
corresponding client directories and
- Create an AD start script like
REM CheckAutoInstall.cmd
set ADInstPath=\\server\share\autoinstall\clients\%computername%
if not exist %ADInstPath%\install.cmd goto :EOF
call %ADInstPath%\install.cmd
del %ADInstPath%\install.cmd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top