Advertisement

07.30.2008 at 01:20PM PDT, ID: 23608879
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.8

VB Script does not map network drives on Vista

Asked by LeonardArellano in VB Script, Windows Vista, Network Management

Tags:

Need some help with VB logon script mapping network drives with Vista. Did some research on the problem, tried the launchapp.wsf in the GPO, this did not work. I'm thinking that something is wrong with my VB script. The script works fine on a Windows XP machine and it also runs fine just running the script from the desktop, but just on running it from GPO logon. The code is below.

'Logon Script for Group Policy
'Functions - Map Drives, add and remove icons to desktop
'Running Track-it inventory on machines on start up

'Start of Script
'On Error Resume Next
'Setting Variables
Dim objNetwork
Dim objShell
Dim strDesktop
Dim objShortcut
Dim objURL
Dim oShell
Dim audit
Set objNetwork = CreateObject("WScript.network")
Set objShell = WScript.CreateObject("WScript.Shell")
Set oShell = CreateObject("WScript.Shell")

'Getting Time for display message
sTime = Time
'Getting User Information to display in message
strUser = objNetwork.UserName
strHost = objNetwork.ComputerName

'Mapping Drives
objNetwork.MapNetworkDrive "F:", "\\Server1\SYS"
objNetwork.MapNetworkDrive "K:", "\\server2\DCSI"
objNetwork.MapNetworkDrive "p:", "\\server3\Applications"
objNetwork.MapNetworkDrive "T:", "\\server4\Quadrant"
'objNetwork.MapNetworkDrive "V:", "\\server5\SYS\Users\" & strUser & ""

'Create Shortcuts
strDesktop = objShell.SpecialFolders("Desktop")
'----------------------------------------PlantWide Documents-------------------------
Set objShortcut = objShell.CreateShortcut(strDesktop & "\PlantwideDocuments.lnk")
With objShortcut
      .TargetPath = objShell.ExpandEnvironmentStrings("F:\ISO\OVERVIEW\System.igx")
      .WorkingDirectory = objShell.ExpandEnvironmentStrings("F:\ISO\OVERVIEW")
      .WindowStyle = 1
      .IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\iGrafx\pro\12.0\Flow.exe, 0")
      .Save
End With
'----------------------------------------Key Measures--------------------------------
Set objShortcut = objShell.CreateShortcut(strDesktop & "\keymeasures.lnk")
With objShortcut
      .TargetPath = objShell.ExpandEnvironmentStrings("F:\GROUP\STRGPLAN\KEYMEAS\keymeas.igx")
      .WorkingDirectory = objShell.ExpandEnvironmentStrings("F:\GROUP\STRGPLAN\KEYMEAS")
      .WindowStyle = 1
      .IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\iGrafx\pro\12.0\Flow.exe, 0")
      .Save
End With
'-----------------------------------------Scar Database------------------------------
Set objShortcut = objShell.CreateShortcut(strDesktop & "\Scar.mdb.lnk")
With objShortcut
      .TargetPath = objShell.ExpandEnvironmentStrings("F:\Group\MSG\C-a_Data\Scar.mdb")
      .WorkingDirectory = objShell.ExpandEnvironmentStrings("F:\F:\Group\MSG\C-a_Data\")
      .WindowStyle = 1
      '.IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office\MSACCESS.exe, 0")
      .IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office12\MSACCESS.exe, 0")
      .Save
End With
'-----------------------------------------Corrective Actions-------------------------
Set objShortcut = objShell.CreateShortcut(strDesktop & "\CorrectiveAction.mdb.lnk")
With objShortcut
      .TargetPath = objShell.ExpandEnvironmentStrings("F:\Group\MSG\C-a_Data\CorrectiveAction.mdb")
      .WorkingDirectory = objShell.ExpandEnvironmentStrings("F:\F:\Group\MSG\C-a_Data\")
      .WindowStyle = 1
      '.IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office\MSACCESS.exe, 0")
      .IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office12\MSACCESS.exe, 0")
      .Save
End With
'-----------------------------------------Maintenance Requests------------------------
Set objShortcut = objShell.CreateShortcut(strDesktop & "\Maintenance Requests.mdb.lnk")
With objShortcut
      .TargetPath = objShell.ExpandEnvironmentStrings("F:\GROUP\Maintenance\Public\Maintprojects.mdb")
      .WorkingDirectory = objShell.ExpandEnvironmentStrings("F:\F:\Group\MSG\C-a_Data\")
      .WindowStyle = 1
      '.IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office\MSACCESS.exe, 0")
      .IconLocation = objShell.ExpandEnvironmentStrings("c:\Program Files\Microsoft Office\Office12\MSACCESS.exe, 0")
      .Save
End With
''''''''''''''''''''''''''''''''''WINS
Set objURL = objShell.CreateShortcut(strDesktop & "\WINS.url")
      objURL.TargetPath = "http://www.wins-inc.com/company/"
         objURL.Save

'Call Audit32.exe
Set oShell = CreateObject("WScript.Shell")
audit = "\\aecapp\trackit80\audit32.exe"
Call oShell.Run(audit,0,True)

'Display Message
MsgBox "Welcome to Company " & strUser & ", The Time is " & sTime & " You are now logged onto " & strHost & "."
Start Free Trial
[+][-]07.30.2008 at 01:24PM PDT, ID: 22124444

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.30.2008 at 03:39PM PDT, ID: 22125416

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Windows Vista, Network Management
Tags: VB Logon Script
Sign Up Now!
Solution Provided By: Housammuhanna
Participating Experts: 4
Solution Grade: B
 
 
[+][-]07.31.2008 at 06:58AM PDT, ID: 22129719

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.31.2008 at 03:47PM PDT, ID: 22134219

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.01.2008 at 05:27AM PDT, ID: 22137558

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628