Windows 10: How do I make Wifi work in PE? Solved

  1.    09 Oct 2015 #1

    How do I make Wifi work in PE?


    I've been trying to make a PE image and it is working fine. I can add programs (Macrium, PaleMoon, Explorer++) and it works fine in VM (through virtual Ethernet). It also works booting it from USB.

    What I can't do is make WiFi work when booting from USB. I need this as I don't have Ethernet at all on my laptop.

    I've tried adding the various drivers but can't get it to work.

    Can anyone help - or see what I have done wrong or left out?

    This is what I have done so far for WiFi:
    Code:
    # Add any device drivers (.inf files) - this folder contains BroadcomWirelessWin8x64
    
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$HomeDir\Drivers\" /recurse
    
    # For Wifi - http://www.msfn.org/board/topic/162453-winpe-40-enable-wireless-support/
    
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$env:SystemRoot\Inf\netnwifi.inf"
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$env:SystemRoot\Inf\netvwififlt.inf"
    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\vwifibus.sys" "$WorkDir\mount\Windows\Inf\vwifibus.sys"
    
    # Wifi adapter
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$HomeDir\Drivers\BroadcomWirelessWin8x64\bcmwl63.inf"
    And this is all of of my PE ISO generation script (just in case I forgot something above)...
    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"
    $WinPE_Arch = "amd64"
    
    $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	
    
    # Display message variables
    $message="Enter choice"
    $choices=@("&Yes","&No")
    
    # Environment Variables for script
    $WorkDir = "$HomeDir\WinPE_+$WinPE_Arch"
    $Source="$ADK\Windows Preinstallation Environment\$WinPE_Arch"
    $FWFilesRoot="$ADK\Deployment Tools\$WinPE_Arch\Oscdimg"
    $WIMSourcePath="$Source\en-us\winpe.wim"
    $WinPE_OCs="$ADK\Windows Preinstallation Environment\$WinPE_Arch\WinPE_OCs" 	
    
    ##########
    # 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") {
    	Remove-Item $ISOPath -Recurse -Force -ErrorAction 0
    	$caption="Destination file $ISOPath exists, overwrite 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}
    	}
    }
    
    # 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"
    dism /Remount-Image /MountDir:"$WorkDir\mount"
    dism /Unmount-Image /MountDir:"$WorkDir\mount" /discard
    dism /Cleanup-Mountpoints
    $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
    Dism /Mount-Image /ImageFile:"$WorkDir\media\sources\boot.wim" /index:1 /MountDir:"$WorkDir\mount"
    ##########
    # Add any device drivers (.inf files)
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$HomeDir\Drivers\" /recurse
    
    # For Wifi - http://www.msfn.org/board/topic/162453-winpe-40-enable-wireless-support/
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$env:SystemRoot\Inf\netnwifi.inf"
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$env:SystemRoot\Inf\netvwififlt.inf"
    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\vwifibus.sys" "$WorkDir\mount\Windows\Inf\vwifibus.sys"
    
    # Wifi adapter
    Dism /Add-Driver /Image:"$WorkDir\mount" /Driver:"$HomeDir\Drivers\BroadcomWirelessWin8x64\bcmwl63.inf"
    	
    # copy profile to PE as it will be needed
    netsh wlan export profile name = $WifiProfile "Hali" folder="D:\Make-PE\Documents" key=clear
    
    # Verify Drivers and give option to quit if incorrect
    Dism /Get-Drivers /Image:"$WorkDir\mount"
    
    $caption="Correct Drivers?  Continue?"
    $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}}
    ##########
    # 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
    
    # WinPE-HTA provides HTML Application (HTA) support to create GUI applications through the Windows Internet Explorer® script engine and HTML services.
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-HTA.cab"  
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-HTA_en-us.cab"
    
    # WinPE-WMI contains a subset of the Windows Management Instrumentation (WMI) providers that enable minimal system diagnostics
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-WMI.cab"
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
    
    # WinPE-NetFX contains a subset of the .NET Framework 4.5 that is designed for client applications.
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-NetFX.cab"
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-NetFX_en-us.cab"
     
    # WinPE-Scripting contains a multiple-language scripting environment
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-Scripting.cab"
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
    
    # WinPE-PowerShell contains Windows PowerShell–based diagnostics
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-PowerShell.cab"
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
    
    # WinPE-DismCmdlets contains the DISM PowerShell module
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\WinPE-DismCmdlets.cab"
    Dism /Add-Package /Image:"$WorkDir\mount" /PackagePath:"$WinPE_OCs\en-us\WinPE-DismCmdlets_en-us.cab"
    
    ##########
    # Add files and folders
    # Copy files and folders into the C:\WinPE_amd64\mount folder.
    if (Test-Path "$HomeDir\Documents") {xcopy  /herky "$HomeDir\Documents" "$Work Dir\mount\Users\Public\Documents"}
    ##########
    # DLL's needed..
    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"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "reg add HKLM\Software\Microsoft\NetSh /v wlancfg /t REG_SZ /d wlancfg.dll /f"
    #Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "regsvr32 /s wlancfg.dll"
    
    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"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "reg add HKLM\Software\Microsoft\NetSh /v WcnNetsh /t REG_SZ /d WcnNetsh.dll /f"
    #Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "regsvr32 /s WcnNetsh.dll"
    ##########
    # Add a startup script
    # Modify the Startnet.cmd script to include your customized commands.
    # This file is located at C:\WinPE_amd64\mount\Windows\System32\Startnet.cmd.
    
    # Startup programs
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "`"%PROGRAMFILES%\macrium\peexplorer.exe`""
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "`"%PROGRAMFILES%\macrium\taskbar.exe`""
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "%SYSTEMROOT%\System32\cmd.exe"
    Add-Content "$WorkDir\mount\Windows\System32\Startnet.cmd" "%SYSTEMROOT%\Explorer++.exe"
    ##########
    # Add an app - call it from X:\Windows\<MyApp> when booted from PE
    Write-Host "Copying Windows"
    Xcopy /s "$HomeDir\Windows\*"             "$WorkDir\mount\Windows"
    Write-Host "Copying Program Files"
    Xcopy /s "$HomeDir\Program Files\*"       "$WorkDir\mount\Program Files"
    Write-Host "Copying Program Files (x86)"
    Xcopy /s "$HomeDir\Program Files (x86)\*" "$WorkDir\mount\Program Files (x86)"
    ##########
    # Add temporary storage (scratch space)
    Dism /Set-ScratchSpace:512 /Image:"$WorkDir\mount"
    
    # Unmount the WinPE image
    Dism /Unmount-Image /MountDir:"$WorkDir\mount" /commit
    
    # 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: $WorkDir"; 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\$WinPE_Arch\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."
    Last edited by lx07; 09 Oct 2015 at 06:37.
      My System SpecsSystem Spec

  2.    01 Dec 2015 #2

    Hi,

    I am also trying to enable wifi in winpe 10. I was able to enable on winpe3.1, winpe5.0 and winpe5.1. I followed the same steps as of previous winpe versions, but couldn't able to enable wifi in winpe 10. It seems, nativewifip service is not running. further investigation shows that, required registry entries are not there in registry for nativewifip. Generally these will be updated when we install netnwifi.inf file. "netcfg -l netnwifi.inf -c s -I MS_NativeWifiP" is returning success but registry entries are not updated for nativewifip service. when I cross checked the netnwifi.inf in windows 10 against windows8, there are differences. in netnwifi.inf of windows10, no entries related to nativewifip available. Is there any change from windows8 to wndows10. If any one tried enabling wifi in winpe10, can you please give the pointers.
      My System SpecsSystem Spec

  3.    01 Dec 2015 #3

    I found you had to add a whole lot of extra stuff to get net start wlansvc and netsh wlan to work ....

    regedits required for NativeWifiP (among others) are below. NativeWifiP failed also due to missing signatures and these are copied in also (in red).

    The sources are mentioned in the code but are updated with what was present in a virgin 10 Pro install.
    Code:
    # 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 (not required)
    
    # 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"
    }
    Last edited by lx07; 01 Dec 2015 at 09:02. Reason: highlighting
      My System SpecsSystem Spec

  4.    02 Dec 2015 #4

    Hi,

    Thank you very much. I could able to enable wifi in winpe10. Earlier I was updating the registry entries for nativewifip. from you script I released that some more things like vwifi also needed. thank you very much.
      My System SpecsSystem Spec

  5.    02 Dec 2015 #5

    attaramu said: View Post
    Hi,

    Thank you very much. I could able to enable wifi in winpe10. Earlier I was updating the registry entries for nativewifip. from you script I released that some more things like vwifi also needed. thank you very much.
    You are welcome. Not sure why they make it so difficult as Wi-Fi is very useful in WinPE...
      My System SpecsSystem Spec

  6.    19 Dec 2015 #6

    Hi,

    Thank you very much. Is my assumption correct that the script is PowerShell? And can you post the complete script?
      My System SpecsSystem Spec


 

Related Threads
Hello, I just noticed that I can't make my browsers: Internet Explorer / Chrome to work with AMD Switchable graphics. (And some others softwares such as WMP) I have a laptop with both AMD gpu and the on-board intel, but I can't make the browser...
Hello, I'm trying to make the WINMM-OGG wrapper to work on Windows 10. It seems that Microsoft changed something in the WINMM.DLL file and all the wrappers based on the WINMM-WAV or WINMM-OGG wrappers got broken. There are several Forums talking...
I upgraded from 8.1 to 10.0 2-3 weeks ago. Wifi worked fine until a couple of days ago. Now the icon says "Not connected - No connections are available." But there are! I'm sending this from my Windows 8.1 notebook and it says there are 4 wifi's...
wifi adaptors wont work. in Network and Sharing
hi. i have 2 wireless adaptor and no one work on windows 10. i used a wired connection and its work fine but wlan dont work. in device manager system has installed and recognized the adaptor but in adaptor setting in network sharing there is no...
I downloaded Windows 10 when advised it was ready for me. It would not operate, then they told me to reset, Of course I lost a lot of non Microsoft Programs and Drivers. The USB Wireless Adapter will not connect to Modem, it is an EDUP EP-MS1539, I...
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 19:24.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums