• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
ruudboek

Found a workaround for the Network location bug

18 posts in this topic

As with a lot of people, the Network location dialog pops up when my unattended installation finishes too.

I also tried adding this RunSynchronousCommand to the specialize pass:

cmd /c reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /v Category /t REG_DWORD /d 00000000 /f

Regrettaby, as with a lot people, that workaround didn't work for me either.

I therefore decided to use the wininstall tool to take some snapshots of the registry and found out that the following reg command will prevent the Network location dialog from popping up:

Code

cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f

You can add this as a SynchronousCommand to the oobeSystem pass. I tested this myself and i can confirm that it works.

This workaround does have a downside: the Network location type will be set to "Public".

I have not found a way to automate changing it to "Home". I would prefer that because the option "Network discovery" would be enabled then.

Does anyone know of a command line tool, group policy or registry setting that will enable one to change the Network location?

0

Share this post


Link to post
Share on other sites

That tweak tested on vpc 2007, :thumbup working very nicely as stated for me.

Thankyou.

Edited by MAVERICKS CHOICE
0

Share this post


Link to post
Share on other sites

ruudboek:

I think that's a hint, but I need to specify the Work location. In my environment, I'm better off to answer the extra prompt, than to hardwire the wrong answer!

I did a Google Search on NetworkList NewNetworks, hoping to find any documentation of the setting. Unfortunately, it only came up with one entry -- you post to this thread <g>.

Perhaps you could cross-post to microsoft.public.windows.vista.installation_setup, in hopes of finding an MVP with access to MS internal support.

0

Share this post


Link to post
Share on other sites

Bud if you feel so strongly bout it may be you should yourself?? Hmm.

0

Share this post


Link to post
Share on other sites

I'll do that -- I was just reluctant because I already posted 2 help requests there this week, and I couldn't really provide additional information about ruudeboek's experiments, if somebody asked for details.

BTW, when I posted my reply, I slipped up on the cut-and-paste, and mangled the first line which was supposed to be "Thanks! -- I think that's a hint, but like you, I need". It came out sounding as if I were being cranky.

0

Share this post


Link to post
Share on other sites

In the waik help files update it says :

HELP UPDATE: Workaround for the Microsoft-Windows-Shell-Setup/OOBE/NetworkLocation setting.

The Microsoft-Windows-Shell-Setup/OOBE/NetworkLocation setting is not functioning properly. Use the following workaround to:

•	Suppress the Network Location page in Windows Welcome.
• Prevent the Network Location dialog box from appearing after the user created in Windows Welcome logs on for the first time.
To work around the NetworkLocation setting
1. Run sysprep /oobe /quit /unattend:unattend.xml.
This unattend.xml file can contain the NetworkLocation unattend setting, because it is being used to suppress the OOBE Network Location page.

2. Create a new registry key HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork.
3. Under this registry key, create the following values:
• NetworkName: REG_SZ (Name of the network)
• Category: REG_DWORD
• 0 to set to public
• 1 to set to private (maps to home/work)
• IconPath: REG_SZ (Icon for network)
• IconPath="%WINDIR%\system32\NetworkList\Icons\StockIcons\House"
• IconPath="%WINDIR%\system32\NetworkList\Icons\StockIcons\Office"
• IconPath="%WINDIR%\system32\NetworkList\Icons\StockIcons\Bench"
4. Restart the computer.

I dont get this, can anyone explain this to me please

Edited by sp00f
0

Share this post


Link to post
Share on other sites

@spOOf not here either....

I recomend Rudis offering above, does it here for me...

0

Share this post


Link to post
Share on other sites

im in there already spoof, have tried several different combinations which end up with Public still

but I'm combining that with several more things I've found

0

Share this post


Link to post
Share on other sites

I'm going to try the tip provided by waik help files.

How can I know, after windows installation is completed, that my network configuration is set to Home and not Public ?

Kal

EDIT:

What does it mean

