Running Login Script after establishing a VPN connection



I want to create a script the user can run that pulls his objuser.scriptpath
properties, and runs the login script specified.

Is there a way to simply restart the login process (the part that goes to
that location and runs the specified script)?

So far I have a script that get the correct field, but I dont know how to
run/launch a bat file using that information. Ive tried wscript.run and
wsshell.run, but they dont seem to work. Any suggestions?

Set oNet = Wscript.CreateObject("Wscript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://"; & ADSysInfo.UserName &"")
Set WshShell = CreateObject("Scripting.FileSystemObject")

Wscript.echo "Script Path: \\domain.loc\netlogon\ou\"& objUser.ScriptPath
'wscript.run "\\domain.loc\netlogon\ou\"& objUser.ScriptPath
'wshshell.run "\\domain.loc\netlogon\ou\"& objUser.ScriptPath


Set oNet = Wscript.CreateObject("Wscript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://"; & ADSysInfo.UserName &"")
Set WshShell = CreateObject("Scripting.FileSystemObject")

.



Relevant Pages