/build/static/layout/Breadcrumb_cap_w.png

%username% in a bat file

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
  • how are you executing the batch file? - SMal.tmcc 8 years ago
  • Just testing currently. Logged into server as Administrator and double clicking the bat file. - ctrolz 8 years ago
  • try %%username%% - StockTrader 8 years ago
  • 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. - ctrolz 8 years ago

Answers (0)

Be the first to answer this question

 
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