Re: Running Login Script after establishing a VPN connection
- From: "Richard Mueller [MVP]" <rlmueller-nospam@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 9 May 2008 17:36:59 -0500
"TJCooper1972" <TJCooper1972@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C77632B4-B528-44BA-AAEE-7EE53DAD6D0D@xxxxxxxxxxxxxxxx
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")
You bind wshShell to "Scripting.FileSystemObject" instead of
"Wscript.Shell". The FSO has no Run method, while Wscript.Shell does.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
.
- Follow-Ups:
- Re: Running Login Script after establishing a VPN connection
- From: TJCooper1972
- Re: Running Login Script after establishing a VPN connection
- References:
- Running Login Script after establishing a VPN connection
- From: TJCooper1972
- Running Login Script after establishing a VPN connection
- Prev by Date: Re: Running Login Script after establishing a VPN connection
- Next by Date: How to find the profile status ?
- Previous by thread: Re: Running Login Script after establishing a VPN connection
- Next by thread: Re: Running Login Script after establishing a VPN connection
- Index(es):
Relevant Pages
|
Loading