Hi!!
I am trying to create a login script through bat files and Windows Script Host. Examples are shown below:
logon.bat
@ECHO OFF
erase c:\windows\*.pwl
:: run=logon.bat
:: Check Windows version
IF %OS% == "Windows_NT" GOTO WNT
%0\..\winset OS=Windows_95
%0\..\winset USERDOMAIN=SUPPORT
if not exist %windir%\net.pif copy %0\..\net.pif %windir%\net.pif
if not exist %windir%\wscript.exe start /wait %0\..\scr56en.exe /q
cscript.exe %0\..\REGISTRY-AJB.VBS //B //NOLOGO
net use * /delete /yes
net use K: \\server2\Admin2
net use L: \\server2\Database
GOTO end
:WNT
if not exist %windir%\system32\wscript.exe /wait %0\..\scripten.exe /q
cscript.exe %0\..\REGISTRY-AJB.VBS //B //NOLOGO
net use * /delete /yes
net use K: \\server2\Admin2 /persistent:no
net use L: \\server2\Database /persistent:no
:end
REGISTRY-AJB.VBS
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell"
WSHShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Proxy", 1, "REG_DWORD"
Both of these are placed into the correct place on the server but the VBS script does not run on the client (I does if you copy it across and then double-click it from explorer)
Any Ideas anyone??
Regards,
Alan
I am trying to create a login script through bat files and Windows Script Host. Examples are shown below:
logon.bat
@ECHO OFF
erase c:\windows\*.pwl
:: run=logon.bat
:: Check Windows version
IF %OS% == "Windows_NT" GOTO WNT
%0\..\winset OS=Windows_95
%0\..\winset USERDOMAIN=SUPPORT
if not exist %windir%\net.pif copy %0\..\net.pif %windir%\net.pif
if not exist %windir%\wscript.exe start /wait %0\..\scr56en.exe /q
cscript.exe %0\..\REGISTRY-AJB.VBS //B //NOLOGO
net use * /delete /yes
net use K: \\server2\Admin2
net use L: \\server2\Database
GOTO end
:WNT
if not exist %windir%\system32\wscript.exe /wait %0\..\scripten.exe /q
cscript.exe %0\..\REGISTRY-AJB.VBS //B //NOLOGO
net use * /delete /yes
net use K: \\server2\Admin2 /persistent:no
net use L: \\server2\Database /persistent:no
:end
REGISTRY-AJB.VBS
Dim WSHShell
Set WSHShell = WScript.CreateObject("WScript.Shell"
WSHShell.RegWrite "HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel\Proxy", 1, "REG_DWORD"
Both of these are placed into the correct place on the server but the VBS script does not run on the client (I does if you copy it across and then double-click it from explorer)
Any Ideas anyone??
Regards,
Alan