Brad said:
Hello all, I am trying to use the RUNAS command to execut batch files as part
of a login script. The users are only power users of there PCs and dont have
pwermission to run some of the functions that the batch files run. I
basically need to give the batch file full admin rights to run under the
currently logged on user. Does anybody know how to do this, or if there is a
VB that can do this
Thanks
Hi
Different RunAs products listed here, some with encryption
options:
http://groups.google.com/[email protected]
Another one that is not mentioned in the link above:
LSrunas/LSrunasE (the latter with password encryption)
http://www.linkselection.com/lsrunas.asp
If you have Active Directory with Win2k/WinXP clients:
Also note that you can do a lot of things in a computer startup script
(with a GPO) that runs as part of the boot up process (before the user
logs in). It runs under the system context and has admin rights.
To avoid users being able to read the startup script on the server,
grant read access only for the AD group "Domain Computers" to the
script file.
To be able to access files over the network from the computer startup
script, you could put the file(s) on a network share and grant read
access for the AD group "Domain Computers" to the share.
Alternatively, from the startup script, you could map a drive on
the fly, like this (VBScript example):
'--------------------8<----------------------
sDomainUser = "arp.corp\computer_fix"
sPswd = "something"
Set oNetwork = CreateObject("Wscript.Network")
oNetwork.MapNetworkDrive _
"Y:", "\\server\netlogon\some folder",, sDomainUser, sPswd
'--------------------8<----------------------
Note that if you want to access the users HKEY_CURRENT_USER registry
hive in a computer startup script, you will need to load the hive file
yourself from the script.