To work around the NetworkLocation setting

1. Run sysprep /oobe /quit /unattend:unattend.xml.

This unattend.xml file can contain the NetworkLocation unattend setting, because it is being used to suppress the OOBE Network Location page.

Does it mean i have to run this command during specialize pass ?

Edited by kal
0

Share this post


Link to post
Share on other sites

Network and Sharing Center

You'll see Network(Private Network) out to right is Customize you'll see this pic

post-9484-1187499721_thumb.png

0

Share this post


Link to post
Share on other sites

All right, I finally get it working.

During specialize pass, i execute a simple batch file to specify the network icon & network name

network.cmd

cmdow @ /HID
@echo off

SET KEY=HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList

REG ADD "%KEY%\Signatures\FirstNetwork" /V "IconPath" /t REG_SZ /D "%WINDIR%\system32\NetworkList\Icons\StockIcons\House" /F
;REG ADD "%KEY%\Signatures\FirstNetwork" /V "NetworkName" /t REG_SZ /D "R‚seau" /F
;REG ADD "%KEY%\Signatures\FirstNetwork" /V "Category" /t REG_DWORD /D 00000000 /F

As you can see, i do not specify Category because it's always public, evin if i set it to 00000001. I don't either set the NetworkName because i want to keep the default one. I just set the House icon.

So, here is what I have in specialize pass to execute this batch file:

 <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>

<RunSynchronousCommand wcm:action="add">
<Description>Detect CDROM</Description>
<Order>10</Order>
<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\AppsRoot.txt SETX AppsRoot %i: -m"</Path>
</RunSynchronousCommand>

<RunSynchronousCommand wcm:action="add">
<Description>network</Description>
<Order>50</Order>
<Path>cmd /c %systemroot%\setup\scripts\network.cmd</Path>
</RunSynchronousCommand>

</RunSynchronous>
</component>

According to the tip posted in the first post, i have this in my oobe pass:

		<SynchronousCommand wcm:action="add">
<CommandLine>cmd /c reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</CommandLine>
<Description>network</Description>
<Order>30</Order>
</SynchronousCommand>

It's this command that will avoid the network location dialog to pop up.

Finally, I add another batch file in oobe pass to set the network location to private :

		<SynchronousCommand wcm:action="add">
<CommandLine>%AppsRoot%\WPI\Install\setprivate.cmd</CommandLine>
<Description>Set Private</Description>
<Order>40</Order>
</SynchronousCommand>

setprivate.cmd:

cmdow @ /HID
@echo off
FOR /F "usebackq delims=\ tokens=8" %%i IN (`reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles"`) DO set x=%%i
REG ADD "HKLM\SOFTWARE\Microsoft\UPnP Device Host\Devices" /F
REG ADD "HKLM\SOFTWARE\Microsoft\UPnP Device Host\Providers" /F
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\%x%" /V "Category" /t REG_DWORD /D 00000001 /F
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\%x%" /V "CategoryType" /t REG_DWORD /D 00000000 /F
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\FDResPub" /V "Start" /t REG_DWORD /D 00000002 /F
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\upnphost" /V "Start" /t REG_DWORD /D 00000002 /F

shutdown /r /t 0

In this batch file, i activate FDResPub & upnphost services. Indeed, during my registry checks, i saw that the first time it switch to private from public network, these services was activating.

Be sure to reboot after running setprivate.cmd.

Hope it helps,

Kal

Edited by kal
0

Share this post


Link to post
Share on other sites

That's life very complicated ... It is easier to put this line in the setupcomplete.cmd:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d 00000000 /f

0

Share this post


Link to post
Share on other sites

That's life very complicated ... It is easier to put this line in the setupcomplete.cmd:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d 00000000 /f

