Networking in Windoze 7

The place for hardware and software issues, FS and non-FS related

Moderators: Guru's, The Ministry

User avatar
TSR2
The Ministry
Posts: 16347
Joined: 17 Jun 2004, 14:32
Location: North Tyneside, UK
Contact:

Re: Networking in Windoze 7

Post by TSR2 »

What happens if you copy the commands from the batch file and paste them straight into the command prompt? Do they run? Can you paste the commands here (remembering to remove username and password) :)
Ben.:tunes:

ImageImageImage

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Networking in Windoze 7

Post by rohan »

Ben,
Same result - in fact, the only way to see what's happening is to paste a few lines and run the commands manually; otherwise the window opens and closes before you can blink. The batch files are simply collections of three basic commands - a net use delete in case the mapped drive letter is already in use; a net use to map the drive; and a robocopy to backup a folder to the NAS or get the latest file versions from the NAS. I'll have to paste the actual commands tomorrow when I'm back on the PC.

Thanks again,
Ro
:bandit:

rohan
Trident
Trident
Posts: 362
Joined: 05 Apr 2008, 12:15

Re: Networking in Windoze 7

Post by rohan »

OK,
all my batch files use combinations of these three commands -

- IF EXIST Q:\. net use Q: /DELETE

- net use Q: \\IPaddress\bin "password"

- robocopy "C:\bin" "Q:bin\Air7" *.* /MIR /E /NP /Z /LOG:Q:\bin\logs\refresh.Air7.bin.140722.log

This arvo I recalled an old saying we had at work - if you've a problem with Win7 (nee Vista) then look at the permissions first. That was the case here, or more specifically the user context. For the last few days, I've been running a few commands in a DOS prompt window, and the result was a big fat failure despite appearing to offer the correct credentials. The problem was that this so-and-so was running that window as admin, whereas when I simply mapped a drive in Computer I was running as myself.

Today I added a "/USER:name" to the net use command above (which I had not previously realised I could do) and the drive was mapped AOK, though that did bring out another strange issue on which more later. Then I tried a simple DOS window (that is not as admin) and everything worked fine, as did all the batch file extracts that I ran - connecting, disconnecting, creating a log file on the NAS and copying files and folders - the mapped drive even appeared in Computer.

The new issue is that adding the user phrase in the DOS admin window, while it allows everything to work as expected, creates a mapped drive that is NOT visible in Computer. Similarly, creating the mapped drive in Computer means it isn't visible (accessible) in the DOS window. It's actually logical once you get your head around the context thing in the world of objects - the point being that those two contexts are NOT actually the same, despite the fact that both work.

The thing I still don't understand is why none of this worked when I first tried it last year, though at that time I didn't know about /USER, but then Win7 on that PC doesn't always seem to work the same as it does on this PC. One more reason why that PC is going to be reborn.

So the remaining issues are that I can't rename the network in which this new cable connection resides, and I can't change the network type assigned to this network. The latter is actually public network so my thinking yesterday was incorrect. The only reason I'm still concerned about this is the effect that network type has on permissions, as I don't really want to suddenly find something doesn't work quite right somewhere down the road. If you can offer any insight on how to change these things, I'd really appreciate it.

And tomorrow's new task is to install Synology Assistant under OSX ...

Thanks again for your help so far,
regs,
Ro
:RN:

Post Reply