Results 1 to 9 of 9

Thread: Run a .exe (WOL script) when you click on a network mapped drive?

  1. #1
    Senior Member
    Join Date
    Nov 2007
    Posts
    423
    Thanks
    63
    Thanked
    18 times in 17 posts
    • GaryRW's system
      • Motherboard:
      • Gigabyte P35C DS3R
      • CPU:
      • Q6600 @ 3ghz
      • Memory:
      • DDR2 4gb
      • Storage:
      • Samsung Spinpoint F1 1TB
      • Graphics card(s):
      • 8800GT
      • PSU:
      • Corsair HX520w
      • Case:
      • Antec P182
      • Operating System:
      • Win 7
      • Monitor(s):
      • Samsung 2032BW

    Question Run a .exe (WOL script) when you click on a network mapped drive?

    Ok I have just worked out how to use wake-on-lan to wake up my main PC from my wife's PC, and from XBMC as well . on the xbox, I can run the python WOL script when xbmc starts up, so I instantly have access to media stored on my computer.

    I would like something similarly transparent on my wife's pc. At the moment, there is simply a shortcut to mc-wol.exe (http://www.matcode.com/wol.htm) on her desktop which she has to double click to wake up my PC that has all our photo's stored on it.

    Now admittedly it's not a major hassle to double click a shortcut, but it would be nice to have that run automatically just when she clicks on the network drive in my computer. Can anybody think of any elegant solution to do this??

    I guess I could run the exe on startup which would wake up my PC when she turns hers on, but she doesn't always need access to the photos. As I've come up with this wake on lan plan as opposed to an always on NAS/file server sucking up electricity all the time, it'd be nice to only wake my computer up when she actually wants access to the network drive.

    And yes, I know the simplest solution is to ask her to walk into the other room and turn my pc on when she needs it

  2. #2
    Are you Junglin' guy? jamin's Avatar
    Join Date
    Jul 2003
    Location
    Sunny Southend On Sea
    Posts
    921
    Thanks
    17
    Thanked
    11 times in 10 posts

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    You could always script a cheeky batch file. Start notepad use the follwing text:

    C:\\path to exe\mc-wol mac address

    Replace C:\\path to exe with the path to your mc-wol.exe and mac address with the mac of the target pc.

    Save as WOL.bat or whatever. Now when you double click it it should wake the remote pc.

    You could always insert the above into a logon script so it executes and wakes the other pc as your missus logs in.

    There are more complicated ways but I cba at the mo! lol!

    My Nas uses virtually no power if its not being accessed. Nas would suit you better mate in the long run.
    Beer is life, life is good!

  3. #3
    SiM
    SiM is offline
    Senior Member
    Join Date
    Apr 2006
    Location
    London
    Posts
    7,787
    Thanks
    299
    Thanked
    630 times in 419 posts
    • SiM's system
      • Motherboard:
      • P5K Premium
      • CPU:
      • Q6600
      • Memory:
      • 8GB PC2-6400 OCZ ReaperX + Platinum
      • Storage:
      • 3 x 320gb HD322HJ single platter in Raid 0
      • Graphics card(s):
      • PNY GTX285
      • PSU:
      • Corsair TX650W
      • Case:
      • Antec 1200
      • Monitor(s):
      • 2407-HC

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    The batch file method works very well, it is how I do it

  4. #4
    Senior Member
    Join Date
    Nov 2007
    Posts
    423
    Thanks
    63
    Thanked
    18 times in 17 posts
    • GaryRW's system
      • Motherboard:
      • Gigabyte P35C DS3R
      • CPU:
      • Q6600 @ 3ghz
      • Memory:
      • DDR2 4gb
      • Storage:
      • Samsung Spinpoint F1 1TB
      • Graphics card(s):
      • 8800GT
      • PSU:
      • Corsair HX520w
      • Case:
      • Antec P182
      • Operating System:
      • Win 7
      • Monitor(s):
      • Samsung 2032BW

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    thanks chaps. I've never got into batch files but I'll have a play

    A nas/fileserver is definitely on the cards long term. Before I thought about WOL I did have a build in mind - something like a AMD sempron or 5050e (possibly underclocked - i'd borrow a mates power meter to see whether it actually made any difference), a 740g/780g motherboard etc... I did look at atom based boards but couldn't find any with >2 sata sockets and gigabit. Plus you can only get atom + 945 chipset at the moment which apparently is nowhere near as low power as atom itself. Maybe I'll look at what atom boards come out over the next 6 months or so.

    In any event, we've another little 'un on the way, so not spending cash I don't need to is probably a good idea

    Soooooo.... This is a temporary fix. I did think it'd be too much to ask of something linked to clicking on the network share itself, but would've been chuffed if it was possible. When she logs on is almost as good - can you set batch files to run when her computer comes out of sleep?

    google here I come!

  5. #5
    Senior Member
    Join Date
    Nov 2007
    Posts
    423
    Thanks
    63
    Thanked
    18 times in 17 posts
    • GaryRW's system
      • Motherboard:
      • Gigabyte P35C DS3R
      • CPU:
      • Q6600 @ 3ghz
      • Memory:
      • DDR2 4gb
      • Storage:
      • Samsung Spinpoint F1 1TB
      • Graphics card(s):
      • 8800GT
      • PSU:
      • Corsair HX520w
      • Case:
      • Antec P182
      • Operating System:
      • Win 7
      • Monitor(s):
      • Samsung 2032BW

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    Jamin - I meant to ask - your avatar is from Human Traffic isn't it?

  6. #6
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    why not do this in your bat file:

    Code:
    C:\\path to exe\mc-wol mac address
    explorer \\YOUR_PC\FOLDER_TO_SHARE
    and use that instead of clicking on the network share within windows?

    how long does it take from the wol exe file running to your pc being accessible? you could always add a (crude) timer like:

    PING 1.1.1.1 -n 1 -w 60000 >NUL

    (wait 60 seconds before timing out) in between the mc-wol and the explorer line

  7. Received thanks from:

    GaryRW (03-02-2009)

  8. #7
    Senior Member
    Join Date
    Nov 2007
    Posts
    423
    Thanks
    63
    Thanked
    18 times in 17 posts
    • GaryRW's system
      • Motherboard:
      • Gigabyte P35C DS3R
      • CPU:
      • Q6600 @ 3ghz
      • Memory:
      • DDR2 4gb
      • Storage:
      • Samsung Spinpoint F1 1TB
      • Graphics card(s):
      • 8800GT
      • PSU:
      • Corsair HX520w
      • Case:
      • Antec P182
      • Operating System:
      • Win 7
      • Monitor(s):
      • Samsung 2032BW

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    Thanks streetster. I've been googling since and had got so far as the idea of running explorer after the WOL magic packet in the batch file

    Now all i've got to figure out is how to add a shortcut which runs the batch file as a network drive in windows xp...

    Now I know this is going to be a bad idea, but looking in RegEdit, I've found the hkey_current_user\network setting, which has the network mapped drives. I assume that changing the remotepath setting (currently set to "\\Home\Shared Pics") to point to the shortcut instead of a folder will cause problems and unlikely to work? I guess I could just try, but obviously a bit wary or messing about with the registry as I clearly don't know what I'm doing

    Is creating a restore point good enough before playing with the registry like this??

  9. #8
    cat /dev/null streetster's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    4,138
    Thanks
    119
    Thanked
    100 times in 82 posts
    • streetster's system
      • Motherboard:
      • Asus P7P55D-E
      • CPU:
      • Intel i5 750 2.67 @ 4.0Ghz
      • Memory:
      • 4GB Corsair XMS DDR3
      • Storage:
      • 2x1TB Drives [RAID0]
      • Graphics card(s):
      • 2xSapphire HD 4870 512MB CrossFireX
      • PSU:
      • Corsair HX520W
      • Case:
      • Coolermaster Black Widow
      • Operating System:
      • Windows 7 x64
      • Monitor(s):
      • DELL U2311
      • Internet:
      • Virgin 50Mb

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    Quote Originally Posted by GaryRW View Post
    Thanks streetster. I've been googling since and had got so far as the idea of running explorer after the WOL magic packet in the batch file
    No worries

    Now all i've got to figure out is how to add a shortcut which runs the batch file as a network drive in windows xp...
    I'm not sure what you mean by this? do you want to map "\\Home\Shared Pics" to, e.g. 'H:'

    if so you want to do this:

    net use h: "\\Home\Shared Pics"

    therefore your completed batch file would be something like:

    Code:
    c:\<path to the exe>\mc-wol.exe mac address
    PING 1.1.1.1 -n 1 -w 30000 >NUL
    net use h: "\\Home\Shared Pics"
    explorer h:
    which would wake your pc up, wait 30 seconds, and then map \\Home\Shared Pics to H: and then open it up in explorer

    Or do you want to do something more fancy?

  10. #9
    Senior Member
    Join Date
    Nov 2007
    Posts
    423
    Thanks
    63
    Thanked
    18 times in 17 posts
    • GaryRW's system
      • Motherboard:
      • Gigabyte P35C DS3R
      • CPU:
      • Q6600 @ 3ghz
      • Memory:
      • DDR2 4gb
      • Storage:
      • Samsung Spinpoint F1 1TB
      • Graphics card(s):
      • 8800GT
      • PSU:
      • Corsair HX520w
      • Case:
      • Antec P182
      • Operating System:
      • Win 7
      • Monitor(s):
      • Samsung 2032BW

    Re: Run a .exe (WOL script) when you click on a network mapped drive?

    No, what I'd like to do is be able to click on a network drive in when you've opened up my computer and have it wake up the pc by running the batch file.

    i.e. open my computer, see hard drives at the top, then CD drives etc... then the networked drives. If I could add a link under the networked drives section that actually runs the batch file, then it really would be nice - just click on the network drive, and it opens up the folder with maybe just a short delay.

    You should probably ignore me at this point, as I think I've realised that maybe I just want it to be as close to an always on NAS as it can be, and I've got to accept the fact that I haven't bought one yet :-)

    I'll maybe have a play with that registry setting when I'm feeling brave, but I'm betting it won't accept anything other than a folder, and won't work with an actual file or shortcut.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Network Storage Device
    By Whatsthisdo in forum Networking and Broadband
    Replies: 31
    Last Post: 14-11-2007, 03:37 AM
  2. Emulate network share as CD drive?
    By tfboy in forum Software
    Replies: 6
    Last Post: 19-02-2007, 11:47 AM
  3. Vista USB/network mapped drive question
    By kalniel in forum Software
    Replies: 0
    Last Post: 21-09-2006, 10:33 AM
  4. Network Drive Problem
    By mykey38 in forum Networking and Broadband
    Replies: 2
    Last Post: 28-07-2006, 12:02 PM
  5. Network Storage Drive
    By TomWilko in forum PC Hardware and Components
    Replies: 1
    Last Post: 25-07-2006, 01:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •