Re: Vista Logon Script
- From: "Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 11:47:28 -0600
Sorry, I haven't worked with Vista yet. Maybe others have. Does it help if
you use?
Set WSHNetwork = CreateObject("WScript.Network")
Perhaps the Wscript object is not allowed. Also, you might try to trap the
error and code something to indicate the error. Perhaps:
=============
On Error Resume Next
Set WSHNetwork = CreateObject("WScript.Network")
If (Err.Number <> 0) Then
Call MsgBox("Error number: " & Err.Number _
"Description: " & Err.Description _
"Source: " & Err.Source)
End If
Err.Clear
WSHNetwork.MapNetworkDrive "G:", "\\SERVER\SHARE"
If (Err.Number <> 0) Then
Call MsgBox("Error number: " & Err.Number _
"Description: " & Err.Description _
"Source: " & Err.Source)
End If
On Error GoTo 0
=========
At least this will give you a clue as to which statement is the problem, and
what the error message might be. The person logging on should see the
message boxes.
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
"randyh@xxxxxxxxxxxxxxxxx"
<randyhnewsgroupsnospam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DCE09B17-D6DF-48DD-A44C-E4E12F5E7E58@xxxxxxxxxxxxxxxx
These scripts work fine with XP. Here is a sample of what doesn't work:
Set WSHNetwork = WScript.CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "G:", "\\SERVER\SHARE"
As I said previously the scripts work if I run them after logging on, just
not when run from a logon script.
Thanks,
Randy
"Richard Mueller" wrote:
I am working with the RTM release of Vista trying to get my
organization's
logon/logoff scripts working. I have found one problem that I need some
assistance with.
One of our logon scripts maps drives based on group membership. It
works
fine in Vista if it is ran once a user is fully logged in but does not
work
when ran via the logon script. I have tried the following things:
- Map the drive using WScript.Network.MapNetworkDrive.
- Map the drive using "net use".
- Making the script sleep for 30 seconds before mapping the drives.
Can you post a snippet of your script that duplicates the problem? Also,
does the script run correctly as a logon script on XP or W2k clients?
--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
.
- Follow-Ups:
- Re: Vista Logon Script
- From: randyh@newsgroups.nospam
- Re: Vista Logon Script
- References:
- Re: Vista Logon Script
- From: Richard Mueller
- Re: Vista Logon Script
- Prev by Date: Re: Vista Logon Script
- Next by Date: Re: Vista Logon Script
- Previous by thread: Re: Vista Logon Script
- Next by thread: Re: Vista Logon Script
- Index(es):
Relevant Pages
|