Windows 10: Network configuration broken (WiFi) Solved

Page 2 of 2 FirstFirst 12

  1. Posts : 30
    Windows 8.1/10 Enterprise x64
    Thread Starter
       26 Feb 2018 #11

    Nice, got it resolved myself. Disabled service was a right clue. Issue was caused by disabled automatic WLAN configuration service.
      My ComputerSystem Spec

  2.    26 Feb 2018 #12

    Anakunda said: View Post
    Can't the unavailability of wireless networks be due to a required service has been disabled(stopped)?
    Yes of course. Unfortunately I don't know enough about it. I wrote this script to try to make WiFi work on PE but while it does PE isn't exactly the same as Windows and in the end it didn't work on the second PC I tried it on (different hardware perhaps). It might be interesting though.
    Code:
    # Structure is taken from https://msdn.microsoft.com/en-us/library/windows/hardware/dn938390(v=vs.85).aspx
    ##########
    # Only need to change this section if moving ADK install location etc.
    # normally $ADK = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit" - default
    
    $ADK = "D:\Windows Kits\10\Assessment and Deployment Kit"
    $PEArch = "amd64"
    $PELang = "en-us"
    
    $HomeDir = "D:\Make-PE"			# This is the work directory where the script is running
    $ISOPath = "$HomeDir\WinPE.iso"	# Where the ISO goes
    $ISOLabel="My Boot Disk"		# Name of ISOLabel	
    $Debug=$True					# Pause during build
    $WifiRequired=$True				# Add Wifi Services
    
    # Environment Variables for script
    $WorkDir = "$HomeDir\WinPE_$PEArch"
    $Source="$ADK\Windows Preinstallation Environment\$PEArch"
    $FWFilesRoot="$ADK\Deployment Tools\$PEArch\Oscdimg"
    $WIMSourcePath="$Source\$PELang\winpe.wim"
     
    # copy wifi profile to PE as it may be needed
    if ($WifiRequired) {
    	$WifiProfile="fisher"
    	if (-not(Test-Path "$HomeDir\Documents")) {New-Item -ItemType Directory -Path "$HomeDir\Documents" -Force}
    	netsh wlan export profile name="$WifiProfile" folder="D:\Make-PE\Documents" key=clear
    }	
    
    # Display message variables
    $message="Enter choice"
    $choices=@("&Yes","&No")
    
    ##########
    # GO !!
    ##########
    
    # Dism options below only works on Windows 10.
    $OS = Get-WmiObject Win32_OperatingSystem
    If(-not $OS.Caption.Contains("10")) {Read-Host -Prompt "This script only works with Windows 10.  Press Enter to exit."; exit }
    
    # If ISO exists, delete it or quit.
    if  (Test-Path "$ISOPath") {
    	do {
    		$caption="Destination file $ISOPath exists, delete it?"
    		$choicedesc = New-Object System.Collections.ObjectModel.Collection[System.Management.Automation.Host.ChoiceDescription]
    		$choices | foreach  { $choicedesc.Add((New-Object "System.Management.Automation.Host.ChoiceDescription" -ArgumentList $_))}
    		$prompt = $Host.ui.PromptForChoice($caption, $message, $choicedesc, 1)
    		Switch ($prompt)
    		{	0 {	Remove-Item $ISOPath -Recurse -Force -ErrorAction 0}
    			1 {	Write-Host "$ISOPath will not be overwritten; exiting"; exit}
    		}
    	} until ( -not (Test-Path "$ISOPath"))
    }
    
    # Validate Source exists 
    if (-not (Test-Path "$Source")) {Read-Host -Prompt "ERROR: The following processor architecture was not found: $WinPE_Arch"; exit}
    if (-not (Test-Path "$FWFilesRoot")) {Read-Host -Prompt "ERROR: The following path for firmware files was not found: $FWFilesRoot"; exit}
    if (-not (Test-Path "$WIMSourcePath")) {Read-Host -Prompt "ERROR: WinPE WIM file does not exist: $WIMSourcePath"; exit}
    
    # Delete old working directory
    
    $ProgressPreference = "SilentlyContinue"
    Clear-WindowsCorruptMountPoint
    Mount-WindowsImage -Path "$WorkDir\mount" -Remount
    Dismount-WindowsImage  -Path "$WorkDir\mount" -Discard
    $ProgressPreference = "Continue"
    
    Remove-Item $WorkDir -Recurse -Force -ErrorAction 0
    
    
    # Create new WinPE work directory (copied from copype.cmd in ADK)
    mkdir "$WorkDir"
    mkdir "$WorkDir\media"
    mkdir "$WorkDir\mount"
    mkdir "$WorkDir\fwfiles"
    mkdir "$WorkDir\media\sources"
    
    # Copy the boot files and WinPE WIM to the destination location
    xcopy /herky "$Source\Media\Boot" "$WorkDir\media\Boot\"
    xcopy /herky "$Source\Media\EFI" "$WorkDir\media\EFI\"
    copy "$Source\Media\bootmgr*" "$WorkDir\media\"
    copy "$WIMSourcePath" "$WorkDir\media\sources\boot.wim"
    
    # Copy the boot sector files to enable ISO creation and boot
    copy "$FWFilesRoot\efisys.bin" "$WorkDir\fwfiles"
    if (Test-Path $FWFilesRoot\etfsboot.com) {copy "$FWFilesRoot\etfsboot.com" "$WorkDir\fwfiles"}
    
    # Mount WIM
    Mount-WindowsImage -ImagePath "$WorkDir\media\sources\boot.wim" -index 1 -Path "$WorkDir\mount"
    
    # Add any device drivers (.inf files)
    Add-WindowsDriver -Path "$WorkDir\mount" -Driver "$HomeDir\Drivers\" -recurse
    
    # Change background image
    if (Test-Path "$HomeDir\winpe.jpg") {
    	takeown /f "$WorkDir\mount\Windows\System32\winpe.jpg"
    	icacls "$WorkDir\mount\Windows\System32\winpe.jpg" /grant Administrators:F  /q
    	copy "$HomeDir\winpe.jpg" "$WorkDir\mount\Windows\System32\winpe.jpg"
    }
    # Add packages/languages/optional components/.cab files
    function Add-Package ($cab){ 
    	Add-WindowsPackage -Path "$WorkDir\mount" -PackagePath "$ADK\Windows Preinstallation Environment\$PEArch\WinPE_OCs\$cab.cab"
    	Add-WindowsPackage -Path "$WorkDir\mount" -PackagePath "$ADK\Windows Preinstallation Environment\$PEArch\WinPE_OCs\$PELang\$cab`_$PELang.cab"
    }
    # https://technet.microsoft.com/en-us/library/hh824926.aspx
    Add-Package WinPE-WMI 			# subset of WMI providers that enable minimal system diagnostics
    Add-Package WinPE-NetFX 		# subset of the .NET Framework 4.5
    Add-Package WinPE-Scripting 	# multiple-language scripting environment
    Add-Package WinPE-PowerShell 	# PowerShell–based diagnostics (requires all previous)
    Add-Package WinPE-DismCmdlets 	# Dism PowerShell module
    
    Add-Package WinPE-HTA 			# provides HTML Application (HTA) support to create GUI applications
    Add-Package WinPE-Dot3Svc 		# required for wlansvc
     
    # Add files and folders
    if (Test-Path "$HomeDir\Documents") {xcopy  /herky "$HomeDir\Documents" "$WorkDir\mount\Users\Public\Documents"}
    
    # Copy in programs
    Write-Host "Copying Program Files"
    if (Test-Path "$HomeDir\Program Files") {Xcopy /s "$HomeDir\Program Files\*" "$WorkDir\mount\Program Files"}
    
    function Create-Shortcut ($ShortcutName,$ExePath) {
    	if (Test-Path $ExePath) {
    		$ShortcutPath="$WorkDir\mount\Users\Default\Desktop\"+(split-path $exepath -leaf).substring(0,(split-path $ExePath -leaf).length -4)+".lnk"
    		Write-Host "Shortcut created : " -nonewline -f yellow ; Write-Host $ShortcutPath -f yellow
    		$WshShell=New-Object -ComObject WScript.Shell
    		$Shortcut=$WshShell.CreateShortcut($ShortcutPath)
    		$Shortcut.TargetPath = $ExePath
    		$Shortcut.WorkingDirectory = Split-Path $ExePath -parent
    		#$Shortcut.IconLocation = "%SystemRoot%\system32\shell32.dll,217" # (54 accross *4 deep + 1 down = 217 in the dll)
    		$Shortcut.Save()
    		
    		if ((split-path $exepath -leaf).substring(0,(split-path $ExePath -leaf).length -4) -ne $ShortcutName) {
    			$NewShortcutPath = (Split-Path $ShortcutPath -parent)+'\'+$ShortcutName+'.lnk'
    			Rename-Item $ShortcutPath $NewShortcutPath
    			Write-Host "Shortcut renamed : " -nonewline -f yellow ; Write-Host $NewShortcutPath -f yellow
    		}
    	}
    }
    
    Create-Shortcut "Palemoon" 				"$WorkDir\mount\Program Files\Palemoon\Palemoon-Portable.exe"
    Create-Shortcut "Macrium Reflect" 		"$WorkDir\mount\Program Files\macrium\launch.exe"
    Create-Shortcut "PE Network Manager" 	"$WorkDir\mount\Program Files\PENetwork\PENetwork.exe"
    Create-Shortcut "Explorer++" 			"$WorkDir\mount\Program Files\Explorer++"
    Create-Shortcut "Command Prompt" 		"$WorkDir\mount\Windows\System32\cmd.exe"
    	
    # Modify the Startnet.cmd script to include your customized commands.
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "start /b cmd /c `"%PROGRAMFILES%\macrium\taskbar.exe`""
    
    # Add WiFi Services
    if ($WifiRequired) {
    # 
    # http://pcloadletter.co.uk/2011/12/03/windows-pe-builder-script-for-waik-including-wifi-support/
    
    mkdir $WorkDir\mount\Windows\schemas\AvailableNetwork
    copy "$env:SystemRoot\schemas\AvailableNetwork\AvailableNetworkInfo.xsd" "$WorkDir\mount\Windows\schemas\AvailableNetwork\AvailableNetworkInfo.xsd"	
    
    # exe
    copy "$env:SystemRoot\system32\wifitask.exe" "$WorkDir\mount\Windows\system32\wifitask.exe"
    copy "$env:SystemRoot\system32\wlanext.exe" "$WorkDir\mount\Windows\system32\wlanext.exe"	
    copy "$env:SystemRoot\system32\en-US\wlanext.exe.mui" "$WorkDir\mount\Windows\system32\en-US\wlanext.exe.mui"
    
    # wlan* Dlls
    copy "$env:SystemRoot\system32\wlanapi.dll" "$WorkDir\mount\Windows\system32\wlanapi.dll"	
    copy "$env:SystemRoot\system32\en-US\wlanapi.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlanapi.dll.mui"	
    copy "$env:SystemRoot\system32\wlancfg.dll" "$WorkDir\mount\Windows\system32\wlancfg.dll"	
    copy "$env:SystemRoot\system32\en-US\wlancfg.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlancfg.dll.mui"
    copy "$env:SystemRoot\system32\WLanConn.dll" "$WorkDir\mount\Windows\system32\WLanConn.dll"
    copy "$env:SystemRoot\system32\en-US\WLanConn.dll.mui" "$WorkDir\mount\Windows\system32\en-US\WLanConn.dll.mui"
    copy "$env:SystemRoot\system32\wlandlg.dll" "$WorkDir\mount\Windows\system32\wlandlg.dll"
    copy "$env:SystemRoot\system32\en-US\wlandlg.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlandlg.dll.mui"
    copy "$env:SystemRoot\system32\wlangpui.dll" "$WorkDir\mount\Windows\system32\wlangpui.dll"	
    copy "$env:SystemRoot\system32\en-US\wlangpui.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlangpui.dll.mui"
    copy "$env:SystemRoot\system32\WLanHC.dll" "$WorkDir\mount\Windows\system32\WLanHC.dll"	
    copy "$env:SystemRoot\system32\en-US\WLanHC.dll.mui" "$WorkDir\mount\Windows\system32\en-US\WLanHC.dll.mui"
    copy "$env:SystemRoot\system32\wlanhlp.dll" "$WorkDir\mount\Windows\system32\wlanhlp.dll"
    copy "$env:SystemRoot\system32\WlanMediaManager.dll" "$WorkDir\mount\Windows\system32\WlanMediaManager.dll"
    copy "$env:SystemRoot\system32\WlanMM.dll" "$WorkDir\mount\Windows\system32\wlanmm.dll"	
    copy "$env:SystemRoot\system32\en-US\WlanMM.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlanmm.dll.mui"	
    copy "$env:SystemRoot\system32\wlanmsm.dll" "$WorkDir\mount\Windows\system32\wlanmsm.dll"
    copy "$env:SystemRoot\system32\wlanpref.dll" "$WorkDir\mount\Windows\system32\wlanpref.dll"	
    copy "$env:SystemRoot\system32\en-US\wlanpref.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlanpref.dll.mui"	
    copy "$env:SystemRoot\system32\WlanRadioManager.dll" "$WorkDir\mount\Windows\system32\WlanRadioManager.dll"	
    copy "$env:SystemRoot\system32\wlansec.dll" "$WorkDir\mount\Windows\system32\wlansec.dll"	
    copy "$env:SystemRoot\system32\wlansvc.dll" "$WorkDir\mount\Windows\system32\wlansvc.dll"	
    copy "$env:SystemRoot\system32\en-US\wlansvc.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlansvc.dll.mui"	
    copy "$env:SystemRoot\system32\wlansvcpal.dll" "$WorkDir\mount\Windows\system32\wlansvcpal.dll"
    copy "$env:SystemRoot\system32\wlanui.dll" "$WorkDir\mount\Windows\system32\wlanui.dll"	
    copy "$env:SystemRoot\system32\en-US\wlanui.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlanui.dll.mui"
    # Already in WinPE image
    #copy "$env:SystemRoot\system32\wlanutil.dll" "$WorkDir\mount\Windows\system32\wlanutil.dll"	
    #copy "$env:SystemRoot\system32\en-US\wlanutil.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlanutil.dll.mui"
    
    # Wifi* dll
    copy "$env:SystemRoot\system32\WiFiConfigSP.dll" "$WorkDir\mount\Windows\system32\WiFiConfigSP.dll"	
    copy "$env:SystemRoot\system32\wificonnapi.dll" "$WorkDir\mount\Windows\system32\wificonnapi.dll"	
    copy "$env:SystemRoot\system32\WiFiDisplay.dll" "$WorkDir\mount\Windows\system32\WiFiDisplay.dll"	
    copy "$env:SystemRoot\system32\en-US\WiFiDisplay.dll.mui" "$WorkDir\mount\Windows\system32\en-US\WiFiDisplay.dll.mui"	
    copy "$env:SystemRoot\system32\wifinetworkmanager.dll" "$WorkDir\mount\Windows\system32\wifinetworkmanager.dll"	
    copy "$env:SystemRoot\system32\en-US\wifinetworkmanager.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wifinetworkmanager.dll.mui"
    copy "$env:SystemRoot\system32\wifiprofilessettinghandler.dll" "$WorkDir\mount\Windows\system32\wifiprofilessettinghandler.dll"	
    # Other dll
    copy "$env:SystemRoot\system32\wfdprov.dll" "$WorkDir\mount\Windows\system32\wfdprov.dll"	
    copy "$env:SystemRoot\system32\wlgpclnt.dll" "$WorkDir\mount\Windows\system32\wlgpclnt.dll"	
    copy "$env:SystemRoot\system32\en-US\wlgpclnt.dll.mui" "$WorkDir\mount\Windows\system32\en-US\wlgpclnt.dll.mui"	
    copy "$env:SystemRoot\System32\WcnNetsh.dll" "$WorkDir\mount\Windows\System32\WcnNetsh.dll"
    copy "$env:SystemRoot\System32\en-US\WcnNetsh.dll.mui" "$WorkDir\mount\Windows\System32\en-US\WcnNetsh.dll.mui"
    copy "$env:SystemRoot\System32\whhelper.dll" "$WorkDir\mount\Windows\System32\whhelper.dll"
    copy "$env:SystemRoot\System32\en-US\whhelper.dll.mui" "$WorkDir\mount\Windows\System32\en-US\whhelper.dll.mui"
    # drivers
    copy "$env:SystemRoot\System32\Drivers\nwifi.sys" "$WorkDir\mount\Windows\System32\Drivers\nwifi.sys"	
    copy "$env:SystemRoot\System32\Drivers\en-US\nwifi.sys.mui" "$WorkDir\mount\Windows\System32\Drivers\en-US\nwifi.sys.mui"
    # net start NativeWifiP failed due to missing signatures.  These are from sysinternals sigcheck -i c:\Windows\System32\drivers\nwifi.sys etc
    copy "$env:SystemRoot\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_297_for_KB3081444~31bf3856ad364e35~amd64~~10.0.1.0.cat" `
    "$WorkDir\mount\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_297_for_KB3081444~31bf3856ad364e35~amd64~~10.0.1.0.cat"	
    copy "$env:SystemRoot\system32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft-Windows-Client-Features-Package-AutoMerged-net~31bf3856ad364e35~amd64~en-US~10.0.10240.16384.cat" `
    "$WorkDir\mount\Windows\System32\CatRoot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Microsoft-Windows-Client-Features-Package-AutoMerged-net~31bf3856ad364e35~amd64~en-US~10.0.10240.16384.cat"	
    	
    copy "$env:SystemRoot\System32\Drivers\vwififlt.sys" "$WorkDir\mount\Windows\System32\Drivers\vwififlt.sys"	
    copy "$env:SystemRoot\System32\Drivers\vwifimp.sys" "$WorkDir\mount\Windows\System32\Drivers\vwifimp.sys"
    copy "$env:SystemRoot\System32\Drivers\WdiWiFi.sys" "$WorkDir\mount\Windows\System32\Drivers\WdiWiFi.sys"
    
    copy "$env:SystemRoot\Inf\netnwifi.inf" "$WorkDir\mount\Windows\Inf\netnwifi.inf"
    Add-WindowsDriver -Path "$WorkDir\mount" -Driver "$env:SystemRoot\Inf\netnwifi.inf"
    copy "$env:SystemRoot\Inf\netvwififlt.inf" "$WorkDir\mount\Windows\Inf\netvwififlt.inf"
    Add-WindowsDriver -Path "$WorkDir\mount" -Driver "$env:SystemRoot\Inf\netvwififlt.inf"
    copy "$env:SystemRoot\Inf\netvwifimp.inf" "$WorkDir\mount\Windows\Inf\netvwifimp.inf"
    Add-WindowsDriver -Path "$WorkDir\mount" -Driver "$env:SystemRoot\Inf\netvwifimp.inf"
    # http://www.msfn.org/board/topic/162453-winpe-40-enable-wireless-support/
    copy "$env:SystemRoot\Inf\netvwifibus.inf" "$WorkDir\mount\Windows\Inf\netvwifibus.inf"
    copy "$env:SystemRoot\System32\Drivers\vwifibus.sys" "$WorkDir\mount\Windows\System32\Drivers\vwifibus.sys"	
    copy "$env:SystemRoot\System32\Drivers\en-US\vwifibus.sys.mui" "$WorkDir\mount\Windows\System32\Drivers\en-US\vwifibus.sys.mui"	
    copy "$env:SystemRoot\System32\Drivers\vwifibus.sys" "$WorkDir\mount\Windows\Inf\vwifibus.sys"
    # Dism fails if vwifibus.sys is not added to C:\Windows\INF
    $AddedToInf = $False
    if (-not(Test-Path $env:SystemRoot\Inf\netvwifibus.sys)){
    	$AddedToInf = $True
    	copy "$env:SystemRoot\System32\Drivers\vwifibus.sys" "$env:SystemRoot\Inf\vwifibus.sys"
    	Write-Host "Added $env:SystemRoot\Inf\vwifibus.sys" -f Red
    }
    Add-WindowsDriver -Path "$WorkDir\mount" -Driver "$env:SystemRoot\Inf\netvwifibus.inf"
    if ($AddedToInf) {
    	Remove-Item "$env:SystemRoot\Inf\vwifibus.sys" -ErrorAction 0
    	Write-Host "Deleted $env:SystemRoot\Inf\vwifibus.sys" -f Red
    }
    # L2Schemas - copy any missing files
    robocopy /xc /xn /xo /copyall "$env:SystemRoot\L2Schemas" "$WorkDir\mount\Windows\L2Schemas"
    
    # Registry Changes
    reg load HKLM\WinPE_SYSTEM $WorkDir\mount\windows\system32\config\SYSTEM
    reg load HKLM\WinPE_SOFTWARE $WorkDir\mount\windows\system32\config\SOFTWARE
    
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\NetSh"
    reg add  $RegKey /v wlancfg /t REG_SZ /d wlancfg.dll /f
    
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost"
    reg add $RegKey /v LocalSystemNetworkRestricted /t REG_MULTI_SZ /d Netman\0hidserv\0svsvc\0dot3svc\0wlansvc /f
    
    # wlansvc
    reg add HKLM\WinPE_SOFTWARE\Microsoft\WlanSvc\bmr /ve
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\WlanSvc\PowerProfiles\ClassAC"
    reg add $RegKey /v PowerIdle /t REG_DWORD /d 15 # numbers are decimal
    reg add $RegKey /v PowerTail /t REG_DWORD /d 280
    reg add $RegKey /v PowerTxRx /t REG_DWORD /d 400
    reg add $RegKey /v TailDuration /t REG_DWORD /d 300
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\WlanSvc\PowerProfiles\ClassB"
    reg add $RegKey /v PowerIdle /t REG_DWORD /d 15
    reg add $RegKey /v PowerTail /t REG_DWORD /d 280
    reg add $RegKey /v PowerTxRx /t REG_DWORD /d 400
    reg add $RegKey /v TailDuration /t REG_DWORD /d 300
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\WlanSvc\PowerProfiles\ClassG"
    reg add $RegKey /v PowerIdle /t REG_DWORD /d 15
    reg add $RegKey /v PowerTail /t REG_DWORD /d 280
    reg add $RegKey /v PowerTxRx /t REG_DWORD /d 400
    reg add $RegKey /v TailDuration /t REG_DWORD /d 300
    $RegKey="HKLM\WinPE_SOFTWARE\Microsoft\WlanSvc\PowerProfiles\ClassN"
    reg add $RegKey /v PowerIdle /t REG_DWORD /d 15
    reg add $RegKey /v PowerTail /t REG_DWORD /d 280
    reg add $RegKey /v PowerTxRx /t REG_DWORD /d 400
    reg add $RegKey /v TailDuration /t REG_DWORD /d 300
    
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc"
    reg add $RegKey /v DisplayName /d "@%SystemRoot%\System32\wlansvc.dll,-257" 
    reg add $RegKey /v ErrorControl /t REG_DWORD /d 1
    reg add $RegKey /v Group /d TDI
    reg add $RegKey /v ImagePath /t REG_EXPAND_SZ /d "%SystemRoot%\system32\svchost.exe -k LocalSystemNetworkRestricted"
    reg add $RegKey /v Start /t REG_DWORD /d 2 # (automatic start) in clean install system this is 3(manual start)
    reg add $RegKey /v Type /t REG_DWORD /d 32
    reg add $RegKey /v Description /d "@%SystemRoot%\System32\wlansvc.dll,-258" 
    # Remove the Windows Connection Manager (wcmsvc) service dependany
    reg add $RegKey /v DependOnService /t REG_MULTI_SZ /d nativewifip\0RpcSs\0Ndisuio
    reg add $RegKey /v ObjectName /d LocalSystem
    reg add $RegKey /v ServiceSidType /t REG_DWORD /d 1
    reg add $RegKey /v RequiredPrivileges /t REG_MULTI_SZ /d "SeChangeNotifyPrivilege\0SeImpersonatePrivilege\0SeAuditPrivilege\0SeTcbPrivilege\0SeDebugPrivilege"
    reg add $RegKey /v FailureActions /t REG_BINARY /d 805101000000000000000000030000001400000001000000c0d4010001000000e09304000000000000000000
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters"
    reg add $RegKey /v ServiceDll /t REG_EXPAND_SZ /d "%SystemRoot%\System32\wlansvc.dll" 
    reg add $RegKey /v ServiceDllUnloadOnStop /t REG_DWORD /d 1
    reg add $RegKey /v ServiceMain /d WlanSvcMain
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\ComInterfaceProviders"
    reg add $RegKey /v IHNetIcsSettings /d "{46C166AA-3108-11D4-9348-00C04F8EEB71}"
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\EapolKeyIpAddress"
    reg add $RegKey /v LocalAddress /d "192.168.173.1"
    reg add $RegKey /v PrefixLength /t REG_DWORD /d 24
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\OEM\SystemCapabilities"
    reg add $RegKey /ve #***************** no value
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\OneXAuthenticator"
    reg add $RegKey /ve /t REG_EXPAND_SZ /d "%SystemRoot%\System32\WcnEapAuthProxy.dll"
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\VendorSpecificIEProviders\02166b50-0459-44d9-9ec1-073431b7d9c9"
    reg add $RegKey /v Path /t REG_EXPAND_SZ /d "%SYSTEMROOT%\System32\TetheringIeProvider.dll" 
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\VendorSpecificIEProviders\4D50EE01-EEE0-4E5D-9A41-2F5F32044192"
    reg add $RegKey /v Path /t REG_EXPAND_SZ /d "%SYSTEMROOT%\System32\WlanSvc.dll" 
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\VendorSpecificIEProviders\B7D94B4D-5DB1-4E70-B5C3-DD003EEEBE66"
    reg add $RegKey /v Path /t REG_EXPAND_SZ /d "%SYSTEMROOT%\System32\WiFiDisplay.dll" 
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Parameters\WFDProvPlugin"
    reg add $RegKey /ve /t REG_EXPAND_SZ /d "%SystemRoot%\System32\wfdprov.dll"
    reg add $RegKey /v DllEntryPoint /d WFDProvGetInfo 
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Security"
    reg add $RegKey /v Security /t REG_BINARY /d 0100048098000000a40000000000000014000000020084000500000000001400fd01020001010000000000051200000000001800ff010f0001020000000000052000000020020000000014008d010200010100000000000504000000000014008d01020001010000000000050600000000002800700000000106000000000005500000002e25d9e85a67cd58c504f3dc32c0cb09ab704571010100000000000512000000010100000000000512000000
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\VirtualizationManager"
    reg add $RegKey /v WindowsPushNotificationPlatformClsid /d "0C9281F9-6DA1-4006-8729-DE6E6B61581C"
    
    # Native Wifi Filter (dependancy of wlansvc)
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\NativeWifiP"
    reg add $RegKey /v DisplayName /d "@%SystemRoot%\System32\drivers\nwifi.sys,-101" 
    reg add $RegKey /v ErrorControl /t REG_DWORD /d 1
    reg add $RegKey /v Group /d NDIS
    reg add $RegKey /v ImagePath /t REG_EXPAND_SZ /d "system32\DRIVERS\nwifi.sys"
    reg add $RegKey /v Start /t REG_DWORD /d 3
    reg add $RegKey /v Type /t REG_DWORD /d 1
    
    # vwififlt
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\vwififlt"
    reg add $RegKey /v DisplayName /d "@%SystemRoot%\System32\drivers\vwififlt.sys,-259" 
    reg add $RegKey /v ErrorControl /t REG_DWORD /d 1
    reg add $RegKey /v Group /d NDIS
    reg add $RegKey /v ImagePath /t REG_EXPAND_SZ /d "System32\drivers\vwififlt.sys"
    reg add $RegKey /v Start /t REG_DWORD /d 1
    reg add $RegKey /v Type /t REG_DWORD /d 1
    reg add $RegKey /v Description /d "@%SystemRoot%\System32\drivers\vwififlt.sys,-260"
    reg add $RegKey /v NdisMajorVersion /t REG_DWORD /d 6
    reg add $RegKey /v NdisMinorVersion /t REG_DWORD /d 50
    reg add $RegKey /v DriverMajorVersion /t REG_DWORD /d 1
    reg add $RegKey /v DriverMinorVersion /t REG_DWORD /d 0
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\vwififlt\Parameters"
    reg add $RegKey /v DefaultFilterSettings /t REG_DWORD /d 1
    
    # vwifimp not in core image
    #$RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\vwifimp"
    #reg add $RegKey /v Type /t REG_DWORD /d 1
    #reg add $RegKey /v Start /t REG_DWORD /d 3
    #reg add $RegKey /v ErrorControl /t REG_DWORD /d 1
    #reg add $RegKey /v Tag /t REG_DWORD /d 15
    #reg add $RegKey /v ImagePath /t REG_EXPAND_SZ /d "\SystemRoot\System32\drivers\vwifimp.sys"
    #reg add $RegKey /v DisplayName /d "@%SystemRoot%\System32\drivers\vwifimp.sys,-261" 
    #reg add $RegKey /v Group /d NDIS
    #reg add $RegKey /v Owners /t REG_MULTI_SZ /d "netvwifimp.inf"
    #reg add $RegKey /v TextModeFlags /t REG_DWORD /d 1
    #reg add $RegKey /v NdisMajorVersion /t REG_DWORD /d 6
    #reg add $RegKey /v NdisMinorVersion /t REG_DWORD /d 40
    #reg add $RegKey /v DriverMajorVersion /t REG_DWORD /d 1
    #reg add $RegKey /v DriverMinorVersion /t REG_DWORD /d 1
    #$RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\vwififlt\Enum"
    #reg add $RegKey /v Count /t REG_DWORD /d 1
    #reg add $RegKey /v NextInstancet /t REG_DWORD /d 1
    #reg add  $RegKey /v 0 /d "{5d624f94-8850-40c3-a3fa-a4fd2080baf3}\vwifimp_wfd\5&e58d9b&0&01"
    
    # WdiWifi
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\wdiwifi"
    reg add $RegKey /v DisplayName /d "WDI Driver Framework" 
    reg add $RegKey /v ErrorControl /t REG_DWORD /d 1
    reg add $RegKey /v ImagePath /t REG_EXPAND_SZ /d "system32\DRIVERS\wdiwifi.sys"
    reg add $RegKey /v Start /t REG_DWORD /d 3
    reg add $RegKey /v Type /t REG_DWORD /d 1
    
    # legacy WiFi adapter - recommended by http://pcloadletter.co.uk/2011/12/03/windows-pe-builder-script-for-waik-including-wifi-support/
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC"
    reg add $RegKey /v NextInstance /t REG_DWORD /d 1 # numbers are decimal
    reg add $RegKey\0000 /v Service /t REG_SZ /d Wlansvc
    reg add $RegKey\0000 /v Legacy /t REG_DWORD /d 1
    reg add $RegKey\0000 /v ConfigFlags /t REG_DWORD /d 0
    reg add $RegKey\0000 /v Class /t REG_SZ /d LegacyDriver
    reg add $RegKey\0000 /v ClassGUID /t REG_SZ /d "{8ECC055D-047F-11D1-A537-0000F8753ED1}"
    reg add $RegKey\0000 /v DeviceDesc /t REG_SZ /d "@%SystemRoot%\System32\wlansvc.dll,-257"
    $RegKey="HKLM\WinPE_SYSTEM\ControlSet001\services\WlanSvc\Enum"
    reg add $RegKey /v 0 /t REG_SZ /d "Root\LEGACY_WLANSVC\0000"
    reg add $RegKey /v Count /t REG_DWORD /d 1
    reg add $RegKey /v NextInstance /t REG_DWORD /d 1
    
    reg unload HKLM\WinPE_SYSTEM
    reg unload HKLM\WinPE_SOFTWARE
    
    # Windows Connection Manager - Wcmsvc ** Not required and removed as dependancy **
    
    # Startup Wifi
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "netcfg -l %SystemRoot%\Inf\netnwifi.inf -c s -i MS_NativeWifiP"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "netcfg -l %SystemRoot%\Inf\netvwififlt.inf -c s -i ms_vwifi"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "net start dot3svc"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "net start wlansvc"
    }
    
    ############
    # FINISH UP
    ############
    if ($Debug) {
    	$caption="Unmount work directory?"
    	$choicedesc = New-Object System.Collections.ObjectModel.Collection[System.Management.Automation.Host.ChoiceDescription]
    	$choices | foreach  { $choicedesc.Add((New-Object "System.Management.Automation.Host.ChoiceDescription" -ArgumentList $_))}
    	$prompt = $Host.ui.PromptForChoice($caption, $message, $choicedesc, 0)
    	Switch ($prompt) {1	{exit}}
    }
    # Set the time zone to GMT+1 Brussels, Copenhagen, Madrid, Paris
    & (gcm "$ADK\Deployment Tools\$PEArch\DISM\dism.exe") @("/image:$WorkDir\mount",'/Set-TimeZone:Romance Standard Time')
    
    # Increase the writable memory space
    & (gcm "$ADK\Deployment Tools\$PEArch\DISM\dism.exe") @("/image:$WorkDir\mount",'/Set-ScratchSpace:256')
     
    # Unmount the WinPE image
    Get-WindowsImage -Mounted -ErrorAction Stop | ForEach-Object {
    	# Save-WindowsImage -Path $_.ImagePath
    	Dismount-WindowsImage -Path $_.Path -Save -ErrorAction Stop
    }
    
    # Validate Work Directories
    if (-not (Test-Path "$WorkDir")) {Read-Host -Prompt "ERROR: Working directory does not exist: $WorkDir"; exit}
    if (-not (Test-Path "$WorkDir/media")) {Read-Host -Prompt "ERROR: Working directory is not valid:: $WorkDir"; exit}
    
    #Validate ISO doesn't already exist (again)
    if (Test-Path "$ISOPath") {Read-Host -Prompt "ERROR: Destination directory exists: $ISOPath"; exit}
    
    # Mac OS BootCamp will look for autorun.inf in order to validate this disk as a Windows Installer CD
    # adding this allows us to start unattended installs using WinPE
    date > $WorkDir\media\autorun.inf
    
    if ($Debug) {
    	$caption="Make ISO?"
    	$choicedesc = New-Object System.Collections.ObjectModel.Collection[System.Management.Automation.Host.ChoiceDescription]
    	$choices | foreach  { $choicedesc.Add((New-Object "System.Management.Automation.Host.ChoiceDescription" -ArgumentList $_))}
    	$prompt = $Host.ui.PromptForChoice($caption, $message, $choicedesc, 0)
    	Switch ($prompt) {1	{exit}}
    }
    
    # Set the correct boot argument based on availability of boot apps
    if (Test-Path "$WorkDir\fwfiles\etfsboot.com") {$BOOTDATA="2#p0,e,b`"$WorkDir\fwfiles\etfsboot.com`"#pEF,e,b`"$WorkDir\fwfiles\efisys.bin`""}
    else {$BOOTDATA="1#pEF,e,b`"$WorkDir\fwfiles\efisys.bin`""}
    
    # Make ISO
    $command="$ADK\Deployment Tools\$PEArch\Oscdimg\oscdimg.exe"
    Write-Host "Creating $ISOPath ..."
    &$command  -l:$ISOLabel -h -m -o -u1 -bootdata:$bootdata "$WorkDir\media" "$ISOPath"
    		
    # Finished
    Write-Host
    Read-Host -Prompt "Press enter to exit."
    If you look (I will save you the time) you need these for sure:
    Code:
    # Startup Wifi
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "netcfg -l %SystemRoot%\Inf\netnwifi.inf -c s -i MS_NativeWifiP"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "netcfg -l %SystemRoot%\Inf\netvwififlt.inf -c s -i ms_vwifi"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "net start dot3svc"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "net start wlansvc"
    I'm sorry but I don't know the answer except you definitely 100% need those 4.

    You need to mark your thread as "unsolved" btw as anyone looking will think it is all OK now.
      My ComputerSystem Spec


  3. Posts : 30
    Windows 8.1/10 Enterprise x64
    Thread Starter
       26 Feb 2018 #13

    lx07 said: View Post
    You need to mark your thread as "unsolved" btw as anyone looking will think it is all OK now.
    It is OK now, see the post above
      My ComputerSystem Spec


 
Page 2 of 2 FirstFirst 12

Related Threads
Hello, Thank you in advancefor any help. I am senior who helps other seniors in this small townkeep their pc ‘s operating as best I can. I have an HP laptopthat was reworked by a shop sometime ago. I updated this pc to WinAnniveresary Issue and...
Hello. I have three Dell XPS PCs connected via a Verizon Actiontec router to each other and to the internet, all running Windows 10 (two preinstalled, one upgraded from Windows 7). All connect fine to the internet via Ethernet and wifi, but they...
Hi there This USB Wifi adapter seems to be a MEGA performer --Lovely finally to be able to THINK of getting rid of LAN cables all over the place. I've no probs with decent HD Movie streaming from a SERVER with one of these (I unplugged the LAN...
I have Windows 10 Home, fully updated. My next-door neighbor rents his cable modem from Time Warner, so there's an open network called TWC Wifi (and also a Cable Wifi). I have never manually connected to this network, and it doesn't show up in...
28883 My pc wifi 2 adapter network no screnn :(
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:34.
Find Us