Question Locked

Admin right to change from static to DHCP on logon using a script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am using this login script and have appended a vbs script to unmount the static address and renew ip on dhcp.

What is the correct switch to give admin permission for this vbs script to execute:
JNM
----------------------------------
@echo off

net use m: /delete

net use m: \\server\well /yes /user:server\user Password

net use r: \\server\corp /yes

net use p: \\server\public /yes

net use h: /home /yes

if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END
if %COMPUTERNAME% == xyz GOTO END

goto bydhcp

:bydhcp

START \\Server\NETLOGON\dhcp.vbs

2 replies

by rob miners

and replace

START \\Server\NETLOGON\dhcp.vbs

with this

cscript //nologo %0\..\dhcp.vbs

actually I think that it's this

%0\..\CScript.exe %0\..\dhcp.vbs//Nologo

cscript should be in the netlogon folder as well.

This discussion is closed to new replies.