Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Mapping drives with a startup batch - Wi-Fi network...  (Read 2599 times)

0 Members and 1 Guest are viewing this topic.

raikko

  • Guest
Mapping drives with a startup batch - Wi-Fi network...
« on: August 28, 2007, 02:14:13 AM »
Hi,

This is driving me crazy.

I have a home network with 2 desktop PCs (Ethernet, WInXP Home) and a laptop PC (Wi-Fi, WInXP Home), all connected through a Linksys WRT54G router, and a small Synology file server.

5 shares are specified on this server. I want all  PCs to automatically map these shares as network drives on WinXP startup. I created a batch file containing 5 lines like this one :

net use Z: \\DiskStation\shared_folder password /user:username /persistent:yes

(Even with "persisent", I have to execute the batch after each startup, as otherwise the drives are just mapped but not connected -- they appear as "disconnected network drives")

I've put the .bat in Documents And Settings\All Users\Menu Démarrer\Programmes\Démarrage (sorry this is in French, it's the startup folder of the Start menu). This works absolutely fine on the Ethernet PCs.

Now, on my laptop, the booting of the computer is a bit longer, and unfortunately the .bat file is executed before the wi-fi connection is established, so the drives do not connect.

Therefore, I needed a way to delay the execution of the .bat file. I've tried several solutions :
-Using Wait.exe
-Inserting this line at the beginning of the .bat file : ping 1.1.1.1 -n 1 -w 60000 >NUL
-Doing the same as above, but with two batches : the 1st lauching the 2nd one after a delay

All these solutions do not work : it seems that the wi-fi driver waits until the startup batch is fully executed before establishing the wifi connection. Normally, my computer only needs 3 or 4 minutes to complete startup. I even tried delaying the execution by 10 minutes, and it's the same : the wifi connection is established only after 10 minutes.  This is not quite what I wanted to do!

Any idea?