Saved Bookmarks
| 1. |
Solve : Loging on to another computer using dos in a network.? |
|
Answer» I have been doing files between my desktop and laptop using dos and occasionally forget to log on to one or the other outside of dos and it don't work. Depends upon what version your using and if its Dos in Windows or not.A laptop with DOS? Not likely, but possible... OP, do you mean BATCH (Command Prompt), as in like @echo off ?Here's what I got: File name: sink.cmd accessed through: start menu > sink.cmd, on my desktop computer rem add all new from/to DeskTop/LapTop robocopy c:\users\mrgardon\documents\ \\laptop\c\users"\don gardon"\documents\ /e /log:c:\users\mrgardon\desktop\sinklog.log robocopy \\laptop\c\users"\don gardon"\documents\ c:\users\mrgardon\documents\ /e /log+:c:\users\mrgardon\desktop\sinklog.log rem robocopy c:\users\mrgardon\pictures\ \\laptop\c\users"\don gardon"\pictures\ /e /log+:c:\users\mrgardon\desktop\sinklog.log rem robocopy \\laptop\c\users"\don gardon"\pictures\ c:\users\mrgardon\pictures\ /e /log+:c:\users\mrgardon\desktop\sinklog.log pause Here's what I get if I'm loged into \\laptop on my wired net between the two computers: From the Dos Terminal window entitled: Select C:\Windows\system32\cmd.exe C:\Windows\system32>rem add all new from/to DeskTop/LapTop C:\Windows\system32>robocopy c:\users\mrgardon\documents\ \\laptop\c\users"\don gardon"\documents\ /e /log:c:\users\mrgardon\desktop\sinklog.log Log File : c:\users\mrgardon\desktop\sinklog.log C:\Windows\system32>robocopy \\laptop\c\users"\don gardon"\documents\ c:\users\m rgardon\documents\ /e /log+:c:\users\mrgardon\desktop\sinklog.log Log File : c:\users\mrgardon\desktop\sinklog.log ...leaving out the rem lines to save some space C:\Windows\system32>pause Press any key to continue . . ._ and a txt file on my desktop entitled: sinklog.log The gist of all which MEANS "it worked." However if I'm not loged into the \\laptop and run the same file "sink.cmd," here's what I get: From Dos Terminal Window: C:\Windows\system32>rem add all new from/to DeskTop/LapTop C:\Windows\system32>robocopy c:\users\mrgardon\documents\ \\laptop\c\users"\don gardon"\documents\ /e /log:c:\users\mrgardon\desktop\sinklog.log Log File : c:\users\mrgardon\desktop\sinklog.log _ To which I ^c and get: ^CTerminate batch job (Y/N)? To which I "y" and the window closes. and From sinklog.log on my desktop: ------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows ------------------------------------------------------------------------------- Started : Sun Aug 09 15:13:20 2009 2009/08/09 15:13:24 ERROR 1326 (0x0000052E) Getting File System Type of Destination \\laptop\c\users\don gardon\documents\ Logon failure: unknown user name or bad password. Source : c:\users\mrgardon\documents\ Dest - \\laptop\c\users\don gardon\documents\ Files : *.* Options : *.* /S /E /COPY:DAT /R:1000000 /W:30 ------------------------------------------------------------------------------ 2009/08/09 15:13:24 ERROR 1326 (0x0000052E) Accessing Destination Directory \\laptop\c\users\don gardon\documents\ Logon failure: unknown user name or bad password. Waiting 30 seconds... Retrying... 2009/08/09 15:13:55 ERROR 1326 (0x0000052E) Accessing Destination Directory \\laptop\c\users\don gardon\documents\ Logon failure: unknown user name or bad password. Waiting 30 seconds... Retrying... Now if I log into \\laptop outside dos using Windows Explorer and restart sink.cmd all goes fine as detailed above. So I would like to add a line to sink.cmd that would log me into \\laptop with a user name and password. Now I'm just guessing at this but the error says "Logon failure:" which I'm hopeing means that it 'tryed' to logon but FAILED, leading me to believer there is a 'way' to log in via dos. Just wondering what that 'way' would be? System Info: DeskTop: Microsoft Windows [Version 6.0.6002] Microsoft® Windows® Operating System Version 11.0.6000.6324 Windows Vista Home Premium Service Pack 2 (build 6002) Acer Aspire L5100 R01-A4 LapTop: Acer Aspire 7520 V1.31 Windows Vista Home Premium (build 6000) Microsoft Corporation - Windows Version 1.0.0.1 From: dos >ver Microsoft Windows [Version 6.0.6000] Noticed while snooping around for system info a dos command 'WMIC.' Inside '>help wmic' I noticed switches /user and /password amoung others. Will snoop around the net and see what that's all about but untill then appreciate any help you can give me.Google wmic and click the first link. It should be what you are talking about. Oh and Patio, if you have the time to post the code for remote logon (via LAN) for windows xp pro (if there is a difference with that and vista [the OP's computer]). Quote from: Helpmeh on August 09, 2009, 10:42:39 AM A laptop with DOS? Not likely, but possible... I have two laptops running PC-DOS...Here's what I did... Wrote this here thing I call: rem Test of Dos WMIC.cmd file: wmic /node:laptop /user:"my name" /password:mypassword robocopy c:\WMICTest\ \\laptop\c\WMICTest\ /e /log:c:\users\mrgardon\desktop\sinklog.log robocopy \\laptop\c\WMICTest\ c:\WMICTest\ /e /log+:c:\users\mrgardon\desktop\sinklog.log pause adding one directory and one file "wmictest" from C: to \\laptop and it didn't work but got this stuff from the Dos Terminal Window & Sink Log: Dos Terminal Window: C:\Windows>rem wmic /node:laptop /user:"my name" /password:mypassword C:\Windows>robocopy c:\WMICTest\ \\laptop\c\WMICTest\ /e /log:c:\users\mrgardon\ desktop\sinklog.log Log File : c:\users\mrgardon\desktop\sinklog.log Sink Log: ------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows ------------------------------------------------------------------------------- Started : Sun Aug 09 23:13:02 2009 2009/08/09 23:13:02 ERROR 1326 (0x0000052E) Getting File System Type of Destination \\laptop\c\WMICTest\ Logon failure: unknown user name or bad password. Source : c:\WMICTest\ Dest - \\laptop\c\WMICTest\ Files : *.* Options : *.* /S /E /COPY:DAT /R:1000000 /W:30 ------------------------------------------------------------------------------ 2009/08/09 23:13:04 ERROR 1326 (0x0000052E) Accessing Destination Directory \\laptop\c\WMICTest\ Logon failure: unknown user name or bad password. Waiting 30 seconds... So then I Loged into the LapTop outside of DOS, ran this with wmic rem'd out: rem Test of Dos WMIC.cmd file: rem wmic /node:laptop /user:"my name" /password:mypassword robocopy c:\WMICTest\ \\laptop\c\WMICTest\ /e /log:c:\users\mrgardon\desktop\sinklog.log robocopy \\laptop\c\WMICTest\ c:\WMICTest\ /e /log+:c:\users\mrgardon\desktop\sinklog.log and got what I was looking for, one directory & one file added to the LapTop Now I have tryed: "wmic /node:laptop /user:"my name" /password:mypassword" at the command prompt dos without encountering an error. My delight at a successful run of the 'Test of Dos WMIC.cmd' file with the WMIC rem'd out and error free test at the command prompt of the 'wmic...' line is only tempered by the fact that "THE GOD *censored* THINGS DON'T RUN TOGETHER." So as the time is late I'll put this on the net and worry about it sometime long after the crack of dawn. Ain't retirement great? Thanks again for your help. |
|