How Do I Use a Username/Password to Log in To a File Share using VBS?

Posted on 2004-10-26
Last Modified: 2010-04-17
I have a script that pulls hardware and software information out of the computer and then stores that information in a file on a remote file share. The problem is, I need to incorporate a username and password into the VB Script. That way I won't have to make the file share wide-open to everyone. I know someone could just pull the username/password out of the script, but it's better than nothing. The files aren't THAT important, but I still would like to keep a minimal amount of security. Here is a link to my script:

Question by:Grime121
    1 Comment
    LVL 23

    Accepted Solution

    How about a NET USE with the desired credentials, then just copy the file(s) to the USEd drive letter.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Cisco Complete Network Certification Training

    If you’re an IT engineer or technician, it's time you take your career to the next level. This elite training bundle is brimming with all of the information you need to learn to sit for Cisco CNNA, CCNP, and CCENT certification exams.

    Suggested Solutions

    Title # Comments Views Activity
    map interface methods 3 35
    Changing the installation path of this MSI 5 60
    Excel object stays open 19 41
    countPairs challenge 7 16
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    857 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now