Pass username and password to the batch file for net use cmd

  • I'm in trouble because I couldn't pass user credentials to the batch file after successful openvpn logon.
    My remote users authenticate by ldap. At the beginning they need to provide username and password. I have also script which runs after connection have been established. Inside the script there is a simple net use command (drive mapping). Unfortunately I don't know how to reuse username and password provided before inside the script?
    Network share name and IP address are visible from the client computer.
    What should I do to avoid entering user credentials twice (for openvpn and network drive)?

Log in to reply