Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 779451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:55:46+00:00 2026-05-14T19:55:46+00:00

I’m finally set up to be able to work from home via VPN (using

  • 0

I’m finally set up to be able to work from home via VPN (using Shrew as a client), and I only have one annoyance. We use some batch files to upload config files to a network drive. Works fine from work, and from my team lead’s laptop, but both of those machines are on the domain. My home system is not, and won’t be, so when I run the batch file, I get a ton of “invalid drive” errors because I’m not a domain user.

The solution I’ve found so far is to make a batch file with the following:

explorer \\MACHINE1
explorer \\MACHINE2
explorer \\MACHINE3

Then manually login to each machine using my domain credentials as they pop up. Unfortunately, there are around 10 machines I may need to use, and it’s a pain to keep entering the password if I missed one that a batch file requires.

I’m looking into using the answer to this question to make a little C# app that’ll take the login info once and login programmatically. Will the authentication be shared automatically with Explorer, or is there anything special I need to do? If it does work, how long are the credentials cached?

Is there an app that does something like this automatically?

Unfortunately, domain authentication via the VPN isn’t an option, according to our admin.

EDIT: If there’s a way to pass login info to Explorer via the command line, that would be even easier using Ruby and highline.

EDIT: In case anyone else has the same problem, here’s the solution I wound up using. It requires Ruby and the Highline gem.

require "highline/import"

domain = ask("Domain: ")
username = ask("Username: ")
password = ask("Password: ") { |q| q.echo = false }

machines = [
    '\\MACHINE1\SHARE', 
    '\\MACHINE2\SHARE', 
    '\\MACHINE3\SHARE', 
    '\\MACHINE4\SHARE', 
    '\\MACHINE5\SHARE'
]
drives = ('f'..'z').to_a[-machines.length..-1]

drives.each{|d| system("net use #{d}: /delete >nul 2>nul"); }

machines.zip(drives).each{|machine, drive| system("net use #{drive}: #{machine} #{password} /user:#{domain}\\#{username} >nul 2>nul")}

It’ll figure out how many mapped drives I need, then start mapping them to the requested shares. In this case, it maps them from V: to Z:, and assumes I don’t have anything shared with those drive letters.

If you already have an Explorer window open to one of the shares, it may give an error, so before I ran the Ruby script, I ran:

net use * /delete

That cleared up the “multiple connections to a share not permitted” error, and allowed me to connect with no problems.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:55:47+00:00Added an answer on May 14, 2026 at 7:55 pm

    You could create a batch file that uses “NET USE” to connect to your shares. You’d need to use a drive letter for each share, but it’d be super simple to implement.

    Your batch file would look like this:

    net use h: \\MACHINE1 <password> /user:<domain>\<user>
    net use i: \\MACHINE2 <password> /user:<domain>\<user>
    net use j: \\MACHINE3 <password> /user:<domain>\<user>
    

    UPDATE

    Whether the connection remains or not depends upon what you specified for the /persistent switch. If you specified yes, then it will attempt to reconnect upon your next logon. If you specified no then it won’t. The worrying this is the documentation says that it defaults to the value that you used last!

    If you specified no, the connection will remain until you next reboot. If you drop your VPN connection the drive would be unavailable (but if you reconnect to the VPN the drive should be available as long as you haven’t removed it).

    I don’t know of a way to use it without mapping to a drive letter, the documentation would lead you to believe that it isn’t possible.

    I understand your problem, that you’re just trying to give explorer the correct credentials so it stops nagging you with login boxes. Using mapped drives though not perfect will at least alleviate your pain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of posts stored in text files formatted in yaml/textile (from
I'm making a simple page using Google Maps API 3. My first. One marker
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.