Except for those of us who do NOT want all new networks to be considered public. Given that I know the name of the window (and the fact it'll be on the domain when it's used for the first time, where the issue occurs), I just wrote a little app to kill the window and run as part of my task sequence (as when that window occurs on a domain network, the network's already been set). Works quite well, actually, but of course as with your method, it has it's drawbacks.

I did it with simple AutoIt script that I run in my Task Sequence, for anyone interested. Yes, it is that simple:

$handle = WinGetHandle("Set Network Location", "")
WinClose($handle)

0

Share this post


Link to post
Share on other sites

I know this thread is old but I thought I would update everyone with my successful results that result in what I had been hoping for. The ability to set the network private automatically.

The details that sp00f posted from the doc update do work once you decypher what it is saying. Basically you need to get your sysprep file the way you want it then run the sysprep utility with the generalize switch. This time though instead of reboot or shutdown, choose the "Quit" option. This will get the system prepped but leave the machine on. At this point the Key mentioned in the workaround will not exist so you will need to create it from scratch. Then you will need to add the other values.

So, key name: FirstNetwork

String Value: NetworkName with a string value. I used "Work" in mine.

DWord Value: Category with a value of 1 for private (many other people have been using 0)

String Value: IconPath with a value from the list. I chose the office Icon. Also when I added the value, I did not include the quotes around the icon, if you do it will not find the right icon. I have also attached a reg file that has the values. Hope this helps someone. Spent half my day figuring it out.

FirstNetwork.reg

Edited by richdenis
0

Share this post


Link to post
Share on other sites

I know this thread is old but I thought I would update everyone with my successful results that result in what I had been hoping for. The ability to set the network private automatically.

The details that sp00f posted from the doc update do work once you decypher what it is saying. Basically you need to get your sysprep file the way you want it then run the sysprep utility with the generalize switch. This time though instead of reboot or shutdown, choose the "Quit" option. This will get the system prepped but leave the machine on. At this point the Key mentioned in the workaround will not exist so you will need to create it from scratch. Then you will need to add the other values.

So, key name: FirstNetwork

String Value: NetworkName with a string value. I used "Work" in mine.

DWord Value: Category with a value of 1 for private (many other people have been using 0)

String Value: IconPath with a value from the list. I chose the office Icon. Also when I added the value, I did not include the quotes around the icon, if you do it will not find the right icon. I have also attached a reg file that has the values. Hope this helps someone. Spent half my day figuring it out.

much thanks richdenis i see 100+ ppl downloaded it but no one has thanked you for it

hope it works i was going to try and decipher it into a reg key but you saved me the trouble worst thing with stuff like this is takes about half hr every time you want to test something on the install side as you have to wait for install to happen

when did you run this file in the xml file or in a runonce? or it shouldnt matter?

0

Share this post


Link to post
Share on other sites

I know this thread is old but I thought I would update everyone with my successful results that result in what I had been hoping for. The ability to set the network private automatically.

The details that sp00f posted from the doc update do work once you decypher what it is saying. Basically you need to get your sysprep file the way you want it then run the sysprep utility with the generalize switch. This time though instead of reboot or shutdown, choose the "Quit" option. This will get the system prepped but leave the machine on. At this point the Key mentioned in the workaround will not exist so you will need to create it from scratch. Then you will need to add the other values.

So, key name: FirstNetwork

String Value: NetworkName with a string value. I used "Work" in mine.

DWord Value: Category with a value of 1 for private (many other people have been using 0)

String Value: IconPath with a value from the list. I chose the office Icon. Also when I added the value, I did not include the quotes around the icon, if you do it will not find the right icon. I have also attached a reg file that has the values. Hope this helps someone. Spent half my day figuring it out.

much thanks richdenis i see 100+ ppl downloaded it but no one has thanked you for it

hope it works i was going to try and decipher it into a reg key but you saved me the trouble worst thing with stuff like this is takes about half hr every time you want to test something on the install side as you have to wait for install to happen

when did you run this file in the xml file or in a runonce? or it shouldnt matter?

He is talking about importing it AFTER sysprepping the machine, and BEFORE shutting down it, I thought.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.