Scripts Thread, Map local drive/subst command in VBS script? in Coding and Web Development; Hi,
I need to map a drive letter to a local path on the computer. For example, Z: drive points ...
-
14th December 2012, 12:53 PM #1
- Rep Power
- 0
Map local drive/subst command in VBS script?
Hi,
I need to map a drive letter to a local path on the computer. For example, Z: drive points to c:\very\long\path.
I can do this using the subst command but I need a way to do it using my vbs logon script.
If anyone can help at all I would very much appreciate it.
Thanks.
-
-
IDG Tech News
-
14th December 2012, 02:25 PM #2 Dim objShell, strDrive, strPath
Set objShell = CreateObject("WScript.Shell")
strDrive = "Z:"
strPath = """c:\very\long\path"""
objShell.Run "cmd /c SUBST " & strDrive & " " & strPath, 1, True
-
-
14th December 2012, 03:28 PM #3
- Rep Power
- 0
Thanks for your reply. I've left work now so will give this a try on Monday!
-
SHARE: 
Similar Threads
-
By cookie_monster in forum Coding
Replies: 21
Last Post: 22nd April 2013, 08:04 AM
-
By sarchs in forum Windows Server 2000/2003
Replies: 8
Last Post: 11th May 2011, 05:02 PM
-
By Bruce123 in forum Windows
Replies: 10
Last Post: 20th September 2009, 12:22 PM
-
By Pyroman in forum How do you do....it?
Replies: 4
Last Post: 11th June 2008, 03:19 PM
-
By timbo343 in forum Windows
Replies: 4
Last Post: 7th December 2005, 08:09 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules