• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 762
  • Last Modified:

Configure Phone and Modem Options with script

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
G_M
Asked:
G_M
  • 4
  • 3
2 Solutions
 
__STCommented:
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
 
Darrell PorterEnterprise Business Process ArchitectCommented:
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
 
G_MAuthor Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Darrell PorterEnterprise Business Process ArchitectCommented:
Any particular reason you're reading ControlSet001 and not CurrentControlSet?

Just curious,,,
0
 
Darrell PorterEnterprise Business Process ArchitectCommented:
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
 
G_MAuthor Commented:
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
 
Darrell PorterEnterprise Business Process ArchitectCommented:
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
 
G_MAuthor Commented:
My solution is  WalkaboutTigger's theory in practice
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now