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
