[TOOL] POWIS - Powerful Windows Setup v1.0.3

Discussion in 'MDL Projects and Applications' started by George King, May 24, 2021.

  1. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    Original SP2 image is not compatible with newer setup engine. We need to use a trick - see engine folder in apps directory. Maybe it can work also with Windows 7 boot.wim with Windows 10 setup engine.

    But there are more ideas - we can integrate drivers using DISM into Vista PE. Also maybe fully updated image can be compatible - I started work on offline Vista updater, but this needs some time to see how it goes.

    These Vista things need more research..

    EDIT: May be a good idea to rebuild Vista PE from scratch with latest updates, but I never tried it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. TesterMachineOS

    TesterMachineOS MDL Member

    Apr 20, 2021
    249
    53
    10
    I can translate with pleasure if you do not understand what our friend "George King" tells you ... well he says more than everything that to integrate the drivers you want it is necessary first before using "POWIS" use the tools that I gave you to integrate the drivers example: USB3.0. You can integrate those with ntlite or the tools that George mentions. once you integrate the drivers then use "POWIS" and that's it. the drivers will be integrated
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    I have been playing around with win 8 boot.wim. I used the setup.cmd from your powis tool, but took the parts out I dont need for test. Setup.cmd is started from Winpeshl.ini. Setup deploy install.wim fine, but install fails after reboot. I dont think setup.cmd dont get to run from Inject drivers section so it can copy the files in the engine folder to vista install drive and do the necesary reg add and delete. But I'm sure that setup reboots before it gets to this step. What am I doing wrong? could you point me in the right direction? I kept the $OEM$ in the ISO, so the DriversTarget tag is there. I also know the setup.exe /noreboot is for newer win 10 setups. So, how do you do it?

    Code:
    REM Created in 2021 by George King
    @ECHO OFF
    TITLE Windows Setup Launcher
    CLS
    
    
    
    REM Run original setup.exe
        IF EXIST "X:\sources\launcher.exe" (
                "X:\sources\launcher.exe" /unattend:"%~dp0autounattend.xml" /noreboot       
        ) ELSE (
                "%~dp0setup.exe" /unattend:"%~dp0autounattend.xml" /noreboot
        )
    
    
    
    
    
    REM Inject drivers from %DRIVE%\drivers folder
    FOR %%I IN (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%I:\Windows\DriversTarget SET TARGET=%%I:
    
    
    REM Apply custom steps only when setup sucessfully finished
    IF EXIST "%TARGET%" (
    
    
        REM Windows Vista with Windows 8.0 setup engine fix
        if exist "%TARGET%\Windows\servicing\Version\6.0.*" (
    
            if exist "X:\sources\dism.exe" (
                        
                copy /y "X:\sources\engine\*.*" "%TARGET%\Windows\Panther" >nul
                
                REM Correct all registry entries touched by new setup engine
                reg load HKLM\TEMPSOFTWARE "%TARGET%\Windows\System32\config\SOFTWARE" >nul
                reg delete "HKLM\TEMPSOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" /f >nul
                reg delete "HKLM\TEMPSOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OOBE" /v "RetailInstall" /f >nul
                reg add "HKLM\TEMPSOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OOBE" /v "MediaBootInstall" /t REG_DWORD /d "1" /f >nul
                reg add "HKLM\TEMPSOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OOBE" /v "SetupDisplayedProductKey" /t REG_DWORD /d "1" /f >nul
                reg add "HKLM\TEMPSOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOrganization" /t REG_SZ /d "Microsoft" /f >nul
                reg add "HKLM\TEMPSOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion" /v "RegisteredOwner" /t REG_SZ /d "Microsoft" /f >nul
                reg unload HKLM\TEMPSOFTWARE >nul
    
                reg load HKLM\TEMPSYSTEM "%TARGET%\Windows\System32\config\SYSTEM" >nul
                reg delete "HKLM\TEMPSYSTEM\Setup\SetupCL\PendingRequest" /f >nul
                reg delete "HKLM\TEMPSYSTEM\Setup\SetupCL" /v "BlockOperations" /f >nul
                reg delete "HKLM\TEMPSYSTEM\Setup\SetupCL" /v "ExecutionSuccessful" /f >nul
                reg delete "HKLM\TEMPSYSTEM\Setup\SetupCL" /v "NTSTATUS" /f >nul
                reg delete "HKLM\TEMPSYSTEM\RNG" /v "ExternalEntropy" /f >nul
                reg unload HKLM\TEMPSYSTEM >nul
    
                reg load HKLM\TEMPDEFAULT "%TARGET%\Windows\System32\config\DEFAULT" >nul
                reg delete "HKLM\TEMPDEFAULT\Control Panel\International" /v "sShortTime" /f >nul
                reg unload HKLM\TEMPDEFAULT >nul
    
                rem X:\sources\dism.exe /image:%TARGET% /Apply-Unattend:%DRIVE%\ultimate.xml
    
                rd /q /s "%TARGET%\$WINDOWS.~BT" >nul
                rd /q /s "%TARGET%\$WINDOWS.~LS" >nul
                
            )
        )
    
    
    
    
    
    
    
    REM Perform reboot
    IF EXIST "X:\sources\launcher.exe" (
        IF NOT EXIST "%DRIVE%\skiprecovery.xml" (
            %WINDIR%\System32\wpeutil.exe reboot
            EXIT
        ) ELSE (
            EXIT
        )
    ) ELSE (
        IF EXIST "%TARGET%" (
            %WINDIR%\System32\shutdown.exe -r -f -t 0
            EXIT
        )
    )
    
    
    goto :EOF
     
  4. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    @Gyppie better to use my untouched setup.cmd, it should work well. Also you need to have engine folder inside boot.wim in sources folder, copied from apps folder.
    /noreboot switch is here from older setup engines, just run setup.exe /? to see all available switches.
    Injecting drivers is called only when there exist .INF drivers inside drivers folder.
    And I'm sure your $OEM$ folder is ignored. Try untouched setup.cmd to see difference. This setup.cmd is designed to run in all WinPE starting at Vista.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    Do you know any updates, that can be applied into WinPE SP2? I tried to find some, but without luck.

    I have managed to get DISM working on boot.wim SP2, so if there exist any updates or do you know what we need to integrate I can give it a try. I created "FIX" that allows peimg /prep command work again on these PE images too. Or do you mean "only" integrating USB3.X drivers?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    USB 3 was my main goal. I wanted to try to install USB 3/XHCI drivers stack for win 7/vista, but it says that kb2864202 has to be installed first. But because of the peimg /prep i couldnt install the update. It may not work at all. I'm far from an expert on this, but I like to try things out to see if I can get things to work.
     
  7. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    #27 George King, May 31, 2021
    Last edited: Jun 1, 2021
    (OP)
    I will review it and adding it into ToDo list for Vista update pack. This should be soon, give me some time to figure it out. I think it's doable. Now I'm close to finish my internal Vista x64 Update pack beta1. But there are still a lot of work to make it public. I will create topic in Vista section when it's done.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. CEW

    CEW MDL Senior Member

    Jan 21, 2011
    296
    155
    10
    For Vista boot.wim :
    I installed the update manually, by adding the registry entries and the files , then used peimg to integrate the drivers.
     
  9. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    I achieved it with same method. In VirtualBox is seems good. What about generic NVMe drivers? Any tip?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Gyppie

    Gyppie MDL Junior Member

    Aug 16, 2009
    50
    11
    0
    Could you explain a little bit on witch files from the cab goes where? could you also instruct me on how to mount the registry in winpe? Sorry for the questions, but Im a little uncertain on this.
     
  11. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    #31 George King, Jun 3, 2021
    Last edited: Jun 3, 2021
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. CEW

    CEW MDL Senior Member

    Jan 21, 2011
    296
    155
    10
    I had included more than that, for example the catroot files

    Code:
    \windows\system32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_for_KB2864202~31bf3856ad364e35~amd64~~6.0.1.0.cat
    \windows\system32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_1_for_KB2864202~31bf3856ad364e35~amd64~~6.0.1.0.cat
    \windows\system32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_for_KB2864202_client_2~31bf3856ad364e35~amd64~~6.0.1.0.cat
    \windows\system32\catroot\{F750E6C3-38EE-11D1-85E5-00C04FC295EE}\Package_for_KB2864202_client~31bf3856ad364e35~amd64~~6.0.1.0.cat
    
    and the side by side in the components hive
    Code:
    [HKEY_LOCAL_MACHINE\comp\Winners\amd64_ec570ac55e77d4242880114794f1c260_31bf3856ad364e35_none_16184fa943258408]
    @="6.0"
    
    [HKEY_LOCAL_MACHINE\comp\Winners\amd64_ec570ac55e77d4242880114794f1c260_31bf3856ad364e35_none_16184fa943258408\6.0]
    @="6.0.6002.18880"
    "6.0.6002.18880"=hex:01
    
    [HKEY_LOCAL_MACHINE\comp\Winners\amd64_microsoft-windows-wdf-kernellibrary_31bf3856ad364e35_none_2c145fd95a1c9a46\6.0]
    @="6.0.6002.18880"
    "6.0.6002.18880"=hex:01[\code]
    
    Perhaps they are not needed
     
  13. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    These files and registry entries are not needed as they are useful only for servicing, which is not available in Vista WinPE, .CAT files are needed for .MUM files, which we don’t need.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,680
    1,924
    60
    #34 KleineZiege, Jun 6, 2021
    Last edited: Jun 6, 2021

    Attached Files:

  15. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    @KleineZiege Interesting, I'm logged on Administrator account and I can Drag and Drop files into CMD without problem.
    If you run it without Administrator provilegies, these errors are expected. I will update next version to terminate if is not launched as Administrator.

    Just copy and paste full path to your ISO into POWIS.cmd, for example
    Code:
    C:\POWIS\Win10.iso
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,680
    1,924
    60
    #36 KleineZiege, Jun 6, 2021
    Last edited: Jun 6, 2021
    Thanks, that's how it works, I could have come up with that idea myself haha

    nice programme :)
     

    Attached Files:

  17. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,680
    1,924
    60
    if I want to add winrar,
    my file is called
    winrar-x64.exe
    is it enough to add a txt with the winrar-x64.txt
    and just add the /S switch,
    or does the switch have to look like this
    winrar-x64.exe /S
     
  18. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    Into TXT you need to place only switch.


    WinRar-x64.exe
    WinRar-x86.exe
    WinRar.txt
    Code:
    /S
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,680
    1,924
    60
    Office 2019 and MSI packages are installed silently without any problems.

    With the exe files such as Winrar, Notepad++
    I get problems.

    They are called, but they are not installed silently.

    I have tried the /S switch for winrar.
    and the switch winrar-x64.exe /S

    Both switches I have tried call the installer, but it is not installed silently.
     
  20. George King

    George King MDL Expert

    Aug 5, 2009
    1,846
    2,132
    60
    Please provide a picture how looks your setup folder. Also compare it to picture in first post. If it looks same, then problem must be in TXT file encoding format or name.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...