Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Securing Network Use


  • Please log in to reply

#1
NorvilleBarnes

NorvilleBarnes

    New Member

  • Member
  • Pip
  • 3 posts
I am unable to find a utility that would manage my network connection conveniently.

I use 2 simple batch commands to enable and disable my network connections on our 4 home computers:
1- netsh interface set interface name="Local Area Connection" admin=enabled
2- netsh interface set interface name="Local Area Connection" admin=disabled
And these are triggered by clicking on an icon in Windows' "Quick Launch" bar.

For security concerns, I like to turn off the network connection when such a connection is not needed (especially after seeing so much unexplainable activity using Wireshark). Our systems do not suffer from being disconnected most of the time.

I would like to raise the level of performance by one notch, but at this point I recognize that I do not have the Windows programming skills. I would like to maintain a list in a file of those programs that I select to expect to have the network available, and upon closing one of these programs, a process would refer to the list when I turn off one of these programs. The process would then determine if any other of the programs on the list are also running. If it determines that none are, the final act of the process would be to disable the network connection. This would frequently occur after all browsers are closed.

I see this as a means to minimizing the network connection time of each computer, without adding the additional step of hitting the Quick Launch icon, as I presently do.

I don't know if this can be done completely from the batch command world. I also do not know how a program would determine which programs are presently running. I have a lot of programming experience, from a few machine languages to many structured languages, but have been frightened away from Windows programming. Any advice?
  • 0

Advertisements


#2
SleepyDude

SleepyDude

    Trusted Helper

  • Malware Removal
  • 4,149 posts

I don't know if this can be done completely from the batch command world. I also do not know how a program would determine which programs are presently running. I have a lot of programming experience, from a few machine languages to many structured languages, but have been frightened away from Windows programming. Any advice?

Hi Norville :welcome:,

I don't know any program to do that but if you are into programming all that can be done using a script created with Autoit take a look at the Features list, it's free.

Besides the Help with Examples and some samples included on the program they have a good support forum with lots of tips and code...
  • 0

#3
NorvilleBarnes

NorvilleBarnes

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
Thank you for your suggestion. I don't know if AutoIT has the full suite of the system access I need for my expressed wish, but I intend to learn about it to make that determination. I am fired up about having, what appears to be, a handy means of performing system functions. Additionally, I am impressed with the tutorials on YouTube, in quantity, in quality and in breadth.

You have done right by me, and I appreciate that very much.
  • 0

#4
SleepyDude

SleepyDude

    Trusted Helper

  • Malware Removal
  • 4,149 posts

Thank you for your suggestion. I don't know if AutoIT has the full suite of the system access I need for my expressed wish, but I intend to learn about it to make that determination.

From what you describe you can do all that with AutoIt, you can create a script that will stay on the system tray and pull the list of processes every x milliseconds and based on you list of programs (read from an INI file maybe!) decide if it needs to run the command to kill the net.
It's also easy to create a menu on the tray icon to enable/disable the network :)

I am fired up about having, what appears to be, a handy means of performing system functions. Additionally, I am impressed with the tutorials on YouTube, in quantity, in quality and in breadth.

Also the forum have many code ready for use including full UDF's (like library's) created by others for several tasks.

You have done right by me, and I appreciate that very much.

I like Autoit very much and the fact that you can produce EXE's for 32-bits and 64-bits OS's very easy.

You are welcome.
  • 0

#5
NorvilleBarnes

NorvilleBarnes

    New Member

  • Topic Starter
  • Member
  • Pip
  • 3 posts
I am writing to thank SleepyDude for the advise to investigate AutoIT. I used it serve the purpose I hoped, and learning / using it has bolstered my confidence that I could do more things like this in the future.

The program may get a bit of polishing as time goes by. This is its initial version, which I compiled, and which starts and runs automatically. I do this by referencing it in the Registry's Run section.

Thanks again.

#NoTrayIcon

$ie_exists = 0 ;Internet Explorer browser
$ff_exists = 0 ;FireFox browser
$op_exists = 0 ;Opera browser
$wu_exists = 0 ;Windows Update

While 1
NetMom()
Sleep(500)
WEnd

Func NetMom()

$ie_exists = WinExists("[CLASS:IEFrame]")
$ff_exists = WinExists("[CLASS:MozillaWindowClass]")
$op_exists = WinExists("[CLASS:Chrome_WidgetWin_0]")
$wu_exists = WinExists("[CLASS:CabinetWClass]")

If ($ie_exists Or $ff_exists Or $op_exists Or $wu_exists) Then
RunWait(@ComSpec & " /c " & 'netsh interface set interface name="Local Area Connection" admin=enabled', "", @SW_HIDE)
Else
RunWait(@ComSpec & " /c " & 'netsh interface set interface name="Local Area Connection" admin=disabled', "", @SW_HIDE)
EndIf

EndFunc ;==>NetMom
  • 0

#6
SleepyDude

SleepyDude

    Trusted Helper

  • Malware Removal
  • 4,149 posts

I am writing to thank SleepyDude for the advise to investigate AutoIT. I used it serve the purpose I hoped, and learning / using it has bolstered my confidence that I could do more things like this in the future.

The program may get a bit of polishing as time goes by. This is its initial version, which I compiled, and which starts and runs automatically. I do this by referencing it in the Registry's Run section.

Thanks again.


It was my pleasure. :thumbsup:

Regards.
  • 0

#7
vincentlouid

vincentlouid

    New Member

  • Member
  • Pip
  • 1 posts
Better u use juniper firewall to securing your networking issue
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP