Windows Integration Guide - murphy78

Discussion in 'Windows 8' started by murphy78, Sep 5, 2013.

  1. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
  2. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,556
    15,645
    270
    #342 Mr.X, Mar 25, 2014
    Last edited by a moderator: Apr 20, 2017
  3. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    #343 murphy78, Mar 25, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  4. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,023
    977
    90
    #344 Flipp3r, Mar 25, 2014
    Last edited by a moderator: Apr 20, 2017
    Mister X, You would need to add the driver to every index in both boot.wim & install.wim. If you look at the notes/sample from the other forum you'll see he is using the same dism /add-driver command.
    A standard win7 32bit would have index 1 as Starter, 2 = Home Basic, 3 Home Premium, 4 Pro, 5 Ultimate. Boot.wim has 2.
    Your AIO is probably different. Go back to the 1st page in this thread & re-read. Murphy78 has many samples for you to learn from.
    Code:
    REM Windows 7 x86 WinPE
    DISM /Mount-Wim /WimFile:C:\Win7_x86\DVD\sources\boot.wim /index:1 /MountDir:C:\Win7_x86\Mount
    DISM /image:C:\Win7_x86\Mount /Add-Driver /driver:C:\Win7_x86\Drivers.32\USB3 /recurse /forceunsigned
    DISM /Unmount-Wim /MountDir:C:\Win7_x86\Mount /Commit
    
    REM Windows 7 x86 Setup
    DISM /Mount-Wim /WimFile:C:\Win7_x86\DVD\sources\boot.wim /index:2 /MountDir:C:\Win7_x86\Mount
    DISM /image:C:\Win7_x86\Mount /Add-Driver /driver:C:\Win7_x86\Drivers.32\USB3 /recurse /forceunsigned
    DISM /Unmount-Wim /MountDir:C:\Win7_x86\Mount /Commit
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    #345 phox, Mar 26, 2014
    Last edited by a moderator: Apr 20, 2017
  6. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,023
    977
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,023
    977
    90
    Since I deal with OEM sw this frustrated me for weeks until I found the article. I tried to get help from MS to find a solution & they were useless.
    I couldn't believe MS would restrict in this way. It doesn't make sense! I think it was someone here that suggested firstlogon which still works.
    Hopefully they don't get rid of that too.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    That should work provided you do the reg add runonce on the mounted image using reg load / unload
     
  9. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,023
    977
    90
    #350 Flipp3r, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    #351 murphy78, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  11. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    Will you please come out with simple and elegant solution for the problem? :)
     
  12. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    That was a simple and elegant solution. Just rename the setupcomplete.cmd to firstlogon.cmd and add the parts to your unattend.xml that flipp3r mentioned.
    Or just change the unattend.xml to run setupcomplete.cmd during the firstlogon pass.
     
  13. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    Setupcomplete.cmd should be "Run as Administrator". How it is posible during the firstlogon pass?
     
  14. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,023
    977
    90
    Well the 1st user is always going to be admin so it always runs. My firstlogon does some low level stuff that needs to be admin & I've never had an issue.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    Commands ran by the system with runonce or run commands always have System(R) permissions.
    Given that they're ran with the same method, I'd gather that it's likely that unattend's firstlogon commands function the same as a normal runonce registry key command.

    You can test this by aiming the firstlogon phase at setupcomplete from my $oem$ folder and if it sets the defender exclusion, you have system permissions.
    Anything less than "NT Authority\System" or TrustedInstaller permissions and it won't be able to set the exclusion.
     
  16. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,615
    210
    #357 MSMG, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    Is there any way to remove the space at the start and at the end of the index name and description. i.e " Windows 8.1 Pro "

     
  17. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    #358 s1ave77, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    As you ask, i found a slightly better way :D.

    Code:
        for /f "tokens=2 delims=: " %%a in ('DISM /Get-WimInfo /WimFile:"%path2%" ^| findstr /i Index') do (
            for /f "tokens=2,* delims=: " %%g in ('DISM /Get-WimInfo /WimFile:"%path2%" /Index:%%a ^| findstr /i Name') do (
            echo %%a. %%g %%h
            )
        )
    
    
    Now the Name string is without spaces :cool2:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,429
    11,761
    240
    #359 murphy78, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I figured out how to put 2 spaces on each side instead of one...
    Does that count?
    Code:
    for /f "tokens=2 delims=: " %%a in ('DISM /Get-WimInfo /WimFile:"H:\Sources\install.wim" ^| find /i "Index"') do (
            for /f "tokens=2 delims=:" %%g in ('DISM /Get-WimInfo /WimFile:"H:\Sources\install.wim" /Index:%%a ^| find /i "Name"') do (
            echo.%%a. %%g  >>C:\temp\wiminfo.txt
           )
        )
    Should we not be adding like a
    Code:
    Set OUTECHO=%%a.%%g
    echo %OUTECHO%
    or something?
     
  19. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    #360 s1ave77, Mar 27, 2014
    Last edited by a moderator: Apr 20, 2017
    Writing to temp file would be a way, as trying to set value to variable inside the loop will only show last one, at loops end :g:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...