Sorry guys.
This script doesn't run from the network. So if its is ran in the login script then it won't work. testing it locally works but there's no point.
everything works until it runs the "rapid.bat" which release the ip address and Bam! no connection. So basically I had to goto that workstation and "ipconfig renew".
I believe I need 2 vbs script.
1st script is to copy 2 files from network to local C drive (ip_renew.vbs & rapid.bat) & we can name this 1st script = copy.vbs
then in this copy.vbs script to run ip_renew.vbs
ip_renew.vbs is a local script in C drive should run the rapid.bat, wait awhile then delete 2 files in the C drive (ip_renew.vbs & rapid.bat)
This is what I have so far
copy.vbs:
Set network = WScript.CreateObject("WScript.Network")
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
fso.CopyFile "\\Prod2\N_Drive\Public\Prod2 Print Scripts\rapid.bat", "C:\"
fso.CopyFile "\\Prod2\N_Drive\Public\Prod2 Print Scripts\ip_renew.vbs", "C:\"
(need the verbage to run the ip_renew.vbs in local C drive after the copying)
ip_renew.vbs:
Set network = WScript.CreateObject("WScript.Network")
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.run "cmd /c c:\rapid.bat",0,True
WScript.Sleep 100000
fso.DeleteFile "c:\rapid.bat", "c:\ip_renew.vbs"
rapid.bat:
ipconfig /flushdns
gpupdate /force
ipconfig /release
ipconfig /renew
exit
or is there a easier way doing it with 1 script? I can't image there is since ipconfig /release will disconnect everything
<message edited by kracksmith on Friday, September 02, 2005 10:16 AM>