Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AD Startup Script - (how can I run as administrator, not user?)

Status
Not open for further replies.

stclsquid

Programmer
May 25, 2004
16
0
0
US
Hi,

I am trying to run a startup script that will call a program (snetcfg). I would like to make it so that when the user logs in, the snetcfg file will run under administrator permisssions.

Here is a snippet of the batch file to call the program. Is there a way to make the script run at startup? (btw. This script is being called from the users login script)

Code:
@echo  off

if  exist  c:\fileprinton.txt  goto  fileexists

goto  nofile

:fileexists
goto  end

:nofile
net use p: \\stclfs\netlogon
call p:\fileprinton.bat
xcopy p:\fileprinton.txt c:goto  end

:end

and here is the fileprinton.bat contents:

Code:
call p:\snetcfg.exe -v -u MS_Server        
call p:\snetcfg.exe -v -c s -i MS_Server


If i figure out a solution, I will let everyone know. Thanks a bunch,
Chris

 
I have used the runas command before, but I am unsure if there is a way to make an app ALWAYS run as over the network.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top