cancel
Showing results for 
Search instead for 
Did you mean: 

Executing Windows Net Use Command to Map Drive

ctz9843
Level 4
Hello,

I have an action that launches the command prompt and then executes the Windows net use command to map a drive. The password was updated to contain special characters and the command now throws a "The filename, directory name, or volume label syntax is incorrect" error.  I believe the error is due to the special charters contained in the password.  Does anyone have any ideas on how to escape them or another way to to execute the net use command? 

net use a:\\share /user:user password

If I run the command in the "Run" window it works fine, so there is something about it that CMD does not like.  If necessary, I could develop a new object to use the Run window.  Please let me know your thoughts.

------------------------------
Dan Svantner
Application Architect
US Steel
America/New_York
------------------------------
1 BEST ANSWER

Helpful Answers

JerinJose
Level 10
rename files to Map Networkdrive.bprelease Disconnect Drive.bat and DriveMapp.bat

------------------------------
Jerin Jose
Technical Product Owner
EY
Asia/Kolkata
*"If you find this post helpful mark it as best answer, .*
------------------------------

View answer in original post

3 REPLIES 3

ewilson
Staff
Staff
@Dan Svantner,

Take a look at this article:

https://ss64.com/nt/syntax-esc.html

You may also need to enclose the password in double quotes.

Cheers,


------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

JerinJose
Level 10
Hi Dan,

here is a solution i did long back attached are bp release file, and two argument parsed batch scripts. 

NB: Exported from bp version 7

------------------------------
Jerin Jose
Technical Product Owner
EY
Asia/Kolkata
*"If you find this post helpful mark it as best answer, .*
------------------------------

JerinJose
Level 10
rename files to Map Networkdrive.bprelease Disconnect Drive.bat and DriveMapp.bat

------------------------------
Jerin Jose
Technical Product Owner
EY
Asia/Kolkata
*"If you find this post helpful mark it as best answer, .*
------------------------------