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 connection not found. [exec] more available typing net helpmsg 2250. [exec]  [exec]  [exec]  [exec] c:\hudsonprojects\apps>set "source=d:/target/drop"  [exec]  [exec] c:\hudsonprojects\apps>set "target=p:/c:/temp"  [exec]  [exec] c:\hudsonprojesystem error 5 has occurred. [exec]  [exec] access denied. 

if type net use local windows machine, showing:

\\cazrt\c$ command executed successful. 


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -