Jump to content

MrJinje

Developer
  • Posts

    1,031
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by MrJinje

  1. Van, Mount R/W = Enter Image Index # ids fine if they actually know what the images are we had this long while back and had to post image indexes of x86 and x64.

    I know they should use wim.info but not everyone will :(

    If the problem exists between the keyboard and chair, then fix is simple. We need to use a more advanced snip to run the get-wiminfo first and pipe it's result to pre-populate a drop down list. Could probably capture the image description as well as the index #.

  2. From SetupComplete.cmd - silent firefox install.

    C:\Install\myfirefoxinstaller.exe -ms

    From unattend.xml

                            <FirstLogonCommands>
    <SynchronousCommand wcm:action="add">
    <Description>My Firefox Custom Description</Description>
    <Order>1</Order>
    <CommandLine>C:\Install\myfirefoxinstaller.exe -ms</CommandLine>
    </SynchronousCommand>
    </FirstLogonCommands>

    Notice how the "Command Line" is the same in both examples, that is why it is much easier to use setupcomplete.cmd. A command takes 7 lines from unattend.xml vs only one line in setupcomplete.cmd.

  3. Use setupcomplete.cmd and put the reg file in the same folder. It runs under local system privilege right before the first logon occurs, so changes you make using regedit will apply before a user profile is created.

    regedit /s %~dp0Set-ExecutionPolicy.reg

    Also there is a setting to disable first logon animation, gets you to the desktop a minute faster.

        <settings pass="specialize">
    <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronousCommand wcm:action="add">
    <Order>1</Order>
    <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableFirstLogonAnimation /d 0 /t REG_DWORD /f</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
    <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronousCommand wcm:action="add">
    <Order>1</Order>
    <Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableFirstLogonAnimation /d 0 /t REG_DWORD /f</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
    </settings>

  4. Terrible documentation of all this by Microsoft, here is an example of how to create flyouts. Start with a shell > verb, give it a null "SubCommands" and you can the create sub-folders (again Shell >Verb) with SubCommands in them as such. Took me a while to figure out and the sample I learned from was not very straight-forward about it.



    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\Background\Shell\DISM_FLYOUT]
    "SubCommands"=""
    "Position"="top"
    "icon"="cmd.exe"

    [HKEY_CLASSES_ROOT\Directory\Background\Shell\DISM_FLYOUT\Shell\DISM_Commands]
    "MUIVerb"="DISM_Commands"
    "SubCommands"="Mkdir zMountdir zPackage;Unmount + Save zMountDir;Unmount NO SAVE zMountDir;Cleanup + Delete zMountDir"
    "icon"="cmd.exe"
    "Position"="Top"

    [HKEY_CLASSES_ROOT\Directory\Background\Shell\DISM_FLYOUT\Shell\DISM_Mount]
    "MUIVerb"="DISM_Mount"
    "SubCommands"="Mount # 1 R/W | if boot.wim is PE;Mount # 2 R/W | if boot.wim is Default;Mount # 3 R/W;Mount # 4 R/W;Mount # 5 R/W"
    "Position"="bottom"
    "icon"="cmd.exe"

    Can you confirm that all we need is the RUNASADMIN 'CompatFlag' and the "HasLUAShield"="" to properly elevate. Haven't tested yet with SLMGR.vbs, but this looks cleaner than including the elevate powertoy like I've been doing.

  5. I'm using powershell started from cmd.exe via a single line (registry shell extension). How many characters in yours, this one is 498 characters and does not throw me any error.

    @ECHO OFF & cmd /k start /b powershell -command "clear-host;[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');$INDEX = [Microsoft.VisualBasic.Interaction]::InputBox('Enter Image #', 'Which image to mount', '1');$PROMPT = [Microsoft.VisualBasic.Interaction]::MsgBox('Ready to mount image ?', 'OKCancel,Question', 'Last Chance to Cancel');switch ($PROMPT) {'OK'{Dism /mount-wim /wimfile:D:\sources\boot.wim /index:$INDEX /mountdir:C:\zMountDir}'Cancel'{exit}}" & PAUSE

    On second thought, your script looks short but that %%A variable expands at runtime, the problem could be the expanded 'path' length being more than 256 characters, why not convert the %%A variable to 8.3 short naming before it loops.

    Alternatively try encrypting your batch as an exe. Plenty of free-wares offer that agility.

  6. Hey Veeger, check this out.

    Snip pops a VB window for entering an image index #. Then pushes the $INDEX variable into the DISM command. Probably a few readers out there with more than 5 images in their AIO's.

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DISM_MOUNT]
    "MUIVerb"="DISM_MOUNT"
    "icon"="cmd.exe"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DISM_MOUNT\command]
    @="cmd /k start /b powershell -command \"clear-host;[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');$INDEX = [Microsoft.VisualBasic.Interaction]::InputBox('Enter Image Index #', 'Which image to mount', '1');$PROMPT = [Microsoft.VisualBasic.Interaction]::MsgBox('Ready to mount image ?', 'OKCancel,Question', 'Last Chance to Cancel');switch ($PROMPT) {'OK'{Dism /mount-wim /wimfile:D:\\sources\\boot.wim /index:$INDEX /mountdir:C:\\zMountDir}'Cancel'{exit}}\""

    I was going to write my own DISM shell ext until Urie mentioned yours, so now I'm abandoning the idea. If you want it you can have it, just need to remove the hard-coded boot.wim.

    http://forums.mydigitallife.info/threads/37225-MDL-SLMGR-Right-Click-Shell-Extension-Tool%99

  7. Run this from your unattend.xml specialize pass.

            <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronous>
    <RunSynchronousCommand wcm:action="add">
    <Description>Enable Admin Account</Description>
    <Order>1</Order>
    <Path>net user administrator /active:yes</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>

    Run this from your oobesystem pass

                <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Password>
    <Value>EDIT</Value>
    <PlainText>true</PlainText>
    </Password>
    <Description>Default Administrator Account</Description>
    <DisplayName>Administrator</DisplayName>
    <Group>Administrators</Group>
    <Name>Administrator</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>

    If you need more details, check out the "Ask your seven XML here" sticky in the Windows 7 unattended forum

  8. Or in case the built in disk configuration is not granular enough for your needs, can easily launch a batch during the windowsPE pass by using a RunSynchronous command. Greater details can be found inside your unattend.chm from the W8 ADK.

    Microsoft-Windows-Setup | RunSynchronous

    <RunSynchronous>
    <!-- First synchronous command to execute -->
    <RunSynchronousCommand>
    <Order>1</Order>
    <Path>\\MyNetworkShare\MyApplication.bat</Path>
    <Description>DescriptionOfMyApplication</Description>
    <Credentials>
    <Domain>FabrikamDomain</Domain>
    <UserName>MyUserName</UserName>
    <Password>MyPassword</Password>
    </Credentials>
    </RunSynchronousCommand>
    <!-- Second synchronous command to execute -->
    <RunSynchronousCommand>
    <Order>2</Order>
    <Path>C:\AnotherApplication.cmd</Path>
    <Description>DescriptionOfMyApplication</Description>
    </RunSynchronousCommand>
    </RunSynchronous>

  9. What is the purpose of the package winpe-str.cab?

    That's a typo, he meant WinPE-SRT.cab, it's for adding recovery disc to winpe 4.0 - which we currently can't do with the ADK because it's been removed.

    http://technet.microsoft.com/en-us/library/dd744533%28v=ws.10%29.aspx

    WinPE-SRT

    The Windows Recovery Environment feature package. Provides a recovery platform for automatic system diagnosis and repair and the creation of custom recovery solutions.

  10. Thanks, Lego, hadn't seen this yet. Only found it on accident because someone posted a link over here.

    http://mikecel79.wordpress.com/2012/02/20/dism-gui-4-0-feature-requests/#comment-204

    Does running the DISM remove-feature with the online switch rip everything out of the SXS folder reducing your C: drive ? Or does it just remove the feature from the OS and we can run dism enable-feature without requiring the DVD (i.e. files are still in SXS)

    install_wim_tweak.exe /o

    This will unhide all the packages on the currently installed OS

  11. Thanks Max. I ripped out the stuff I didn't like, made it en-US across the board and put it to Chicago time. Readers just need to search for "EDIT" and make minor changes. I've tested the x86 version in a VM and it worked for me.

    Windows 8 - x86

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SetupUILanguage>
    <UILanguage>en-US</UILanguage>
    </SetupUILanguage>
    <InputLocale>en-US</InputLocale>
    <UserLocale>en-US</UserLocale>
    <UILanguage>en-US</UILanguage>
    <SystemLocale>en-US</SystemLocale>
    </component>
    <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <UserData>
    <AcceptEula>true</AcceptEula>
    <ProductKey>
    <Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>
    <WillShowUI>OnError</WillShowUI>
    </ProductKey>
    <Organization>EDIT</Organization>
    <FullName>EDIT</FullName>
    </UserData>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SkipAutoActivation>true</SkipAutoActivation>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ComputerName>EDIT</ComputerName>
    </component>
    <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronous>
    <RunSynchronousCommand wcm:action="add">
    <Description>Enable Admin Account</Description>
    <Order>1</Order>
    <Path>net user administrator /active:yes</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <HideLocalAccountScreen>false</HideLocalAccountScreen>
    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
    <HideOnlineAccountScreens>false</HideOnlineAccountScreens>
    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
    <NetworkLocation>Home</NetworkLocation>
    <ProtectYourPC>3</ProtectYourPC>
    </OOBE>
    <TimeZone>Central Standard Time</TimeZone>
    <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Password>
    <Value>EDIT</Value>
    <PlainText>true</PlainText>
    </Password>
    <Description>Default Administrator Account</Description>
    <DisplayName>Administrator</DisplayName>
    <Group>Administrators</Group>
    <Name>Administrator</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    </component>
    <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>en-US</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UILanguageFallback>en-US</UILanguageFallback>
    <UserLocale>en-US</UserLocale>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:f:/build8/win8x64/sources/install.wim#Windows 8 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    Windows 8 - amd64

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SetupUILanguage>
    <UILanguage>en-US</UILanguage>
    </SetupUILanguage>
    <InputLocale>en-US</InputLocale>
    <UserLocale>en-US</UserLocale>
    <UILanguage>en-US</UILanguage>
    <SystemLocale>en-US</SystemLocale>
    </component>
    <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <UserData>
    <AcceptEula>true</AcceptEula>
    <ProductKey>
    <Key>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</Key>
    <WillShowUI>OnError</WillShowUI>
    </ProductKey>
    <Organization>EDIT</Organization>
    <FullName>EDIT</FullName>
    </UserData>
    </component>
    </settings>
    <settings pass="specialize">
    <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SkipAutoActivation>true</SkipAutoActivation>
    </component>
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ComputerName>EDIT</ComputerName>
    </component>
    <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <RunSynchronous>
    <RunSynchronousCommand wcm:action="add">
    <Description>Enable Admin Account</Description>
    <Order>1</Order>
    <Path>net user administrator /active:yes</Path>
    </RunSynchronousCommand>
    </RunSynchronous>
    </component>
    </settings>
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="NonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OOBE>
    <HideEULAPage>true</HideEULAPage>
    <HideLocalAccountScreen>false</HideLocalAccountScreen>
    <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
    <HideOnlineAccountScreens>false</HideOnlineAccountScreens>
    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
    <NetworkLocation>Home</NetworkLocation>
    <ProtectYourPC>3</ProtectYourPC>
    </OOBE>
    <TimeZone>Central Standard Time</TimeZone>
    <UserAccounts>
    <LocalAccounts>
    <LocalAccount wcm:action="add">
    <Password>
    <Value>EDIT</Value>
    <PlainText>true</PlainText>
    </Password>
    <Description>Default Administrator Account</Description>
    <DisplayName>Administrator</DisplayName>
    <Group>Administrators</Group>
    <Name>Administrator</Name>
    </LocalAccount>
    </LocalAccounts>
    </UserAccounts>
    </component>
    <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <InputLocale>en-US</InputLocale>
    <SystemLocale>en-US</SystemLocale>
    <UILanguage>en-US</UILanguage>
    <UILanguageFallback>en-US</UILanguageFallback>
    <UserLocale>en-US</UserLocale>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:f:/build8/win8x64/sources/install.wim#Windows 8 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    EDIT: Added skip auto activation to specialize pass for preserving readers MAK keys. I'll need to double check the oobe, there might be a few useless settings in this, work in progress

  12. Quoted from Computermensch of technet.

    The rest (i.e. the layout) you can probably only find cached in part locally inside \Local\Microsoft\Windows\Explorer and \Local\Microsoft\Windows\RoamingTiles (the last folder only seem to contain stuff if your Windows account is connected to (or is in fact a qualified) Microsoft Account).

    These are the files names I found in mine, curious to know if anyones else's names are slightly different or not. When I get a chance I will drop these into my unattended install and see if I can't get it to push my custom start screen settings on first boot.

    C:\Users\Admin\AppData\Local\Microsoft\Windows\Explorer\TileCacheDefault-2447812_80.dat

    C:\Users\Admin\AppData\Local\Microsoft\Windows\Explorer\TileCacheLogo-2448125_100.dat

    C:\Users\Admin\AppData\Local\Microsoft\Windows\Explorer\TileCacheStartView-2447328_80.dat

    C:\Users\Admin\AppData\Local\Microsoft\Windows\Explorer\TileCacheTickle-2447937_80.dat

  13. Has anyone seen a barebones template for Windows 8 anywhere. Not looking for fancy, looking for generic so I can refer people here from social.technet.

    What do you think Max, should we send W8 people to this thread, would you host the XML's in the first post. My guess is 90% of their questions are gonna already be answered in this thread.

×
×
  • Create New...