RegRead in login script 
Author Message
 RegRead in login script

Hello,

Trying out WSH for the first time.  Haven't even started on making it work
in the login script and I'm already running into a perplexing problem.  The
following script code runs OK on my 95 desktop - but you install WSH on any
other desktop and when line 9 (RegRead) processes it comes up with
"The system cannot find the file specified"  Script execution error.

Quote:
>Dim WSHNetwork
>Dim WSHShell
>Dim colDrives, SharePoint
>Dim CRLF
>Dim varMLS
>CRLF = Chr(13) & Chr(10)
>Set WSHNetwork = WScript.CreateObject("WScript.Network")
>Set WSHShell = WScript.CreateObject("WScript.Shell")
>WSHShell.RegRead
>"HKLM\System\CurrentControlSet\Services\VxD\VNETSUP\MaintainServerList"
>varMLS =
>"HKLM\System\CurrentControlSet\Services\VxD\VNETSUP\MaintainServerList"
>WSHShell.Popup varMLS
>MsgBox      "Welcome"& " " &WSHNetwork.UserName& " to the Hanscom >Domain" &
CRLF &      _
>            "Your are Logging in from"& " " & WSHNetwork.ComputerName,              >_
>    vbInformation + vbOKOnly,                                                   _
>            "Hanscom Group Login Processor"

My goal is to read a key from the registry, stuff the value of that key
into a variable and then append the variable value + the computer name to a

around glaizer, but I thought I'd drop this list a line to see if anybody
could help.

TIA
Mike Pacheco

Straight E-mails are OK if you don't want to reply to the list



Mon, 05 Mar 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. vbscript login scripts - starting a script from the Windows 95 command prompt

2. Script to remove login script by OU.

3. Using a WSH Script as a Login Script

4. Login script - Script running before user logs on.

5. Login script - Script running before user logs on.

6. Executing a WSH script as a login script

7. NH: Need to have user login with their NT login

8. login.bat -> login.vbs help required

9. Converting a login.bat to login.wsh

10. Custom WSH login *before* Client32 login?

11. access denied to wscript at login but runs after login

12. VBScript NT Login Script - checking for group membership

 

 
Powered by phpBB® Forum Software