Real Geek Forums  

Go Back   Real Geek Forums > Archives > Operating Systems > Windows Vista > Windows Vista Networking & Sharing

Notices

Reply

How to avoid Network Location selection popup for Dial-up connection in Vista

 

LinkBack Thread Tools Display Modes
Old 11-09-2007, 06:47 PM   #1 (permalink)
Default How to avoid Network Location selection popup for Dial-up connection in Vista

I have a 32-bit C++ application built with Visual Studio 2005 in XP.
The application creates a dial-up connection entry into rasphone.pbk
successfully in 32-bit and 64-bit Vista. And the dial-up connection
works as expected. However, at the first run of the dial-up
connection, after the connection has been made, Vista pop-ups a
Network Location selection window asking to choose:

1. Home
2. Business
3. Public Location (the default)

After the selection, the corresponding setting would show up in
Network Connections as Network Category: private network (Home or
Business) or public network (Public Location).

It seems like my goal is to programmatically set the 'Network
Category' to prevent the network location selection popup during first
run. I am trying to manipulate the RASENTRY passed into the method
RasSetEntryProperties() and using INI setting to change some entries,
but no sure which parameters to change. Any help is appreciated.
Below is the initial rasphone.pbk before the first run.

[My DialUp Test (COM1)]
Encoding=1
Type=0
AutoLogon=0
UseRasCredentials=1
LowDateTime=1308709520
HighDateTime=29893380
DialParamsUID=3226093
Guid=B8BB572945C94743BE4E66C8A5233792
BaseProtocol=1
VpnStrategy=0
ExcludedProtocols=10
LcpExtensions=0
DataEncryption=8
SwCompression=0
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=0
OverridePref=15
RedialAttempts=0
RedialSeconds=0
IdleDisconnectSeconds=0
RedialOnLinkFailure=0
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
ForceSecureCompartment=0
DisableIKENameEkuCheck=0
AuthenticateServer=0
ShareMsFilePrint=0
BindMsNetClient=0
SharedPhoneNumbers=1
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=COM1
PreferredDevice=My Test Modem
PreferredBps=0
PreferredHwFlow=0
PreferredProtocol=0
PreferredCompression=0
PreferredSpeaker=0
PreferredMdmProtocol=0
PreviewUserPw=0
PreviewDomain=0
PreviewPhoneNumber=0
ShowDialingProgress=0
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=808
TypicalAuth=1
IpPrioritizeRemote=0
IpInterfaceMetric=0
fCachedDnsSuffix=0
IpHeaderCompression=0
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpDnsFlags=0
IpNBTFlags=1
TcpWindowSize=0
UseFlags=0
IpSecFlags=0
IpDnsSuffix=
IpCachedDnsSuffix=
Ipv6PrioritizeRemote=0
Ipv6InterfaceMetric=0
Ipv6NameAssign=1
Ipv6DnsAddress=::
Ipv6Dns2Address=::
Ipv6InterfaceId=0000000000000000

NETCOMPONENTS=
ms_msclient=0
ms_server=0

MEDIA=serial
Port=COM1
Device=My Test Modem
ConnectBPS=115200

DEVICE=modem
PhoneNumber=123
AreaCode=
CountryCode=0
CountryID=0
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1
HwFlowControl=0
Protocol=0
Compression=0
Speaker=1
MdmProtocol=0

hq4000@hotmail.com
Guest
 
Posts: n/a
Reply With Quote  
Old 11-10-2007, 01:32 AM   #2 (permalink)
Default Re: How to avoid Network Location selection popup for Dial-up connection in Vista

Have you looked at this?
http://scriptcode.co.uk/set_vista_ne...n_category.htm

---
Jeffrey Randow
jeffreycentex@gmail.com
Windows Networking MVP 2001-2006
http://www.networkblog.net

