Unticking boxes using Batch files

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Raymondo
Posts: 3
Joined: 11 Jun 2012 04:15

Unticking boxes using Batch files

#1 Post by Raymondo » 11 Jun 2012 04:26

Hi All,

I'm trying to create a batch file on xp that will go into the network connections, Local area Connection and go into the properties and uncheck "Client for Microsoft Networks" and the next 3 boxes underneath I am trying to automate a procedure for work as I am a student and the job can get very tedious after awhile. The job requires to uncheck the top 4 boxes here and leave the bottom one where I have to then add a specific ip address and subnet mask I have everything else working but do not know how to do this bit.

All help with be appreciated.
Thank you.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Unticking boxes using Batch files

#2 Post by foxidrive » 15 Jun 2012 01:13

Autoit might be a better choice than a batch file.

If you use a VB script in WSH then you can use sendkeys to press keys and tab/arrows to navigate.


Or you can use a Macro program to press keys/click etc on a hotkey sequence.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Unticking boxes using Batch files

#3 Post by Squashman » 15 Jun 2012 06:50


Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: Unticking boxes using Batch files

#4 Post by Dos_Probie » 21 Jun 2012 20:39

Dont know about XP but in W7 the boxes and default setting are located at
hkcu\software\microsoft\windows\currentVersion\internet settings\connections
you could probably setup the setting on a xp machine the way you want it then save the reg file and use it for other xp machines... 8)

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: Unticking boxes using Batch files

#5 Post by Ed Dyreen » 22 Jun 2012 12:53

'
You can configure the net adapter with netsh

Code: Select all

set "$args="
set "$args=!$args! name="!$name!""
set "$args=!$args! source=!$source!"
set "$args=!$args! addr=!$address!"
set "$args=!$args! mask=!$mask!"
set "$args=!$args! gateway=!$gateway!"
set "$args=!$args! gwmetric=!$gwmetric!"
::
netsh interface ip set address !$args!

Post Reply