login script after setting up vpn connection



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


.



Relevant Pages

  • Re: Connecting a remote workstation to a domain
    ... created the VPN connection and tested with the same results from a remote ... login, then log out and try the "log on using dialup connnection". ... She has been using VPN for over a year ... woremote workstation. ...
    (microsoft.public.windows.server.sbs)
  • Re: Connecting a remote workstation to a domain
    ... Log onto the laptop with her domain credentials without using the VPN at ... login, then log out and try the "log on using dialup connnection". ... I have also selected not to dial an initial connection ... woremote workstation. ...
    (microsoft.public.windows.server.sbs)
  • RE: Integrating Domain and VPN Login
    ... Integrating Domain and VPN Login ... dial-up connection' at the logon screen. ... These machines are then authenticating to the Windows 2000 server at the ...
    (Focus-Microsoft)
  • RE: Integrating Domain and VPN Login
    ... More than likely I was misinformed and these machines are not actually ... Integrating Domain and VPN Login ... dial-up connection' at the logon screen. ...
    (Focus-Microsoft)
  • Re: How to run a script when users logon due VPN
    ... that's only possible when a computer is added in the computer domain. ... Just run plain xp, starts the builtin vpn tool from SBS, connect. ... At this point run a script. ... Check the checkbox "login using dial-up connection". ...
    (microsoft.public.windows.server.sbs)