Login script

Discussion in 'Scripting' started by George Spiro, Aug 4, 2008.

  1. George Spiro

    George Spiro Guest

    Hi,

    I am trying to add a registry entry into my login script. Could you
    please help me out?

    Right now the login script for my users is looking like follow:

    Set objNetwork = CreateObject("Wscript.Network")

    On Error Resume Next
    Err.Clear
    objNetwork.MapNetworkDrive "H:", "\\SRV2\usagers"
    objNetwork.MapNetworkDrive "P:", "\\SRV2\public"
    objNetwork.MapNetworkDrive "V:", "\\SRV2\archives"

    If Err.Number <> 0 Then
    Err.Clear
    On Error GoTo 0
    objNetwork.RemoveNetworkDrive "H:", True, True
    objNetwork.RemoveNetworkDrive "P:", True, True
    objNetwork.RemoveNetworkDrive "V:", True, True
    objNetwork.MapNetworkDrive "H:", "\\SRV2\usagers"
    objNetwork.MapNetworkDrive "P:", "\\SRV2\public"
    objNetwork.MapNetworkDrive "V:", "\\SRV2\archives"

    End If
    On Error GoTo 0

    I would add a registry entry that WILL NOT PROMPT THE USER and will
    only get applied the first time, the user logins to that workstation.

    The registry entry is the following:

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User
    Shell Folders]
    "Cache"=hex(2):25,55,53,45,52,50,52,4f,46,49,4c,45,25,5c,4c,6f,63,61,6c,20,53,\

    65,74,74,69,6e,67,73,5c,54,65,6d,70,6f,72,61,72,79,20,49,6e,74,65,72,6e,65,\
    74,20,46,69,6c,65,73,00

    Thank you for your help,

    G.
     
    George Spiro, Aug 4, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.