Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Script to map a network drive as ascii character and make hidden

Reply
 
Old 09-15-2009   #1 (permalink)
Cat


 
 

Script to map a network drive as ascii character and make hidden

I'm new to vbscripting and need to create a script that will map a
network drive as an ascii character instead of a drive letter ie: _,
make persistent and hide this drive to users, the drive will be used
for installing software packages from a network share in a student lab
environment. Is this possible as it was suggested to me this could be
done? Do I still use the net use command?
Thanks in advance
Cat

My System SpecsSystem Spec
Old 09-16-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: Script to map a network drive as ascii character and make hidden


"Cat" <cathossie@newsgroup> wrote in message
news:2ea06d52-e515-40a0-ac82-9e9048f63e55@newsgroup
Quote:

> I'm new to vbscripting and need to create a script that will map a
> network drive as an ascii character instead of a drive letter ie: _,
> make persistent and hide this drive to users, the drive will be used
> for installing software packages from a network share in a student lab
> environment. Is this possible as it was suggested to me this could be
> done? Do I still use the net use command?
> Thanks in advance
> Cat
No, you do no necessarily need to use "net use". You can do it like so:
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "R:", "\\server\share"

However, you must use a drive *letter*, not just some ASCII character.


My System SpecsSystem Spec
Old 09-16-2009   #3 (permalink)
Al Dunbar


 
 

Re: Script to map a network drive as ascii character and make hidden


"Pegasus [MVP]" <news@newsgroup> wrote in message
news:eww#SNpNKHA.1268@newsgroup
Quote:

>
> "Cat" <cathossie@newsgroup> wrote in message
> news:2ea06d52-e515-40a0-ac82-9e9048f63e55@newsgroup
Quote:

>> I'm new to vbscripting and need to create a script that will map a
>> network drive as an ascii character instead of a drive letter ie: _,
>> make persistent and hide this drive to users, the drive will be used
>> for installing software packages from a network share in a student lab
>> environment. Is this possible as it was suggested to me this could be
>> done? Do I still use the net use command?
>> Thanks in advance
>> Cat
>
> No, you do no necessarily need to use "net use". You can do it like so:
> Set objNetwork = CreateObject("WScript.Network")
> objNetwork.MapNetworkDrive "R:", "\\server\share"
>
> However, you must use a drive *letter*, not just some ASCII character.
The best way to hide a mapped drive is not to map it. Just change whatever
it is that is doing your software installs to reference the shared folder by
its UNC.

/Al


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Map network drive via logon script and launchapp.wsf error in scri Vista networking & sharing
My pictures hidden, can not make it un hidden General Discussion
ASCII / ANSI Character sets in Vista Vista General
When non-ASCII creeps into script PowerShell
Import from OE6 fails when folder name contains non-ascii character Vista mail


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46