Showing posts with label Slipstream. Show all posts
Showing posts with label Slipstream. Show all posts

Sunday, 9 August 2015

Windows Post-Install Wizard (WPI) Tips


Some use full commands and silent install switches for adding software and tweaks to WPI the Windows Post-Install Wizard

first DirectX.. grab your self the JUNE REDIST from microsoft
make a folder called DirectX put the exe in their and Right click on it and select "Extract To Here"
not got that extract option?  (install WinRAR its free for basic use)

once you have DirectX extracted to the folder (delete the exe you downloaded, but keep everything that came out of it)  then in WPI use the following command & path to run it

{START} "DirectXInstaller" /MIN /w "%wpipath%\Install\DirectX\DXSETUP.exe" /silent

Its important to remember there is a  "  after the .EXE, then a Space, then the switches
(want to make a complete DirectX Package with it all, read this)

What about adding WinRAR to WIP?
x86 (32bit)
{START} "WinRarx86Installer" /MIN /w "%wpipath%\Install\Software\x86\WinRAR_x86.exe" /s
x64 (64bit)
{START} "WinRarx64Installer" /MIN /w "%wpipath%\Install\Software\x64\WinRAR_x64.exe" /s

if you use the programs name with architecture including as its UNIQUE ID like WINRARX86 and WINRARX64  then you can add the X64 ID to the x86 Exclude box and vice versa (so only 1 can be chosen)

