Considering that the system may be wanting to use its logged-in user in the authentication of the command, I can suggest that you try 1x using the password of the logged-in user, not the one you intend to use in the command, if you confirm what I understand, is below a suggestion as an alternative to try to circumvent this event:
É possível usando o SendKey (VBS) para enviar os dados de entrada
Abaixo um exemplo usando telnet com inserção de dados
Only replace on the lines below the respective values to the variables:
[_usuario_] [_senha_] [_cmd_]
set "_usuario_=user-x" & set "_password_=password-y"
set "_cmd_=copy 192.168.203.130 ebsout*. txt c: wamp www SIG /y"
@echo off & setlocal enabledelayedexpansion & mode 60,20 & color 9F
echo/INICIO VENDAS & echo/ & mode con cols=77 lines=30
set "_usuario_=cisco_user" & set "_senha_=4LoCk007XSwT001"
set "_cmd_=telnet.exe 192.168.0.254"
>"%temp%\_temp_file_4vbs_.vbs"^
(
echo/ Set WshShell = WScript.CreateObject^("WScript.Shell"^)
echo/ Set objShell = WScript.CreateObject^("WScript.Shell"^)
echo/ StrPwd = "!_senha_!"
echo/ StrUser = "!_usuario_!"
echo/ for i=1 To Len^(StrUser^)
echo/ x = Mid^(StrUser,i,1^)
echo/ WshShell.SendKeys x
echo/ Wscript.Sleep 250
echo/ Next
echo/ Wscript.Sleep 500
echo/ WshShell.SendKeys "({ENTER})"
echo/ for j=1 To Len^(StrPwd^)
echo/ x = Mid^(StrPwd,j,1^)
echo/ WshShell.SendKeys x
echo/ Wscript.Sleep 200
echo/ Next
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "({ENTER})"
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "dir"
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "({ENTER})"
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "exit"
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "({ENTER})"
echo/ Wscript.Sleep 200
echo/ WshShell.SendKeys "({ENTER})"
)
set "_temp_vbs=%temp%\_temp_file_4vbs_.vbs" & start "" /b !_cmd_!
@"%Windir%\System32\cScript.exe" //nologo "!_temp_vbs!" <nul & del /q /f "!_temp_vbs!" & goto :eof
Have you ever tried something like
NET USE X: \\IP do Servidor\PASTA senha /USER:usuario /PERSISTENT:NO
?– user28595
@diegofm tested this command and gave the error: "The specified network password is not correct", even though the password is correct. I’ll try to download both servers to see what happens.
– Diego