cygwin에서 'net use'명령을 자동화해야합니다.cygwin에서 net use를 사용할 수 없습니까?
명령은 'net use/user : "name"\ somewhere'입니다. ''prosseek '에 연결할'이름 '의 암호를 입력하십시오 :'암호를 입력해야합니다.
명령 줄 입력 및 배치 파일 내에서 실행할 때 잘 작동합니다. 다음과 같이 expect 스크립트를 만들 때 작동하지 않습니다. 다음과 같이
spawn net use /user:"name" \\prosseek\somewhere expect "Enter the password for 'name' to connect to 'prosseek':" send "password\n" interact
나는 오류 메시지가 표시됩니다.
spawn net use /user:"name" \prosseek\somewhere System error 67 has occurred.The network name cannot be found.
send: invalid spawn id (4) while executing "send "password\n"" (file "conpros" line 9)
- Q : 잘못된 것일까요?
- Q : 'net use'와 같은 일부 명령은 cygwin/expect에서 작동 할 수 있습니까?
당신에게 \ prosseek \ 어딘가에 둘러 볼 수 있습니다 :
여기