PC Review


Reply
Thread Tools Rate Thread

drive mapping logic

 
 
Stuart Andrews
Guest
Posts: n/a
 
      2nd Feb 2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sharing drive and mapping drive letter via script John Windows XP General 3 25th Sep 2007 12:17 AM
Sharing drive and mapping drive letter via script John Windows XP Setup 3 25th Sep 2007 12:17 AM
I have a Maxtor model 90650U2 hard drive (6.4 GB) that I think hasa defective logic board. This HD was used in a Compaq computer, and I thinLookingfor HD logic board Ken DIY PC 0 5th Oct 2004 06:13 PM
Drive mapping - Drive sharing - whats the difference ? admiral_victory@iol.ie Windows Networking 1 10th Dec 2003 10:48 PM
US Logic USB Drive Crashes ME Gary Brown Computer Hardware 3 1st Nov 2003 02:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.