Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Found a workaround for the Network location bug

- - - - -

  • Please log in to reply
17 replies to this topic

#1
ruudboek

ruudboek

    Newbie

  • Member
  • 16 posts
  • Joined 14-August 04
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?


How to remove advertisement from MSFN

#2
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,780 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
That tweak tested on vpc 2007, :thumbup working very nicely as stated for me.

Thankyou.

Edited by MAVERICKS CHOICE, 10 June 2007 - 05:52 PM.


#3
fletcherjames

fletcherjames

    Newbie

  • Member
  • 19 posts
  • Joined 02-June 07
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.

#4
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,780 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
Bud if you feel so strongly bout it may be you should yourself?? Hmm.

#5
fletcherjames

fletcherjames

    Newbie

  • Member
  • 19 posts
  • Joined 02-June 07
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.

#6
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,780 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
Not at all cranky.

#7
sp00f

sp00f

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 733 posts
  • Joined 30-November 06
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, 11 August 2007 - 11:13 PM.


#8
MAVERICKS CHOICE

MAVERICKS CHOICE

    The Guy from Aus

  • Member
  • PipPipPipPipPipPipPip
  • 1,780 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
@spOOf not here either....

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

#9
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
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
Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#10
sp00f

sp00f

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 733 posts
  • Joined 30-November 06
ok, cool......

#11
kal

kal

    Member

  • Member
  • PipPip
  • 114 posts
  • Joined 07-March 04
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, 18 August 2007 - 08:43 AM.


#12
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,889 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
Network and Sharing Center
You'll see Network(Private Network) out to right is Customize you'll see this pic

Attached Files


Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#13
kal

kal

    Member

  • Member
  • PipPip
  • 114 posts
  • Joined 07-March 04
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, 19 August 2007 - 10:33 AM.


#14
maestrodellaves

maestrodellaves

    Newbie

  • Member
  • 10 posts
  • Joined 30-April 10
  • OS:Windows 7 x64
  • Country: Country Flag
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


#15
cluberti

cluberti

    Gustatus similis pullus

  • Supervisor
  • 11,252 posts
  • Joined 09-September 01
  • OS:Windows 8.1 x64
  • Country: Country Flag

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)

MCTS Windows Internals, MCITP Server 2008 EA, MCTS MDT/BDD, MCSE/MCSA Server 2003, Server 2012, Windows 8
--------------------
Please read the rules before posting!
Please consider donating to MSFN to keep it up and running!

#16
richdenis

richdenis
  • Member
  • 1 posts
  • Joined 17-August 11
  • OS:none specified
  • Country: Country Flag
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.

Attached Files


Edited by richdenis, 17 August 2011 - 02:40 PM.


#17
b-man

b-man

    Member

  • Member
  • PipPip
  • 226 posts
  • Joined 28-April 09

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?

#18
emmanux

emmanux
  • Member
  • 1 posts
  • Joined 21-August 12
  • OS:none specified
  • Country: Country Flag


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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users