On Fri, 09 Nov 2007 11:47:40 -0800, "hq4000@hotmail.com"
<hq4000@hotmail.com> wrote:
Quote:
>I have a 32-bit C++ application built with Visual Studio 2005 in XP.
>The application creates a dial-up connection entry into rasphone.pbk
>successfully in 32-bit and 64-bit Vista. And the dial-up connection
>works as expected. However, at the first run of the dial-up
>connection, after the connection has been made, Vista pop-ups a
>Network Location selection window asking to choose:
>
>1. Home
>2. Business
>3. Public Location (the default)
>
>After the selection, the corresponding setting would show up in
>Network Connections as Network Category: private network (Home or
>Business) or public network (Public Location).
>
>It seems like my goal is to programmatically set the 'Network
>Category' to prevent the network location selection popup during first
>run. I am trying to manipulate the RASENTRY passed into the method
>RasSetEntryProperties() and using INI setting to change some entries,
>but no sure which parameters to change. Any help is appreciated.
>Below is the initial rasphone.pbk before the first run.
>
>[My DialUp Test (COM1)]
>Encoding=1
>Type=0
>AutoLogon=0
>UseRasCredentials=1
>LowDateTime=1308709520
>HighDateTime=29893380
>DialParamsUID=3226093
>Guid=B8BB572945C94743BE4E66C8A5233792
>BaseProtocol=1
>VpnStrategy=0
>ExcludedProtocols=10
>LcpExtensions=0
>DataEncryption=8
>SwCompression=0
>NegotiateMultilinkAlways=0
>SkipNwcWarning=0
>SkipDownLevelDialog=0
>SkipDoubleDialDialog=0
>DialMode=0
>OverridePref=15
>RedialAttempts=0
>RedialSeconds=0
>IdleDisconnectSeconds=0
>RedialOnLinkFailure=0
>CallbackMode=0
>CustomDialDll=
>CustomDialFunc=
>CustomRasDialDll=
>ForceSecureCompartment=0
>DisableIKENameEkuCheck=0
>AuthenticateServer=0
>ShareMsFilePrint=0
>BindMsNetClient=0
>SharedPhoneNumbers=1
>GlobalDeviceSettings=0
>PrerequisiteEntry=
>PrerequisitePbk=
>PreferredPort=COM1
>PreferredDevice=My Test Modem
>PreferredBps=0
>PreferredHwFlow=0
>PreferredProtocol=0
>PreferredCompression=0
>PreferredSpeaker=0
>PreferredMdmProtocol=0
>PreviewUserPw=0
>PreviewDomain=0
>PreviewPhoneNumber=0
>ShowDialingProgress=0
>ShowMonitorIconInTaskBar=1
>CustomAuthKey=-1
>AuthRestrictions=808
>TypicalAuth=1
>IpPrioritizeRemote=0
>IpInterfaceMetric=0
>fCachedDnsSuffix=0
>IpHeaderCompression=0
>IpAddress=0.0.0.0
>IpDnsAddress=0.0.0.0
>IpDns2Address=0.0.0.0
>IpWinsAddress=0.0.0.0
>IpWins2Address=0.0.0.0
>IpAssign=1
>IpNameAssign=1
>IpDnsFlags=0
>IpNBTFlags=1
>TcpWindowSize=0
>UseFlags=0
>IpSecFlags=0
>IpDnsSuffix=
>IpCachedDnsSuffix=
>Ipv6PrioritizeRemote=0
>Ipv6InterfaceMetric=0
>Ipv6NameAssign=1
>Ipv6DnsAddress=::
>Ipv6Dns2Address=::
>Ipv6InterfaceId=0000000000000000
>
>NETCOMPONENTS=
>ms_msclient=0
>ms_server=0
>
>MEDIA=serial
>Port=COM1
>Device=My Test Modem
>ConnectBPS=115200
>
>DEVICE=modem
>PhoneNumber=123
>AreaCode=
>CountryCode=0
>CountryID=0
>UseDialingRules=0
>Comment=
>LastSelectedPhone=0
>PromoteAlternates=0
>TryNextAlternateOnFail=1
>HwFlowControl=0
>Protocol=0
>Compression=0
>Speaker=1
>MdmProtocol=0
Jeffrey Randow
Guest
 
Posts: n/a
Reply With Quote  
Old 11-10-2007, 01:32 AM   #3 (permalink)
Default Re: How to avoid Network Location selection popup for Dial-up connection in Vista

Hit send too fast there..

It should be fairly trivial to add the functionality of that script to
your application...

---
Jeffrey Randow
jeffreycentex@gmail.com
Windows Networking MVP 2001-2006
http://www.networkblog.net

