Page 1 of 1

Unticking boxes using Batch files

Posted: 11 Jun 2012 04:26
by Raymondo
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.

Re: Unticking boxes using Batch files

Posted: 15 Jun 2012 01:13
by foxidrive
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.

Re: Unticking boxes using Batch files

Posted: 15 Jun 2012 06:50
by Squashman

Re: Unticking boxes using Batch files

Posted: 21 Jun 2012 20:39
by Dos_Probie
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)

Re: Unticking boxes using Batch files

Posted: 22 Jun 2012 12:53
by Ed Dyreen
'
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!