Drive mapping - Manually via command prompt works but same syntax fails via batch file
Running Windows 7 Pro (64 bit) and trying to map drives via a simple batch file that can be executed when needed. Connecting via PPTP VPN to a SBS2003 (SP1) - the Win7 machine is not joined to the domain I can successfully map drives using NET USE manually typed via a non-elevated command prompt, but when I run the SAME syntax via a batch file it fails. I had to disable UAC in order to get any drive mapping to work. Syntax: net use w: \\server IP\sharename /USER:DOMAIN.local\username password I am using a fairly long password with upper/lowercase, numbers and characters such as ! \ = % Could these characters be causing the problem? The fact I can manually type the command in via a command prompt and it works beautifully suggests there is something else going on. I have also tried enclosing the password with "" but that didn't work either. I have also experimented with the NTLM auth level settings via gpedit.msc. It is currently set to 'send LM & NTLM - use NTLMv2 session security if negotiated' Also, HKLM\System\CCS\Control\Lsa has 'LmCompatibilityLevel' DWORD set to 1 An insight is appreciated! Thanks.
January 2nd, 2010 6:40am

What are the contents of the batch file? Does the issue occur if the batch file only contains that command? Do you run the batch file manually or via any programs? Please let us know.Arthur Xie - MSFT
Free Windows Admin Tool Kit Click here and download it now
January 6th, 2010 11:48am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics