Whats wrong with this windows logon script...

Discussion in 'OT Technology' started by ejmack, Aug 25, 2003.

  1. ejmack

    ejmack Guest

    Set WshNetwork = CreateObject("WScript.Network")
    WshNetwork.AddWindowsPrinterConnection "\\SPRServer\LexmarkO"
    WshNetwork.SetDefaultPrinter "\\SPRServer\LexmarkO"

    Set WshNetwork = CreateObject("WScript.Network")
    WshNetwork.AddWindowsPrinterConnection "\\Server\Appraisal"

    Dim WSHNetwork
    Set WSHNetwork = WScript.CreateObject("WScript.Network")

    WSHNetwork.MapNetworkDrive "G:", "\\sprserver\dis"

    Dim WSHNetwork
    Set WSHNetwork = WScript.CreateObject("WScript.Network")

    WSHNetwork.MapNetworkDrive "H:", "\\Sprserver\C Drive\Inetpub"

    Dim WSHNetwork
    Set WSHNetwork = WScript.CreateObject("WScript.Network")

    WSHNetwork.MapNetworkDrive "Z:", "\\sprserver\Point Data"
     
  2. BlazinBlazer Guy

    BlazinBlazer Guy Witness to The De-Evolution of Mankind.

    Joined:
    Jul 24, 2002
    Messages:
    18,783
    Likes Received:
    0
    Location:
    Lansing, MI USA
    what error msg. is it giving you?
     
  3. ejmack

    ejmack Guest

    Windows Script Host

    Script: \\springfieldmortgage.net\sysvol\Policies\Logon\Login.vbs

    Line: 13
    Char: 5
    Error: Name Redefined
    Code: 800A0411
    Source: Microsoft VBScript compilation error
     
  4. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,624
    Likes Received:
    40
    Location:
    Atlanta, GA
    You are defining the same variable more than once.
     
  5. ejmack

    ejmack Guest

    thanks...
     
  6. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,624
    Likes Received:
    40
    Location:
    Atlanta, GA
    Got it figured out now? :bigthumb:
     
  7. ejmack

    ejmack Guest

    sort of... one more problem... If user already has a drive networked how do i get it to skip the drive mapping part... It gives an error that it is already connected....
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    You can probably do something similar to my DOS batch file:

    net use | find "N:"
    if errorlevel 1 net use n: \\server\sharename /yes

    Just need to translate it
     
  9. ejmack

    ejmack Guest

    thanks 5gen_prelude...

    Im really not to knowledgeable on windows scripting... could anyone tell me how to do this or where to look?
     
  10. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
  11. ejmack

    ejmack Guest

Share This Page