Question Locked

I want to map a network drive, then run an application from a vbscript

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to logon users from active directory, map drives and then run an application, sitting on a map drive, from a logon vbscript.

3 replies

by adumbrow

Just so I am clear, you want the script to map a drive and then run an application sitting on the drive as a part of the logon?

by sundaram ramanujam

Hi,
You can check the below script for insert the drive. Please change the folder according to your need.

Dim objNetwork, strDrive, objShell
Dim strRemotePath, strDriveLetter, strNewName

strDriveLetter = "Z:"
strRemotePath = "\\MyServer\Myfolder"

' Section to map the network drive
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath

This discussion is closed to new replies.