Re: login script after setting up vpn connection
- From: "Bart Perrier" <bart_perrier@xxxxxxxxxxx>
- Date: Mon, 8 Aug 2005 15:56:42 -0500
objNetwork.UserName should be giving you the Windows login on their local
machine as opposed to the AD credentials used to authenticate to the network
unless they are using Terminal Sessions to a published desktop after VPN.
Bart
"kris houben" <kris@xxxxxxxxxxxx> wrote in message
news:OnIJe.164559$9z6.8612955@xxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> we have setup vpn access towards our 2003 server
> i want to run a login script after users make a connection to the 2003
> server over vpn from their home computers.
> this script should map the p: drive to their personal folder (which is
under
> the shared map personalfolder\loginname)
>
> I found at that running a script after you make a vpn connection can be
done
> through connection manager (with cmak kit)
> But i have a problem with the mapping to the personal folders. here is the
> script i am using :
>
> Dim objNetwork
> Dim strDriveLetter, strRemotePath, strUserName
> strDriveLetter = "p:"
> strRemotepath = \\server\personalfolder\"
> StrUserName = objNetwork.UserName
> Set objNetwork = WScript.CreateObject("Wscript.Network")
> objNetwork.MapNetworkDrive strDriverLetter , strRemotePath&strUserName
> Wscript.Quit
>
> The problem is that this is not working because the strUserName resolves
to
> the username used to login locally to the workstation (in Windows
XP/2000).
> and not to the username used to setup the vpn connection. So this only
works
> when the username to login locally to the workstation and the username set
> in the vpn connection box are the same. Unfortunaly this is not always the
> case (as my network users have their own workstations at home and can
choose
> wathever login name locally). So i need i way to retrieve the username
used
> to setup the vpn connection towards the 2003 server. Does anyone know how
to
> get this through scripting or some other way ? Or does anyone has another
> solution to solve my problem (the only thing i need to do is to connect
the
> p: drive to the personal folder of the connected user)
>
> All help would be welcome
>
> Thanks,
>
>
> Kris Houben
> HyperSoft Belgium
>
>
.
- References:
- login script after setting up vpn connection
- From: kris houben
- login script after setting up vpn connection
- Prev by Date: Loop to check process
- Next by Date: Re: command line parameters
- Previous by thread: login script after setting up vpn connection
- Next by thread: Creating Shortcut
- Index(es):
Relevant Pages
|