Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vbscript for mapping network shares

Posted on 2011-10-12
2
Medium Priority
?
284 Views
Last Modified: 2012-05-12
Hello, I am completely new to vbscripting. Currently we have batch files connecting to network shares using the NET USE command simmilar to this

net use H: /delete /y
net use H: \\server01\%username%

What could i use in vbs that would do the same function %username% does?

Thank you for your help!
0
Comment
Question by:mscit
2 Comments
 
LVL 6

Accepted Solution

by:
Sid_F earned 2000 total points
ID: 36959496
.MapNetworkDrive "H:", "\\server01\" & .UserName

There is a good article here mapping the same drives but with different methods such as batch , vbs etc

http://www.robvanderwoude.com/loginscripts.php
0
 

Author Closing Comment

by:mscit
ID: 36959502
Thanks So Much, this really helped me out.

Great link
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question