• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

VBS / Windows =>Vista explorer oddity

Sorry for the bizarre subject line, I'll try to explain it.

I have a VB script I've written which normally works perfectly well - it fires up robocopy and copies a user's profile onto a memory stick.

Today I wanted a bit more from it, so I used a bit of code off the Internet for elevating the script's privileges:

http://www.winhelponline.com/articles/185/1/VBScripts-and-UAC-elevation.html

The script works, it now copies the whole Users folder onto the memory stick. However, (and I have seen this sort of weird behaviour before in Windows, but not this specifically), I told robocopy to copy the Users folder into a completely different folder name on the stick (in this case "Laptop - backup". The robocopy log even says the destination name is what I would expect it to be, but when I look at the memory stick in explorer, the folder name comes up as 'Users' (this is on Vista, on the laptop in question).

I plugged the memory stick into my machine (Win7) and explorer does the same thing.

On both machines, if I use a command prompt to query the contents of the memory stick, it has the correct folder name.

Any ideas how I can get around Windows doing this very strange thing? One thought that springs to mind is to throw in an extra bit of folder structure on the memory stick before the backup destination location.

- edit - I tried out my idea and it worked. I just wish I knew why MS programmed in this bizarre bit of behaviour. I can understand another one I'm aware of, such as going into another user's folder, say the user is Kevin, then his documents folder on XP is labelled "Kevin's Documents" in explorer despite the folder name being "My Documents".
 
Last edited:
Back
Top