Solved

Configure Phone and Modem Options with script

Posted on 2011-03-01
8
734 Views
Last Modified: 2012-08-14
Hey guys,

I have a bulk deployment to reconfigure PC's modem settings for some wireless aircards we have in circulation. Essentially what currently needs to take place is the following:

Configure "Modem Properties > Advanced > > Extra Settings > Extra initialisation commands" to equal "at+cgdcont=1,"IP","domain.<cec>.<ou>.<ou>""

I would like to create a script that can do this, however, there is a lack of consistancy with these aircards, thus I believe there needs to be an user input option to select the type of modem before kicking it off (unless they are tracked by sequential number)

I want this to be run on the local machine, as the aircard needs to be plugged in to configure the properties.

Sorry this is a curley one, hope someone can help.

Cheers
G_M
0
Comment
Question by:G_M
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:__ST
ID: 35013726
If you're trying to do this through the GUI and require user input you could try AutoIT.  It's got an easy learning curve and is pretty flexible.

http://www.autoitscript.com/site/autoit/
0
 
LVL 15

Accepted Solution

by:
WalkaboutTigger earned 500 total points
ID: 35013744
Step one:  Find the area in HKLM where the modem type is defined - maybe SYSTEM\CurrentControlSet\Control\Class
Step two: Perform a RegKeyExists for each of the aircard types.  When one succeeds, that is the type of card installed.
Step three: Write the registry entries for the appropriate card type.

If you can get the specific class entries for the cards, I can put a script together for you fairly quickly.
0
 

Assisted Solution

by:G_M
G_M earned 0 total points
ID: 35014236
Registry changes it is. Thanks for making me think outside the box a little.

This is what I came up with:

 
pushd C:\Temp
(
reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96D-E325-11CE-BFC1-08002BE10318}\0001
if not errorlevel 1 (
   regedit /s Aircard1.reg
) else (
   echo "Device 1 Not Found"
)
reg query HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96D-E325-11CE-BFC1-08002BE10318}\0002
if not errorlevel 1 (
   regedit /s Aircard2.reg
) else (
   echo "Device 2 Not Found"
)
popd

Open in new window


Cheers
G_M
0
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 35014249
Any particular reason you're reading ControlSet001 and not CurrentControlSet?

Just curious,,,
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 35014263
I think that all you need to do to accept the answer is go to the appropriate answer and, on the blue bar, select the link indicating this is the solution.
0
 

Author Comment

by:G_M
ID: 35014364
I actually had to address three strings I found in the registry

CurrentControlSet
ControlSet001
ControlSet002

Not 100% sure what the differences are but it works... the script only writes to them if they exist.
0
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 35014387
OK - you really should only need to change CurrentControlSet as this is the "live" one.
It is also much safer to only change this one.
0
 

Author Closing Comment

by:G_M
ID: 35045720
My solution is  WalkaboutTigger's theory in practice
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now