topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 10:43 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: network detection  (Read 12693 times)

Maestr0

  • Participant
  • Joined in 2010
  • *
  • Posts: 30
    • View Profile
    • Donate to Member
IDEA: network detection
« on: February 10, 2010, 08:39 AM »
I'm looking for something that detects when network connection is achieved with a certain network.
That can be handy to do certain things, like sync, make/unmake networkmappings, etcetera.

For now I've been doing something like below in a settimer:

RunWait , %comspec% /c ipconfig > %A_Temp%\ipconfig.txt, , Hide UseErrorLevel
FileRead , ipcnfg , %A_Temp%\ipconfig.txt
FileDelete %A_Temp%\ipconfig.txt
if ipcnfg contains %DNS_suffix%
network = 1
else
network = 0

Any thoughts?

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #1 on: January 02, 2012, 08:06 PM »
Does what you have above not work? Or did you want it to do something else?

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #2 on: January 03, 2012, 06:11 PM »
... Not sure if you noticed, but this post is close to two years old :)

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #3 on: January 04, 2012, 02:00 AM »
I saw it was old, but wasn't sure if was still an outstanding request, or dead. I have a tool we use at work that does something similiar (automatically connects specific shares based on what the best available server is), and thought I may adapt it if there was still any need. And still getting my head around 2012, thought it was only a year old, will be signing 2011 date for while yet.  :-[
BTW, is there any way to seperate the active but unanswered requests from the answered and no longer required?
Cheers

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #4 on: January 04, 2012, 05:51 AM »
Well, I'm not sure how to classify something as "not active" :)
If Maestr0 still has a need for this, then I guess this would be active. My intention was only to warn you so that you don't get your hopes high of receiving a reply ;)

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • default avatar
  • Posts: 23
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #5 on: January 04, 2012, 06:11 AM »
Thanks, but I assume he has gone elsewhere as there were no other followup requests. But I have posted in a few topics, I can't find many current requests that haven't already been answered several times, and which I have some chance of helping with. So just posted in a few of the toopics that didn't have answered/completed/or some such in the topic and selected notify so if they do answer I will get a heads up.
So I'm off to the search page to see if I can get a list of topics that aren't quite as old and which don't appear to be answered already. Eventually I'll find something I can help with.  :)
Cheers

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: IDEA: network detection
« Reply #6 on: January 04, 2012, 07:26 AM »
:) That's the spirit :P
I think your problem may be related with skwire doing all the recent coding snacks requests, eheh. But I'm sure you'll find something around here, ideas are always flowing around DC!