On Fri, 09 Nov 2007 11:47:40 -0800, "hq4000@hotmail.com"
<hq4000@hotmail.com> wrote:
Quote:
>I have a 32-bit C++ application built with Visual Studio 2005 in XP.
>The application creates a dial-up connection entry into rasphone.pbk
>successfully in 32-bit and 64-bit Vista. And the dial-up connection
>works as expected. However, at the first run of the dial-up
>connection, after the connection has been made, Vista pop-ups a
>Network Location selection window asking to choose:
>
>1. Home
>2. Business
>3. Public Location (the default)
>
>After the selection, the corresponding setting would show up in
>Network Connections as Network Category: private network (Home or
>Business) or public network (Public Location).
>
>It seems like my goal is to programmatically set the 'Network
>Category' to prevent the network location selection popup during first
>run. I am trying to manipulate the RASENTRY passed into the method
>RasSetEntryProperties() and using INI setting to change some entries,
>but no sure which parameters to change. Any help is appreciated.
>Below is the initial rasphone.pbk before the first run.
>
>[My DialUp Test (COM1)]
>Encoding=1
>Type=0
>AutoLogon=0
>UseRasCredentials=1
>LowDateTime=1308709520
>HighDateTime=29893380
>DialParamsUID=3226093
>Guid=B8BB572945C94743BE4E66C8A5233792
>BaseProtocol=1
>VpnStrategy=0
>ExcludedProtocols=10
>LcpExtensions=0
>DataEncryption=8
>SwCompression=0
>NegotiateMultilinkAlways=0
>SkipNwcWarning=0
>SkipDownLevelDialog=0
>SkipDoubleDialDialog=0
>DialMode=0
>OverridePref=15
>RedialAttempts=0
>RedialSeconds=0
>IdleDisconnectSeconds=0
>RedialOnLinkFailure=0
>CallbackMode=0
>CustomDialDll=
>CustomDialFunc=
>CustomRasDialDll=
>ForceSecureCompartment=0
>DisableIKENameEkuCheck=0
>AuthenticateServer=0
>ShareMsFilePrint=0
>BindMsNetClient=0
>SharedPhoneNumbers=1
>GlobalDeviceSettings=0
>PrerequisiteEntry=
>PrerequisitePbk=
>PreferredPort=COM1
>PreferredDevice=My Test Modem
>PreferredBps=0
>PreferredHwFlow=0
>PreferredProtocol=0
>PreferredCompression=0
>PreferredSpeaker=0
>PreferredMdmProtocol=0
>PreviewUserPw=0
>PreviewDomain=0
>PreviewPhoneNumber=0
>ShowDialingProgress=0
>ShowMonitorIconInTaskBar=1
>CustomAuthKey=-1
>AuthRestrictions=808
>TypicalAuth=1
>IpPrioritizeRemote=0
>IpInterfaceMetric=0
>fCachedDnsSuffix=0
>IpHeaderCompression=0
>IpAddress=0.0.0.0
>IpDnsAddress=0.0.0.0
>IpDns2Address=0.0.0.0
>IpWinsAddress=0.0.0.0
>IpWins2Address=0.0.0.0
>IpAssign=1
>IpNameAssign=1
>IpDnsFlags=0
>IpNBTFlags=1
>TcpWindowSize=0
>UseFlags=0
>IpSecFlags=0
>IpDnsSuffix=
>IpCachedDnsSuffix=
>Ipv6PrioritizeRemote=0
>Ipv6InterfaceMetric=0
>Ipv6NameAssign=1
>Ipv6DnsAddress=::
>Ipv6Dns2Address=::
>Ipv6InterfaceId=0000000000000000
>
>NETCOMPONENTS=
>ms_msclient=0
>ms_server=0
>
>MEDIA=serial
>Port=COM1
>Device=My Test Modem
>ConnectBPS=115200
>
>DEVICE=modem
>PhoneNumber=123
>AreaCode=
>CountryCode=0
>CountryID=0
>UseDialingRules=0
>Comment=
>LastSelectedPhone=0
>PromoteAlternates=0
>TryNextAlternateOnFail=1
>HwFlowControl=0
>Protocol=0
>Compression=0
>Speaker=1
>MdmProtocol=0
Jeffrey Randow
Guest
 
Posts: n/a
Reply With Quote  
Old 11-10-2007, 02:35 PM   #4 (permalink)
Default Re: How to avoid Network Location selection popup for Dial-up connection in Vista

I verified from registry key. After initial installation by my
application, the registry entry doesn't have profile for my dial-up
connection yet. The registry entry is created during first run. In
order to set the network category using the script above, I need to
have the registry entry for the dial connection during initial
installation. What to follow?


hq4000@hotmail.com
Guest
 
Posts: n/a
Reply With Quote  
Old 11-11-2007, 09:32 PM   #5 (permalink)
Default Re: How to avoid Network Location selection popup for Dial-up connection in Vista

Why not run the dial-up connection and then cancel it? This should
set the profile for it...

---
Jeffrey Randow
jeffreycentex@gmail.com
Windows Networking MVP 2001-2006
http://www.networkblog.net



On Sat, 10 Nov 2007 07:35:10 -0800, "hq4000@hotmail.com"
<hq4000@hotmail.com> wrote:
Quote:
>I verified from registry key. After initial installation by my
>application, the registry entry doesn't have profile for my dial-up
>connection yet. The registry entry is created during first run. In
>order to set the network category using the script above, I need to
>have the registry entry for the dial connection during initial
>installation. What to follow?
>
Jeffrey Randow
Guest
 
Posts: n/a
Reply With Quote  
Reply

Tags
None

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to Optimize Windows vista for Dial-up Connection Manoj Kumar Windows Vista Networking & Sharing 0 10-31-2007 07:56 AM
Vista network access via dial up Jacques Windows Vista Networking & Sharing 3 08-15-2007 06:26 PM
losing setting -- Never dial a connection -- gets switched to --> dial whenever kgw62 Windows XP Configuration & Management 0 07-27-2004 02:31 PM
cannot see the dial-up connection on network connections mrm Windows XP Network & Web 0 08-13-2003 08:19 AM
Network Connection Dial Up Modem Grayed Out dave hewlett Windows XP Network & Web 0 07-08-2003 12:34 AM


All times are GMT. The time now is 02:18 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright © 2005 - 2007 RealGeek.com. All rights reserved.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90