Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Run Program When Wifi Detected

  1. #1
    Maximum Bitrate djXternal's Avatar
    Join Date
    Jul 2004
    Location
    Tampa, FL
    Posts
    615

    Run Program When Wifi Detected

    Is There anyway of running a program using the command line when the computer connects to a specific wifi connection...

    I have map monkey log my trips and would like my syncronization program to run as soon as i pull in the driveway
    Debating on installing a carpc in my Jeep.....

  2. #2
    Maximum Bitrate Mad Ad's Avatar
    Join Date
    Oct 2004
    Location
    Hertfordshire UK
    Posts
    533
    good question ... im playing with replicators based on what ive found searching and want to auto replicate in the same way, infact both ways, car to home and certain folders home to car.

  3. #3
    Constant Bitrate
    Join Date
    Dec 2003
    Location
    Germany
    Posts
    207
    Well the simplest way to do it would be to have a scheduled script check every30 secs if SSID of the WiFi is the one of you home network and then run you sync script.

    I am sure there are tools out there that can do it. Maybe even ipconfig /all plus a decently set grep command will do the trick.
    Lilliput 7" TS TFT, ASRock K7VM2, Duron 1,3 GHz, 512 MB DDR RAM, 30 GB Seagate HDD @ 5.400 rpm, WLAN w/ 500mW booster, Toshiba Slimline DVD-ROM Drive, D-Link USB Radio

    Download the German Voicepack 1.0 for FreeDrive now!

  4. #4
    Variable Bitrate
    Join Date
    Nov 1999
    Location
    Ishoej, Denmark
    Posts
    310
    If you are using dhcp, ipconfig may be part of the way.

    you might be able to use the command ipconfig > presentState.txt

    This will put the state (ip address etc) into the text file.

    There are several batch processors out there which should allow you to search the result file (presentState.txt) for ie the gateway address. ie(The Norton Utilities v6.X, known as Batch Enhancer)
    Possibly the for command could be used to do this.

    If found commence your copy / move command.

    Hope this helps a bit.

  5. #5
    Raw Wave
    Join Date
    Jun 2004
    Location
    On the beach
    Posts
    2,223
    Personally, I'd check for a connection on the Wireless connection in XP and detect which SSID is in use, if correct then run the script, quite easy to do in VB/VBScript.

  6. #6
    ITL
    ITL is offline
    Maximum Bitrate ITL's Avatar
    Join Date
    Jul 2004
    Location
    Atlanta, GA
    Posts
    631
    I was working on some automation for work today and remember seeing a very short batch script someone had written to check for connection. If I find it again, I'll post the link. It's small enough that it could be set to run every couple of minutes. I don't think it would cause too much overhead since the script is so short (maybe 25 lines).
    CarPC #3: 99% Complete
    Pentium M 1.7Ghz, 1GB DDR2 RAM
    DVD/CD-RW installed in dash below monitor
    OEM LCD relocated for 7" Touchscreen
    Wi-Fi, GPS, PS2 controllers...
    500+ full albums
    4,000+ video games
    music videos, movies, & more!

    old carPC

  7. #7
    What can I say? I like serial. Curiosity's Avatar
    Join Date
    Mar 2004
    Location
    Florence Yall, BFKY
    Posts
    2,684
    Or JScript! This moves all files in a folder that don't exist on the homeputer after checking to see if it's there. I just call it every time the PC shuts off and it works if there's a connection.

    Code:
    function MoveFiles()
    {
        var path = 'C:\\Video'
        var dest  = '\\\\RemoteComputer\\SharedFolder\\Video\\'
        var fso = new ActiveXObject('Scripting.FileSystemObject')
        if( !fso.FolderExists(dest))
            return
        var f = fso.GetFolder(path)
        var fc = new Enumerator(f.files)
        var name
        for (; !fc.atEnd(); fc.moveNext()){
          name = fc.item()
          var destfile = dest + fso.GetFileName(name)
          if( !fso.FileExists(destfile))
              fso.MoveFile(name, dest)
        }
    }

  8. #8
    Raw Wave justintime's Avatar
    Join Date
    Apr 2005
    Posts
    2,695
    Quote Originally Posted by djXternal
    Is There anyway of running a program using the command line when the computer connects to a specific wifi connection...

    I have map monkey log my trips and would like my syncronization program to run as soon as i pull in the driveway
    Search web for BVRP Connection Manager Pro.

    It does exactly what you want (and much more)
    2002 Honda CR-V
    Carputer progress: 90% [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ -]
    Spent so far: $1105.90


    Download the NEXUS Skin for Centrafuse
    ...or even Listen to my music

  9. #9
    Newbie
    Join Date
    Aug 2005
    Posts
    9
    No one really specified the OS, so in linux case you can just add rsync information and a ftp address to it. Put the rsync:// in your ifup script and everytime internet comes up it runs it at end. Works pretty well for me

  10. #10
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,618
    I thinking of adding the reverse direction copying into the next release of my Playlist Update program, that would then do what you need.

Page 1 of 2 12 LastLast

Similar Threads

  1. Is it possible to run every prog embedded?
    By memy in forum Road Runner
    Replies: 8
    Last Post: 02-13-2005, 07:19 PM
  2. AC97 Control Panel Switcher Program (could be useful for many)
    By Vinister in forum Software & Software Development
    Replies: 0
    Last Post: 02-02-2005, 04:50 PM
  3. How to run another program when Winamp is the Shell?
    By Genesis in forum Software & Software Development
    Replies: 16
    Last Post: 02-12-2002, 03:18 PM
  4. charchter lcd program?
    By Jaymz in forum Software & Software Development
    Replies: 1
    Last Post: 02-15-2001, 08:32 PM
  5. Can someone write me a PIC program 4 a awesome s/down controller please?
    By gizmos in forum General Hardware Discussion
    Replies: 3
    Last Post: 07-17-2000, 01:43 PM

Bookmarks

Posting Permissions

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