batch file - Windows access denied error message on using net use -
i having following issue when try use net use using batch file configured in hudson . i added test user administrator in remote windows server 2012 , set password. my batch script: net use p: /delete net use p: "\\cazrt\c$" /user:test /persistent:no xxxxx set "source=%~1" set "target=p:/%~2" echo "%source%" "%target%" echo f|xcopy /s /i /q /y "%source%" "%target%" output on execution: [exec] c:\hudsonprojects\nga>net use p: /delete [exec] [exec] c:\hudsonprojects\apps>net use p: "\\cazrt\c$" /user:test /persistent:no xxxxx [exec] system error 5 has occurred. [exec] [exec] access denied. if try use net use without persistent , same access denied error , network connection not found. output on execution: [exec] c:\hudsonprojects\nga>net use p: /delete [exec] [exec] c:\hudsonprojects\apps>net use p: "\\cazrt\c$" /user:test xxxxx [exec] network connect...