Hello All,
I've got a special kind of query ...
.... the user has a laptop (xp home) which connects to a wireless network ...
my program's main data files reside on a different computer, but when the
laptop is take away from the network, the user wants to be able to access
the data on it. So i thought to put in some logic in a .vbs file, run on the
laptop when the program is started, that says:
map f: drive to network path
if NOT then map to local path
[CODE]
on error resume next
Set XNetwork = WScript.CreateObject("WScript.Network")
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.DriveExists("F") Then
'Drive F Exists, remove.
XNetwork.RemoveNetworkDrive "F:"
End If
XNetwork.MapNetworkDrive "F:", "\\ServerComputer\data"
XNetwork.MapNetworkDrive "F:", "\\127.0.0.1\data"
[END CODE]
This works on my own pc (xp pro), but does not on the laptops.
I'm wondering if there is a different way that will enable me to better
understanding how to map a drive ... maybe hard-code it into something? i'm
only new to windows manipulation, so any help is greatly appreciated.
Thanks for the time,
Stuart Andrews
|