Re: Running Login Script after establishing a VPN connection

Tech-Archive recommends: Speed Up your PC by fixing your registry



I have to figure out how to parse the file correctly. I dont do a lot of
scripting, so everything is slow going for me. The file has a number of
mapped drives and commented lines. I can ignore commented lines and focus on
lines that start with a $. This is what I have to parse:

----------

;
; Windows NT and Windows For Workgroups Logon Script
;

$NameLine = "my region"
$HelpDesk = "555-555-5555"

$Drive1 = M:
$Name1 = "drivea"
$Dir1 = "\\server\mapm"

$Drive3 = W:
$Name3 = "driveb"
$Dir3 = "\\server\mapw"

;
; the following should reflect appropriate mapped drive for location
;

$Drive4 = H:
$Name4 = "drivec"
$Dir4 = "\\server\maph"

$Drive5 = P:
$Name5 = "drived"
$Dir5 = "\\server\mapp"

$Drive6 = k:
$Name6 = "drivee"
$Dir6 = "\\server\mapk"

--------------



"Pegasus (MVP)" wrote:


"TJCooper1972" <TJCooper1972@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9268E35E-DE25-4D68-A53D-C57CE419C907@xxxxxxxxxxxxxxxx
The login script is referenced in the user object login script field. That
calls a batch file with looks at a text file for map drives.

Is there a way to launch the same process that takes place when you log
in?


You previously wrote
"I suppose I could call up the text file with the actuall mapped drives
and parse it for UNC paths. Put those UNC paths into an array and
then map them."
This sounded like a good idea to me - what's happened to it?



.



Relevant Pages

  • Re: How to - Parse a field from one file to be used to parse data from another file.
    ... And I have been trying to parse the group ID of a user from the passwd ... group command to list the groups. ... printf "%s," $groups ... Shell Scripting Recipes: ...
    (comp.unix.shell)
  • Re: Running Login Script after establishing a VPN connection
    ... scripting, so everything is slow going for me. ... mapped drives and commented lines. ... Use copy & paste to copy the code into a batch file. ... removing the word "echo" on Line 09. ...
    (microsoft.public.windows.server.scripting)
  • Re: CMD script parser
    ... > I nned a utility that will parse through .txt files and wherever it see a ... > carriage return it will replace with a semi-colon. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windows.server.general)
  • Re: CMD script parser
    ... > I nned a utility that will parse through .txt files and wherever it see a ... > carriage return it will replace with a semi-colon. ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Mapped drives dont connect....
    ... > file that I double clicked once and the mapped drives ... > wait for the network at computer startup and logon" to ... oShell.RegWrite sRegValue, 1, "REG_DWORD" ... Microsoft MVP Scripting and WMI, ...
    (microsoft.public.windowsxp.security_admin)