macshuffle Posted March 28, 2013 Posted March 28, 2013 (edited) I've successfully used the various guides out there to build a WinPE 3.0 build with wireless support. In addition, I got it to the point where I could image a new laptop form start to finish completely over the wireless network with SCCM.I'm trying to do the same thing with WinPE 4.0 x64, but the same hacks don't work. It appears that the wlansvc depends on the wcmsvc in order to launch in WinPE 4.0 (Windows 8). Here is what I've done so far.I've done the following with WinPE 4.0 x64 boot.wim file mounted to c:\mountWinPE 4.0 x64 Packages----------------------------------Added dot3svc package. This is needed as the dot3svc service needs to be running in order to start wlansvc and wcmsvc.dism /Image:C:\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\WINPE-DOT3SVC.CAB"dism /Image:C:\mount /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\en-us\WINPE-DOT3SVC_EN-US.CAB"Registry Edits-------------------reg load HKLM\PE-BUILD-SYSTEM "C:\mount\Windows\System32\config\SYSTEM" reg load HKLM\PE-BUILD-SOFTWARE "C:\mount\Windows\System32\config\SOFTWARE" reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v DisplayName /t REG_SZ /d "@%%SystemRoot%%\System32\Wcmsvc.dll,-4097" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v ErrorControl /t REG_DWORD /d 1 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v Group /t REG_SZ /d TDI /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v ImagePath /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\svchost.exe -k LocalServiceNetworkRestricted" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v Start /t REG_DWORD /d 2 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v Type /t REG_DWORD /d 32 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v Description /t REG_SZ /d "@%%SystemRoot%%\System32\Wcmsvc.dll,-4098" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v DependOnService /t REG_MULTI_SZ /d "RpcSs" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v ObjectName /t REG_SZ /d "NT Authority\LocalService" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v ServiceSidType /t REG_DWORD /d 1 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v RequiredPrivileges /t REG_MULTI_SZ /d "SeChangeNotifyPrivilege\0SeImpersonatePrivilege" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc /v FailureActions /t REG_BINARY /d 805101000000000000000000030000001400000001000000C0D4010001000000E09304000000000000000000 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc\Parameters /v ServiceDll /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\Wcmsvc.dll" /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc\Parameters /v ServiceDllUnloadOnStop /t REG_DWORD /d 1 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\services\Wcmsvc\Parameters /v ServiceMain /t REG_SZ /d WcmSvcMain /f FIles Copied from Windows 8 x64 to PE 4.0 x64 wim-----------------------------------------------------------------------*NOTE - for the catroot files...not sure if ALL of these are needed....but some of the files need them due to Win 8 signing all the files*From Under system32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}Microsoft-Windows-Client-Drivers-Package-base~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-base~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-drivers~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-drivers~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-net~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-net~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-windows~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package-windows~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Drivers-Package~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-base~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-base~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-drivers~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-drivers~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-inetcore~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-inetcore~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-inetsrv~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-net~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-net~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-windows~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package-windows~31bf3856ad364e35~amd64~~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package~31bf3856ad364e35~amd64~en-US~6.2.9200.16384.catMicrosoft-Windows-Client-Features-Package~31bf3856ad364e35~amd64~~6.2.9200.16384.catUnder system32\driverswcmsvc.dllUnder system32\drivers\en-USwcmsvc.dll.muiUp to this point, the services wont start.....here is where I start breaking things.....and need help.I then made these registry changes:reg add "HKLM\PE-BUILD-SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost" /v LocalSystemNetworkRestricted /t REG_MULTI_SZ /d Netman\0hidserv\0svsvc\0dot3svc\0wlansvc /freg add "HKLM\PE-BUILD-SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost" /v LocalServiceNetworkRestricted /t REG_MULTI_SZ /d DHCP\0eventlog\0LmHosts\0wcmsvc /fI tried mirroring the LocalServiceNetworkRestricted off of how LocalSystemNetworkRestricted was done for the WinPE 3.0. Please note that I did update LocalSystemNetworkRestricted to reflect the service names for WinPE 4.0 / Win 8.I kept these changes from the WinPE 3.0 wifi configuration, but didn't know if something similar needed to be made for the wcmsvc service. One thing to note was that registry permissions prevented me from making these changes at first...I had to take ownership and modify the permissions and then I was able to add them. This could be were things got worse. At some point my WinPE 4.0 did recognize ANY network adapters (wired or wireless)reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC /v NextInstance /t REG_DWORD /d 1 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v Service /t REG_SZ /d Wlansvc /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v Legacy /t REG_DWORD /d 1 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v ConfigFlags /t REG_DWORD /d 0 /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v Class /t REG_SZ /d LegacyDriver /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v ClassGUID /t REG_SZ /d {8ECC055D-047F-11D1-A537-0000F8753ED1} /f reg add HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVC\0000 /v DeviceDesc /t REG_SZ /d "@%%SystemRoot%%\System32\wlansvc.dll,-257" /f So, after working with it a while I was able to get the dot3svc, wcmsvc and wlansvc to all start, but it did not appear that the wireless device was being seen. In addition, at least once when trying to start wlansvc it would throw an error. I didn't copy it down, but I can provide some more info when I'm back at this tomorrow.So, that is where things are at. If anyone has cracked this yet I'd be interested to know what needs to be done! Thanks! Edited March 28, 2013 by macshuffle
Tripredacus Posted March 28, 2013 Posted March 28, 2013 I think ChrisR's project has this ability. Maybe look at his PE project and see how he does it.
hvandrie Posted March 19, 2014 Posted March 19, 2014 MacShuffle,I've got the missing piece of your puzzle.Thanks to your extended information, and the info I too found for WinPE 3.0, I now have it working correctly on WinPE 4.0 and 5.0.First, you do not need to implement "WcmSvc", or "Windows Connection Manager", service. When you create the wlansvc service and it's listed in the "DependsOnService" entry of the server, just remove the entry wcmsvc from the reg_multi_sz key.Second, the error wlansvc cannot start with error "The handle is invalid (error 6) is because you're missing a file in your configuration.You need an additional schema file copied into your WinPE 4.0/5.0 image: "WLAN_profile_v2.xsd". Source location in your full blown Windows is: "C:\Windows\L2Schemas\WLAN_profile_v2.xsd" .Third, certain wireless adapter drivers have an "Include" in their .inf file to include an additional virtual adapter driver, like Intel have. When you open such a driver file, search for "Include=".In all latest Intel Wireless drivers, you'll see listed: "Include=netvwifibus.inf"To add this to your WinPE 4.0/5.0 image, copy the following files to the following locations in your WinPE image:Windows ---> WinPE imageC:\Windows\Inf\netvwifibus.inf ---> <mountdir>\Windows\Inf\netvwifibus.infC:\Windows\System32\Drivers\vwifibus.sys ---> <mountdir>\Windows\System32\Drivers\vwifibus.sysAnd, very important:C:\Windows\System32\Drivers\vwifibus.sys --> <mountdir>\Windows\Inf\vwifibus.sysSomehow, it only works properly when the .sys file is (also) included in the <WinPE>\Windows\Inf folder.Fourth, the drvload command to load netnwifi.inf, netvwififlt.inf and netvwifimp.inf won't work. You get the signature error, and copying the catalog files won't help.Though, I did now copy them as well, here's how to load the services from the 3 net*.inf files once WinPE 4.0/5.0 is booted:netcfg -l %SystemRoot%\Inf\netnwifi.inf -c s -i MS_NativeWifiPnetcfg -l %SystemRoot%\Inf\netvwififlt.inf -c s -i ms_vwifiAnd, voila... you now are able to start the wlansvc without a problem and use netshell command (netsh) to see and add wireless network profiles to connect to.Oh, little detail: sometimes the wireless driver doesn't load fully, most likely due to the two stage install of the virtual adapter driver. I used devcon rescan to let WinPE do a redetection and than it automatically started working properly.Have fun!!!Herman v3
jaclaz Posted March 19, 2014 Posted March 19, 2014 (edited) And, voila... you now are able to start the wlansvc without a problem and use netshell command (netsh) to see and add wireless network profiles to connect to.Oh, little detail: sometimes the wireless driver doesn't load fully, most likely due to the two stage install of the virtual adapter driver. I used devcon rescan to let WinPE do a redetection and than it automatically started working properly.Have fun!!!Herman v3Nice! Fourth, the drvload command to load netnwifi.inf, netvwififlt.inf and netvwifimp.inf won't work. You get the signature error, and copying the catalog files won't help.Though, I did now copy them as well, here's how to load the services from the 3 net*.inf files once WinPE 4.0/5.0 is booted:1) netcfg -l %SystemRoot%\Inf\netnwifi.inf -c s -i MS_NativeWifiP2) netcfg -l %SystemRoot%\Inf\netvwififlt.inf -c s -i ms_vwifi3) ? Which is the command for the third file netvwifimp.inf ? jaclaz Edited March 19, 2014 by jaclaz
hvandrie Posted March 19, 2014 Posted March 19, 2014 Jaclaz,Thanks!Actually, there's no 3rd command. And, just checked the requirement for the 3rd inf file netvwifimp.inf, but I can't find any dependencies. I did include it because it was referred to in another fora that described how to add wireless support for WinPE 3.0. So, I think you may ignore it, at this moment.What I did to test some things is to export profiles on a working windows system using netsh wlan export profile command, and import profiles in WinPE using the netsh wlan import command.Be sure to first start the wlansvc service prior to starting netsh in WinPE.Also, the easiest way to add the registry part for the LEGACY_WLAN keys and values, is to add registry permissions for <computername>\Administrators on the Enum and/or Root subkey in the registry keypath once you've loaded the System hive into your registry editor.I am gona work on an automated way to achieve this required part, well... wanna automate the whole stuff when I have some time.In order to connect to a enterprise wireless network that uses PEAP and MSCHAPv2 for user authentication, you need to use either some coding in .NET or use AutoItv3.I found the latter to be most easiest way to achieve this goal, will test a compiled piece of code that some guys already shared here: http://www.autoitscript.com/forum/topic/91018-native-wifi-functions/page-4Cheers,Herman v3
icewulf Posted March 29, 2014 Posted March 29, 2014 Hey Guys,Can someone post what is ACTUALLY needed ? I am a bit of a noob and a huge fan of copy/paste.Also, I cannot seem to be able to change the registry in WinPE even if i have admin rights on my machine and running cmd with admin rights. I tried editing the permissions of Enum and Root and windows gave me the finger.Help?Thanks.
michl2007 Posted June 9, 2014 Posted June 9, 2014 (edited) Hello, i have 2 differend Problems:winpe x86: if i would start wlansvc, dependency service failed to start winpe x64: if i would start wlansvc, the name from the service is not valid I have copied all Files from the first and third post and make the changes in the registry. @hvandrieCan you show us your proceed and did you test it with x86 or x64 winpe? GreetingsMicha Edited June 9, 2014 by michl2007
Tracat Posted October 15, 2014 Posted October 15, 2014 (edited) Hi, I would also be interested in finding out what the exact sequence to get the wifi working. I've tried to follow the first few posts to make adjustments to my WinPE5 to get the wifi working. I'm using a Lenovo Thinkpad 10 tablet. I've added the GPIO chipset drivers and the SDIO Wireless drivers using dism so the wireless adapater at least shows up if you do a netcfg -s n I've added the dot3svc and used some of the reg entries to get the wlansvc service installed. (I think). I have the relevant lines in au3 format if required. I also had to add ndisuio service via registry as dot3svc seemed to have this as a dependancy but it wasn't showing in the controlset001\services and wouldn't work until it was added. wlansvc seems to require nativewifip as a service but adding this via reg entries and using net start would complain of a lack of signatures so I removed the nativewifip dependancy and used the netcfg lines to run up ms_nativewifip and ms_vwifi instead as per above posts. When trying to net start wlansvc I get a System error 127 which shows up as "The specified procedure could not be found" which is where I am now stuck. I'm trying to get to the point where I can at least pull out the mac address of the wireless adapter using wmi but while I can pull out a usb connected network adapter that I plugged in I can't with the wireless adapter. Any help would be extremely helpful and appreciated. Edited October 15, 2014 by Tracat
nephewkp Posted September 18, 2015 Posted September 18, 2015 (edited) Any update on this old thread? I've hit a wall starting wlansvc getting a 1068 error even though all the dependent services appear to be started. EDIT: Copying the cab files over into windows\system32\cabfiles\{..... resulted in the error changing to the system error 6 (the handle is invalid) when starting wlansvc. Not sure what file is missing...I have the additional xsd file copied over. EDIT of an EDIT: I copied over all the xsd files from the l2schemas folder and then wlansvc started. things are working now. I will try to compile a script to build the WinPE WIM based on my findings for others. Edited September 18, 2015 by nephewkp
macshuffle Posted September 19, 2015 Author Posted September 19, 2015 I was cleaning out an old email account and found this thread I had long since abandoned. Glad to see others picked up on it and were able to complete the solution! @nephewkp - Interested in what you come up with! 1
therealmrbob Posted November 6, 2015 Posted November 6, 2015 This is what I've done: Add Wireless Drivers: Netwen00.inf Add Packages for SCCM: Winpe-DismCmdletsWinPE-ScriptingWinPE-SecureStartupWinPE-WDS-ToolsWinPE-WMIWinPE-Dot3SvcWinPE-EnhancedStorageWinPE-HTAWinPE-StorageWMIWinPE-LegacySetupWinPE-NetFxWinPE-PowerShellWinPE-PPPoEWinPE-RNDIS Registry Changes: reg load HKLM\PE-BUILD-SYSTEM "C:\Mount\Windows\System32\config\SYSTEM"reg load HKLM\PE-BUILD-SOFTWARE "C:\Mount\Windows\System32\config\SOFTWARE"set KEY=HKLM\PE-BUILD-SYSTEM\ControlSet001\Enum\Root\LEGACY_WLANSVCreg add %KEY% /v NextInstance /t REG_DWORD /d 1 /freg add %KEY%\0000 /v Service /t REG_SZ /d Wlansvc /freg add %KEY%\0000 /v Legacy /t REG_DWORD /d 1 /freg add %KEY%\0000 /v ConfigFlags /t REG_DWORD /d 0 /freg add %KEY%\0000 /v Class /t REG_SZ /d LegacyDriver /freg add %KEY%\0000 /v ClassGUID /t REG_SZ /d {8ECC055D-047F-11D1-A537-0000F8753ED1} /freg add %KEY%\0000 /v DeviceDesc /t REG_SZ /d "@%%SystemRoot%%\System32\wlansvc.dll,-257" /fset KEY=HKLM\PE-BUILD-SYSTEM\ControlSet001\services\wlansvcreg add %KEY% /v DisplayName /t REG_SZ /d "@%%SystemRoot%%\System32\wlansvc.dll,-257" /freg add %KEY% /v ErrorControl /t REG_DWORD /d 1 /freg add %KEY% /v Group /t REG_SZ /d TDI /freg add %KEY% /v ImagePath /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\svchost.exe -k LocalSystemNetworkRestricted" /freg add %KEY% /v Start /t REG_DWORD /d 2 /freg add %KEY% /v Type /t REG_DWORD /d 32 /freg add %KEY% /v Description /t REG_SZ /d "@%%SystemRoot%%\System32\wlansvc.dll,-258" /freg add %KEY% /v DependOnService /t REG_MULTI_SZ /d "nativewifip\0RpcSs\0Ndisuio\0Eaphost" /freg add %KEY% /v ObjectName /t REG_SZ /d LocalSystem /freg add %KEY% /v ServiceSidType /t REG_DWORD /d 1 /freg add %KEY% /v RequiredPrivileges /t REG_MULTI_SZ /d "SeChangeNotifyPrivilege\0SeImpersonatePrivilege\0SeAuditPrivilege\0SeTcbPrivilege\0SeDebugPrivilege" /freg add %KEY% /v FailureActions /t REG_BINARY /d 2c0100000000000000000000030000001400000001000000c0d4010001000000e09304000000000000000000 /freg add %KEY%\Enum /v 0 /t REG_SZ /d "Root\LEGACY_WLANSVC\0000" /freg add %KEY%\Enum /v Count /t REG_DWORD /d 1 /freg add %KEY%\Enum /v NextInstance /t REG_DWORD /d 1 /freg add %KEY%\Parameters /v ServiceDll /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\wlansvc.dll" /freg add %KEY%\Parameters /v ServiceDllUnloadOnStop /t REG_DWORD /d 1 /freg add %KEY%\Parameters /v ServiceMain /t REG_SZ /d WlanSvcMain /freg add HKLM\PE-BUILD-SOFTWARE\Microsoft\NetSh /v wlancfg /t REG_SZ /d wlancfg.dll /fcall :REG_MULTI_SZ-add "HKLM\PE-BUILD-SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost" LocalSystemNetworkRestricted wlansvc Files Added to PE: :: C:\Windows\inf\netnwifi.inf:: C:\Windows\inf\netvwififlt.inf:: C:\Windows\inf\netvwifimp.inf:: C:\Windows\Inf\netvwifibus.inf:: C:\Windows\System32\Drivers\vwifibus.sys --> X:\Windows\Inf\vwifibus.sys:: C:\Windows\l2schemas\wlan_policy_v1.xsd:: C:\Windows\l2schemas\wlan_profile_v1.xsd:: C:\Windows\l2schemas\WLAN_profile_v2.xsd:: C:\Windows\schemas\availablenetwork\availablenetworkinfo.xsd:: C:\Windows\system32\certutil.exe:: C:\Windows\system32\wlanapi.dll:: C:\Windows\system32\wlancfg.dll:: C:\Windows\system32\wlanhlp.dll:: C:\Windows\system32\wlanmsm.dll:: C:\Windows\system32\wlansec.dll:: C:\Windows\system32\wlansvc.dll:: C:\Windows\system32\wlanui.dll:: C:\Windows\system32\wlgpclnt.dll:: C:\Windows\system32\drivers\nwifi.sys:: C:\Windows\system32\drivers\vwififlt.sys:: C:\Windows\system32\drivers\vwifimp.sys:: C:\Windows\system32\Drivers\vwifibus.sys:: C:\Windows\system32\en-US\certutil.exe.mui (or your locale's equivalent):: C:\Windows\system32\en-us\wlanapi.dll.mui:: C:\Windows\system32\en-us\wlancfg.dll.mui:: C:\Windows\system32\en-us\wlansvc.dll.mui:: C:\Windows\system32\en-us\wlanui.dll.mui:: C:\Windows\system32\en-us\wlgpclnt.dll.mui At one point I had Wlansvc starting but couldn't see any network devices (Including wired, which works fine before these changes).Right now with this setup I'm getting system error 2 when I try to start wlansvc, but I'm still having the same problem that after all of this I can't see my ethernet interface either.Any suggestions here?
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now