I wrote a very simple utility for a client that has multiple locations with databases for a single program. It allows them to choose which location they are at and it remaps the T: drive for them. In case it may be relevant, they are all windows 7 64bit computers using local accounts (non-domain).
Here is an excerpt of the script that is causing me problems:
DriveMapDel("T:")
Sleep(100)
DriveMapAdd("T:", "\\10.0.1.10\SHARE", 1, "administrator", "password")
DriveMapDel("T:")
Sleep(100)
DriveMapAdd("T:", "\\10.0.2.20\SHARE2", 1, "administrator", "password2")
The problem I am having appears to be more "cosmetic" than problematic.
After connecting to one of the offices, then running the program a second time to select another office the share is changed, but the name of the share stays the same. Meaning if you connect to "\\10.0.1.10\SHARE", that is the name displayed in Windows Explorer and the share you are connected to. If you run the program a second time to select another office "\\10.0.2.20\SHARE2" the connection changes to the 10.0.2.20 share, but the name in Windows Explorer remains "\\10.0.1.10\SHARE". Again, so far this doesn't appear to actually cause problems, but if I need to troubleshoot problems and I can't tell which share they are connected to it may create problems.
I have also tried changing the flag to 0 for both DriveMapAdd functions. Any feedback or suggestions would be appreciated.
Jesse
Here is an excerpt of the script that is causing me problems:
DriveMapDel("T:")
Sleep(100)
DriveMapAdd("T:", "\\10.0.1.10\SHARE", 1, "administrator", "password")
DriveMapDel("T:")
Sleep(100)
DriveMapAdd("T:", "\\10.0.2.20\SHARE2", 1, "administrator", "password2")
The problem I am having appears to be more "cosmetic" than problematic.
After connecting to one of the offices, then running the program a second time to select another office the share is changed, but the name of the share stays the same. Meaning if you connect to "\\10.0.1.10\SHARE", that is the name displayed in Windows Explorer and the share you are connected to. If you run the program a second time to select another office "\\10.0.2.20\SHARE2" the connection changes to the 10.0.2.20 share, but the name in Windows Explorer remains "\\10.0.1.10\SHARE". Again, so far this doesn't appear to actually cause problems, but if I need to troubleshoot problems and I can't tell which share they are connected to it may create problems.
I have also tried changing the flag to 0 for both DriveMapAdd functions. Any feedback or suggestions would be appreciated.
Jesse