/build/static/layout/Breadcrumb_cap_w.png

Scripting Question


%username% in a bat file

02/25/2016 638 views

So my question is with mapping a users home drive with a bat file.

If I run the command from a cmd prompt works

NET USE H: \\Servername\Home$\%username%

If I put this command in a bat file and run the bat file with a pause at the end I can see that I am getting a system error 67 network path not found.

What am I missing?

4 Comments   [ + ] Show comments

Comments

  • how are you executing the batch file?
  • Just testing currently. Logged into server as Administrator and double clicking the bat file.
  • try %%username%%
  • Thanks for the reply's. I am not sure what I did to fix other than deleting the original bat file and re-typing it. I am now mapping the specific folder on the hidden user share. This exercise was to allow a user to run this from Parallels RAS as an app and have access to their network home drive files.

Be the first to answer this question

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