Batch file to change dialup settings

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Batch file to change dialup settings

#1 Post by Padd007 » 20 Jun 2016 06:40

Hey guys

I am trying to create a batch file to run after imaging several laptops, I need it to change the default username for dialup and uncheck the ask for user/pass option. I am thinking i'm going to have to edit the registry but I cant find where this is saved. Thanks for any help.

John

sambul35
Posts: 192
Joined: 18 Jan 2012 10:13

Re: Batch file to change dialup settings

#2 Post by sambul35 » 20 Jun 2016 11:11

If you search the web for a similar solution, and post your draft code her, it would be easier to help you fix it.

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#3 Post by Padd007 » 21 Jun 2016 04:07

The problem is I cant seem to find a similar solution. I cant find out where windows stores its settings for dialup (presumably in the registry). Ill I want to do is change the default username and disable the logon prompt. If anyone can point me in the right direction that would be awesome.

cheers

Padd.

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

Re: Batch file to change dialup settings

#4 Post by foxidrive » 22 Jun 2016 05:09

Dialup modems? I think you got off in the wrong year in your TARDIS. ;)

https://www.google.com.au/#hl=en&q=dialup+registry

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#5 Post by Padd007 » 22 Jun 2016 06:13

This is a 3G PCMCIA card, however it still uses rasdial.

I cant figure out where it saves its settings, tried capturing registry and ini file changes but didn't have any luck.

I have to do this on 600 laptops and I was hoping to automate the process :)

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

Re: Batch file to change dialup settings

#6 Post by foxidrive » 22 Jun 2016 06:59

Padd007 wrote:This is a 3G PCMCIA card, however it still uses rasdial.

I cant figure out where it saves its settings, tried capturing registry and ini file changes but didn't have any luck.


Put some easily searchable term in the dialup settings - not password etc - and then search for that term in regedit.

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#7 Post by Padd007 » 22 Jun 2016 07:37

I have tried that, didn't find anything in the registry that matched. I am at a loss with this one :/

I feel that this should be much easier than I am making it though lol

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

Re: Batch file to change dialup settings

#8 Post by Squashman » 22 Jun 2016 07:41

Padd007 wrote:This is a 3G PCMCIA card

Well foxidrive's comment still holds true. I can't even remember the last time I have seen a new laptop come with a pcmcia card slot.

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

Re: Batch file to change dialup settings

#9 Post by Squashman » 22 Jun 2016 07:58

Well according to Microsoft's Technet article for the rasdial command, the default path to the phonebook file is systemroot\System32\Ras\username.pbk.

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#10 Post by Padd007 » 22 Jun 2016 08:07

Squashman wrote:
Padd007 wrote:This is a 3G PCMCIA card

Well foxidrive's comment still holds true. I can't even remember the last time I have seen a new laptop come with a pcmcia card slot.


Its a Panasonic Toughbook CF-19, its old and rubbish but its what the client wants us to use.

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#11 Post by Padd007 » 22 Jun 2016 08:18

Squashman wrote:Well according to Microsoft's Technet article for the rasdial command, the default path to the phonebook file is systemroot\System32\Ras\username.pbk.


That file doesn't seem to exist on this machine, the folder is there and it contains cis.scp, pad.inf, pppmenu.scp and switch.inf. Had a look through these and didn't find anything usefull. Not sure if I mention the OS but its Win 7 pro x64.

Image

Thought I would attach this for clarification, trying to change the user and uncheck "Prompt for name..." from a batch file.

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

Re: Batch file to change dialup settings

#12 Post by Squashman » 22 Jun 2016 08:24

Like the Technet article says: "Default". That doesn't mean it isn't stored somewhere else.

Code: Select all

C:\Users>dir *.pbk /s
 Volume in drive C is 15_10P
 Volume Serial Number is DE79-4A59

 Directory of C:\Users\Squashman\AppData\Roaming\Microsoft\Network\Connections\Pbk

12/18/2015  07:55 AM             1,948 rasphone.pbk
               1 File(s)          1,948 bytes

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#13 Post by Padd007 » 22 Jun 2016 10:45

OK, I have found the file, it is in the same location as yours, I have also found lines referring to auto login etc. However my edits have no impact on the dial up settings and it doesn't contain any of my current configuration, in fact removing the file altogether doesn't change anything. So I suspect it isn't actually using this file, this is the only .pbk file that exists on the machine in question.

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

Re: Batch file to change dialup settings

#14 Post by foxidrive » 22 Jun 2016 12:47

Padd007 wrote:Thought I would attach this for clarification, trying to change the user and uncheck "Prompt for name..." from a batch file.


What is the target path and executable in the EAAMB shortcut on the desktop?

Padd007
Posts: 16
Joined: 20 Jun 2016 06:36

Re: Batch file to change dialup settings

#15 Post by Padd007 » 23 Jun 2016 03:41

foxidrive wrote:
Padd007 wrote:Thought I would attach this for clarification, trying to change the user and uncheck "Prompt for name..." from a batch file.


What is the target path and executable in the EAAMB shortcut on the desktop?



Image

"{BA126AD7-2166-11D1-B1D0-00805FC1270E}" is in the target field.

searching the reg for this finds a couple of things but nothing I can interpret.

Post Reply