Script to map subfolder

  • Thread starter Thread starter Arc J. Thames
  • Start date Start date
A

Arc J. Thames

Does anyone know a way to create a script to map a drive letter to a
subfolder of a share?

Thanks!
 
Dim net, DomainString, UserString, UserObj

set net = Wscript.CreateObject("Wscript.Network")

DomainString = net.UserDomain
UserString = net.UserName


Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)

net.MapNetworkDrive "G:", "\\Server\share\subfolder\andanotherifyouwant"

I hope this helps :)
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top