I have a batch script that among other things, maps a network drive using syntax similar to this:
Net use Z: \\192.168.200.10\dog$ /USER:dog-pc\cat C9d!42$%
When I execute the script, I get a "logon failure unknown username or password" error.
When I type the syntax (exactly the same as the batch script) into a command prompt, the command executes successfully and the shared folder is mapped.
What am I doing incorrectly that is preventing the batch script from working successfully?
To add to that.... the ! shouldn't be an issue unless you have setlocal enabledelayedexpansion used in the batch. If so I don't know a way that you can use ! but if not using the above then just doubling the % to %% should do it.
Steve