Saturday 15 February 2014

windows 7 - Net use works in batch file, fails in script -


We have a small office on desktop with a Linux Appliance Server (SMBA) and Win 7 HP. We have a machine that acts as a "backup server" and backs up the server overnight.

Is writing that a quick & amp; The dirty additional for backup scripts that would loop in such a way:

  a net use * / d / y b net use u: \\ oursverver \ userNn / u: userNN password c. Use Sync for sync to this user's storage space on backup server D: Repeat   

If I make up manually in a batch file, everything works fine (though , The process should be automated and tied in our existing backup scripts for several reasons.)

If a script creates the same batch file and runs it, the first user is logged in and synchronized, Ekin all the above net use attempts fail.

Similarly, if the script tries to map the drive through the code, then this message is received:

unrecognized network error # 183

The above error indicates that network drive / path is unavailable - but using the same parameter, the net usage command typed on the command line is successful.

"Backup Server" is a Win7HP box with UAC disabled. When CMD prompts are launched, all windows are before this term: Administrator: - However, when the script launches a command window to purge the drive to use There is a lack of that prefix in the CMD titlebar.

Any ideas / ideas?

Users to execute this code properly, having the proper certificate for doing so To automate this task, just use Task Scheduler and it should work properly.

No comments:

Post a Comment