Microsoft Silverlight?  (the singular Q doesn't seam to make it silent any more unless you add /passive)

{START} "MSSLx86Installer" /MIN /w "%wpipath%\Install\Runtime\Silverlight_x86.exe /q /passive

{START} "MSSLx64Installer" /MIN /w "%wpipath%\Install\Runtime\Silverlight_x64.exe /q /passive

Microsoft Download Manager?

"%wpipath%\Install\Software\MS_DL_MAGR.msi" /passive

Hows about a Microsoft .NET exe?

{START} "MSdotNET" /MIN /w "%wpipath%\Install\Updates\NDP452-KB2901907-x86-x64-AllOS-ENU.exe" /passive /norestart

on the Dependency's you could use

getOSver()="Win7"

so it only shows up on windows 7 systems, or use like

getOSver()="Win7" || "Win8" || "Win8.1"

also note you can run a BAT  or a CMD file simply using

"%wpipath%\Install\Scripts\NameOfYouBATorCMD.bat"

You may also notice some things clash with others, bat and cmd files seam to hold other stuff back while they work, but launching EXE and MSI files can launch multiples at once, in turn (depending on software choices) you may get windows installer service is in use by another processes, or please wait for the other installer to complete.. solution?

well you could impose the WAIT command using  /w
usage wise an example would be...

{START} "MSdotNET" /w /MIN "%wpipath%\Install\Updates\NDP452-KB2901907-x86-x64-AllOS-ENU.exe" /passive /norestart

This shows what's installing on the WPI window
This makes it wait for the current thing running to finish
This runs it minimised to task bar

This would be handy to include with all exe and msi stuff you add, besides the fact you'll save windows installer getting confused, you'll also prevent any MSU files that patch .net failing while .net is actually still installing, but the /w is optional, as is the /MIN.

My little CMD file in action.. that installs the MSU files

the /w command in action making each install wait for the last to finish
Adobe Acrobat Silent Install Switch?

/sAll Run installer in silent mode.
/sPB Silent mode with minimum UI: show the progress bar only.
/rs Reboot Suppress. Setup.exe will not initiate reboot even if it is required.
/rps Reboot Prompt Suppress. If reboot is required, the system restarts without warning.

I would use something like
{START} "AdobeReader" /w /MIN "%wpipath%\Install\Readers\Acrobat.exe" /sAll /rs

something to remember is although seeing progress bars on software lets you know its running all ok, it slows things down (especially if windows is running on a temp native ms video driver)

WPI installing microsoft .net on Windows 7 SP1 followed by its required updates




note the main installer is x86 and x64 (so i added a single entry just for x86) i set up the updates after it (so one does the app & its x86 updates)  Then to save time (and the fact the updates don't do both)  I selected CLONE to make a copy  of the x86 and changed all the x86 references to x64.


NOTE:
when it comes to .NET updates, you could have ONE install listed under (both)
and have option to run ALL the actual updates (under it) BUT with a prefix to define Windows Architecture  before starting the update..

EXAMPLE
{86} {START} "DotNetX68Up1" /MIN /w "%wpipath%\install\7\Updates\x86\DotNET\NDP45-KB2972107-x86.exe" /passive /norestart

{64} {START} "DotNetX64Up1" /MIN /w "%wpipath%\install\7\Updates\x64\DotNET\NDP45-KB2972107-x64.exe" /passive /norestart

so it has the  {86}  or  the  {x64}  then  {START}  a space between  the   }  {
I also used the get os version to only make it show up on windows 7 (due to the EXE updates not really compatible with 8 or 8.1 as most there .net updates are MSU files)   I also set the "greyed out option" on the x86 to look for the bits64 thing  to set the greyed out on the x64 to the bits32.
This way when the WPI is run on an x64 installed OS it wont even have any visible x86 stuff  and when run on an x86 it won't show any x64 stuff.

 And to further avoid conflicts i also set the dependencies screen to block any x86 UNIQUE ID  if x64 is selected and vice versa under  EXCLUDES on the Dependencies screen.

Why wont reg files work?  its a problem with WPI.. knock off BOTH the  "  " symbols

EXAMPLE WORKING
{REGEDIT} %wpipath%\Install\Tweaks\filename.reg

EXAMPLE NOT WORKING
{REGEDIT} "%wpipath%\Install\Tweaks\filename.reg"

DON'T use the  "  and DON'T add any silent switches (and it'll just work silently)  ;)

Microsoft Office ?{START} "Office2007Install" /w "%wpipath%\Install\Office2007\setup.exe" /config config.xml

note that my config.xml has my serial number in and i removed the !! commented lines so it installs the components i want, but note ive left out the /MIN
(that's so it doesn't run minimised)  i did that for people who run this and use others keys on their systems (so they essentially need to interact, enter their name and their key for them to use it)  So that's not defaulted to  /MIN  (minimise) so you know when its ready to input details.

I guess if your sound drivers pre-loaded you could have it Chain a sound file Before the app link (like i did the .net updates having app and updates on one) what if you actually chain an audio file then the app   (a beep or what ever) so you know when a specific installer is open or pending..
i feel some voice overs coming on for sure LOL.

go on.. seeing as im on a roll.. how about VLC Media Player Silent Install ?
only issue with VLC is you have to set a Language switch (to which English is 1033)

{START} "VLCx86Installer" /MIN /w "%wpipath%\Install\7\Software\x86\VLC_x86.exe" /L=1033 /S

Also note that i use numbers in path for OS version simply because one day they may no longer support that OS with the Latest (this way you always maintain OS backward compatibility as your menu grows)

I also Re-Name them installers to more simple terms (you can get version number by right clicking, hit properties then the version tab)  renaming these installers to simple stuff like JaVa_x86.exe makes it easier to Update your Disc/USB by just getting the latest release and renaming that (rather than having to edit loads of the menu boxes) Though you should change the version details on the box that checks what ver is installed and the visual box offering the software to install, you can get that via the EXE's properties once installed via the ?.?.?.?  options.. The current VLC for example is 2.2.6.0  ;)

I must be possessed tonight...

MSE Microsoft Security Essentials silent install  (windows must already be activated)

{START} "MSE7x64Installer" /MIN /w "%wpipath%\Install\7\Software\x64\mseinstallx64.exe" /s /runwgacheck /o

you can Remove the  /o  and it'll check online for an update  OR you can leave the /o in place so the nets not required and then just Chain the update exe Under it like this..

{START} "MSE7x64Updater" /MIN /w "%wpipath%\Install\7\Software\x64\mpam-fe.exe"


odd shots of WPI's ive messed about with...
(and NO i wont provide these so don't ask for them)


I have more to add to this post with bits ive been working on, messing about seeing if its a viable platform for servicing my own systems.  At the moment ive been experimenting with software based interfaces for a mate (who owns this blog, that i sometimes write for...)

My own needs would be more suited to Plugns (audio mainly)  VST  (stand alone and installers)  so many installers, registry tweaks and so on (for varied software)  Id like to create an external drive where i can install the likes of "Native Instruments Knokat"  or  "Reason 5"  and have it copy over all the extra stuff for the specific app chosen  (i don't have big terrabytes of drive space on my main computer) So i often make a restore point, install something wildly drive hogging with all its extras and then restore back and install something else..  this menu makes system changes like that a breeze...

Universal Driver Disk Idea
what about a drivers section that shows Nothing (unless that driver is available?)
so you have 3 folders  AnyBIT (drivers working on x86 and x64) then you have an x64 folder and an x86 folder.. In them folders you have the Lan, Modem, Network and so on.. make one lot of folders (then while empty copy them to the other 2 dir's

then place drivers in the folders and rename the exe files to   setup.exe

then in WPI (dependencies tab, bottom LEFT box) you would add the likes of
FileExists("%wpipath%\Install\Drivers\AnyBIT\Bluetooth\setup.exe")
FileExists("%wpipath%\Install\Drivers\AnyBIT\CaptureCard\setup.exe")
FileExists("%wpipath%\Install\Drivers\AnyBIT\Cardreader\setup.exe")
FileExists("%wpipath%\Install\Drivers\AnyBIT\Chipset\setup.exe")
FileExists("%wpipath%\Install\Drivers\AnyBIT\Dongle\setup.exe")
FileExists("%wpipath%\Install\Drivers\AnyBIT\Fax\setup.exe")
and so on for each one...  this way only available drivers would show up on the menu  ;)
(speedy way to make these is make one list for AnyBIT)
add them all to the list then in notepad hit edit, find and replace and replace
\AnyBIT\
with
\86\    and click replace all
(yes i have met people who have taken hours to edit a bat file and list like this LOL)

you can also throw the architecture command in line to avoid the wrong one being installed
{OS=Win8.1} {x64} {START} "PrinterDriver" /w "%wpipath%\Install\Drivers\x64\Printer\setup.exe"
that will make WPI skip it if its ticked on a 32bit running OS

feel free to leave your ideas and tweaks in the comments, they may help me and others get more out of this fantastic program.

Remember WPI uses the &&  ||  phrasing, so you can also define an OS and Architecture in the (bottom left) dependency box so that stuff wont even show up on systems you don't want it to

 this for example would stop it showing up an an x64 windows 8.1 and hide it from every other version of windows its run on
 getOSver()=="Win8.1" && getBits()==32

if you wanted it to run on both, you could simply just state  getOSver()=="Win8.1"
or be cocky and state
getOSver()=="Win8.1" && getBits()==32 || getBits()==64
so its using the AND and the OR statement

If we wanted to Detect something to see if its already installed (so we don't re-install it)
we could use the Dependencies box on the bottom right, so if it detects the file presence AND its actual installed version number, it'll grey out the option to install it.  Using the OR expression you can check both locations (regardless of if its installed in program files.. or program files (x86) by checking Both Paths with the ||   OR in between

getFileVersion("%PROGRAMFILES%\Malwarebytes Anti-Malware\mbam.exe")>="2.3.55.0" || getFileVersion("%ProgramFiles(x86)%\Malwarebytes Anti-Malware\mbam.exe")>="2.3.55.0"

if its Not installed (OR you have a Newer Version already)  it'll grey out the option to install the 2.3.55.0 you added to your install dir in wpi

It opens up some fantastic ideas if you wanted to make a servicing disk, ber in mind windows 7 for example (be it 7 or 7 SP1) is just  winver 7, so if you put the disk in a none sp1 machine stuff would show up you'd not want available until SP1 was installed...

So you could check for windows 7 && the service pack 1, or you could check for windows 7 so if you wanted to offer the ability to Install SP1, the left box would be

getOSver()=="Win7" && getBits()==32 && getSPver()==0
or
getBits()==64 && getOSver()=="Win7" && getSPver()==1
the order often has random effects, try your design in different environments

Example on Windows 10 work in progress from an 8.1 template
Example on Windows 8.1

Wednesday, 5 August 2015

Updating the Official Windows 8.1 ISO Releases


Ok as slipstreaming goes its a pain with 8 and 8.1 due to the "Servicing Stack" updates mostly, so i have taken a totally different path to how i normally integrate updates into windows source disks and usb's for windows 8.1.

Firstly lets remember there is sometimes MORE updates for one type than another

EXAMPLE:
the x64 version has an update for windows that the x86 doesn't have (and vice versa)
it can also happen that there is an update for pro (thats not needed by home)

Having these updates in the same folder (IE, running a batch on home and there are also pro only updates in the folder) won't be a problem, DISM & Windows Installer will just skip it often with the basic message  "this update is not applicable for this version of windows"   ;)

Option ONE:  semi high tech
Integration wise, if you have 7 or how ever many versions of windows 8.1 (inside ONE WIM file) you have to unpack them & mount them, place the updates within a folder (you make) called  WINDOWS_UPDATES  for an x86 wim, place all the x86 updates in that, for an x64 wim place all the x64 updates in it.

Note that size wise, when you compile one or more x86 images (or x64) into ONE wim
only 1 copy of a file is actually stored (so 7 versions won't end up taking the space of 7 copies of every update) you will ONLY end up with 1 copy of each update file.. yet if you export 1 wim, it'll export with the updates, because you merged them all with updates inside (so adding updates to all wim files is important ;)

With the WINDOWS_UPDATES folder copied to the ROOT of each wim (after install the folder and msu files will be in the systems root regardless of their chosen drive letter or lable) you then have choices on how they'll be run....

A) manually by running the bat file you make (in the folder with the MSU files)
i called mine   0ImportantUpdatesX64.bat  (0 is so its first file in the folder)

Contents of BAT file are as follows
(make sure word wrap is off when making this in notepad)
and make sure its saved as a BAT.. not a TXT..
 0ImportantUpdatesX64.bat    not    0ImportantUpdatesX64.bat.txt
(name it x86 for the x86 folder, just in case things get more automated in your coding)

@ECHO OFF
setlocal
set PATHTOFIXES=%SystemDrive%\WINDOWS_UPDATES
FOR %%i IN ("%PATHTOFIXES%\*.msu") DO START /WAIT "" WUSA.EXE "%%i" /quiet /norestart
B) rather than making the bat file, you could add the code above to the setupcomplete.cmd


Your other option
Option TWO:  seriously low tech

keep a copy of the 2 update folders

EXAMPLE
DRIVE:   \x86\WINDOWS_UPDATES
DRIVE:   \x64\WINDOWS_UPDATES
with the MSU files in each (along with the batfile in each)
and after install, copy the folder to the root, right click & run the bat as admin
(the low teck solution does make it easier to keep an updated folder to hand rather than re-editing wims)

Clearly their are more hightech ways to get the FOLDER to move over using the setupcomplete.cmd but that's a lot more messing around, extra file copying that'll delay other stuff set with the CMD file, install failing if media is damaged and something can't be read.

This isn't the greatest of methods, but tbh copying a folder to the root and runnin a bat file isn't that hard right?


As for the moronic trolling comments i feel will follow this post... like.. what a joke.. why bother.. just use windows update....  ber this in mind.. some people use pre-pay dongles.. or have crap internet connections..  this is about Bandwidth, not just Automation!!

IF YOU DOWNLOAD THE OFFICIAL WINDOWS 8.1 ISO FILES:
these are the current needed updates covering ISO release to AUGUST 2015
(so after doing these.. save any newer ones to the respective x86 and x64 folders)

Important Updates Section (on windows update) for x64


NDP462-KB3151800-x86-x64-AllOS-ENU.exe  <-- Run Manually or setupcomplete it

and then these

Windows8.1-KB2894856-v2-x64.msu
Windows8.1-KB2899189-x64.msu
Windows8.1-KB2973351-x64.msu
Windows8.1-KB2977765-x64.msu
Windows8.1-KB2978041-x64.msu
Windows8.1-KB2978126-x64.msu
Windows8.1-KB2979576-x64.msu
Windows8.1-KB2994290-x64.msu
Windows8.1-KB3004361-x64.msu
Windows8.1-KB3004365-v2-x64.msu
Windows8.1-KB3008242-x64.msu
Windows8.1-KB3011780-x64.msu
Windows8.1-KB3019215-x64.msu
Windows8.1-KB3019978-x64.msu
Windows8.1-KB3021674-x64.msu
Windows8.1-KB3021910-x64.msu
Windows8.1-KB3022777-x64.msu
Windows8.1-KB3023222-x64.msu
Windows8.1-KB3023266-x64.msu
Windows8.1-KB3025417-x64.msu
Windows8.1-KB3030377-x64.msu
Windows8.1-KB3032663-x64.msu
Windows8.1-KB3033889-x64.msu
Windows8.1-KB3035017-x64.msu
Windows8.1-KB3035126-x64.msu
Windows8.1-KB3035132-x64.msu
Windows8.1-KB3037579-x64.msu
Windows8.1-KB3038256-x64.msu
Windows8.1-KB3039066-x64.msu
Windows8.1-KB3042085-v2-x64.msu
Windows8.1-KB3042553-x64.msu
Windows8.1-KB3044374-x64.msu
Windows8.1-KB3045171-x64.msu
Windows8.1-KB3045685-x64.msu
Windows8.1-KB3045755-x64.msu
Windows8.1-KB3045999-x64.msu
Windows8.1-KB3046002-x64.msu
Windows8.1-KB3046359-x64.msu
Windows8.1-KB3055642-x64.msu
Windows8.1-KB3059317-x64.msu
Windows8.1-KB3061468-x64.msu
Windows8.1-KB3061512-x64.msu
Windows8.1-KB3061518-x64.msu
Windows8.1-KB3062760-x64.msu
Windows8.1-KB3065822-x64.msu
Windows8.1-KB3067505-x64.msu
Windows8.1-KB3069392-x64.msu
Windows8.1-KB3070102-x64.msu
Windows8.1-KB3072630-x64.msu
Windows8.1-KB3072633-x64.msu
Windows8.1-KB3074886-x64.msu
Windows8.1-KB3075516-x64.msu
Windows8.1-KB3079777-x64.msu
Windows8.1-KB3079904-x64.msu


Important Updates Section (on windows update) for x86

NDP462-KB3151800-x86-x64-AllOS-ENU.exe  <-- Run Manually or setupcomplete it

and then these
Windows8.1-KB2894856-v2-x86.msu
Windows8.1-KB2899189-x86.msu
Windows8.1-KB2973351-x86.msu
Windows8.1-KB2977765-x86.msu
Windows8.1-KB2978041-x86.msu
Windows8.1-KB2978126-x86.msu
Windows8.1-KB2979576-x86.msu
Windows8.1-KB2994290-x86.msu
Windows8.1-KB3004361-x86.msu
Windows8.1-KB3004365-v2-x86.msu
Windows8.1-KB3008242-x86.msu
Windows8.1-KB3011780-x86.msu
Windows8.1-KB3019215-x86.msu
Windows8.1-KB3019978-x86.msu
Windows8.1-KB3021674-x86.msu
Windows8.1-KB3021910-x86.msu
Windows8.1-KB3022777-x86.msu
Windows8.1-KB3023222-x86.msu
Windows8.1-KB3023266-x86.msu
Windows8.1-KB3025417-x86.msu
Windows8.1-KB3030377-x86.msu
Windows8.1-KB3032663-x86.msu
Windows8.1-KB3033889-x86.msu
Windows8.1-KB3035017-x86.msu
Windows8.1-KB3035126-x86.msu
Windows8.1-KB3035132-x86.msu
Windows8.1-KB3037579-x86.msu
Windows8.1-KB3038256-x86.msu
Windows8.1-KB3039066-x86.msu
Windows8.1-KB3042085-v2-x86.msu
Windows8.1-KB3042553-x86.msu
Windows8.1-KB3044374-x86.msu
Windows8.1-KB3045171-x86.msu
Windows8.1-KB3045685-x86.msu
Windows8.1-KB3045755-x86.msu
Windows8.1-KB3045999-x86.msu
Windows8.1-KB3046002-x86.msu
Windows8.1-KB3055642-x86.msu
Windows8.1-KB3059317-x86.msu
Windows8.1-KB3061468-x86.msu
Windows8.1-KB3061512-x86.msu
Windows8.1-KB3061518-x86.msu
Windows8.1-KB3062760-x86.msu
Windows8.1-KB3065822-x86.msu
Windows8.1-KB3067505-x86.msu
Windows8.1-KB3069392-x86.msu
Windows8.1-KB3070102-x86.msu
Windows8.1-KB3072630-x86.msu
Windows8.1-KB3072633-x86.msu
Windows8.1-KB3074886-x86.msu
Windows8.1-KB3075516-x86.msu
Windows8.1-KB3079777-x86.msu
Windows8.1-KB3079904-x86.msu

There is also 80+ optional updates needed by the so called NEW official iso files
    but they are Optional, not specifically important
(but you can grab them and add them to your folders or wims if you wish to...

Worried about your final WIM size if storing them inside?
when your finished making the final WIM.. Convert it to ESD
(that can knock well over a gig off its size)   ;)


Tbh.. i did manage to modify the Burf Windows update install script so it works on windows 8.1, but it clearly states not to distribute modified versions of it.. and as of yet.. hes not updated it..