~Win10-1809::STAGE2::Install
| 3 Votes |
Description
Win10-1809::STAGE1::Stage Installation Files
- Stage all required installation files to "c:\temp\Win10" (Precache for future deployment)
Win10-1809::STAGE2::INSTALL
- Perform inplace upgrade to Window 10 1809
Win10-1809::STAGE3::Cleanup
- Removes the Stage Installation Files
Property Details
| 25594 | |
| Production - Fully Tested and Ready for Production | |
| ~Win10-1809::STAGE2::Install | |
| BESC | |
| Upgrade | |
| 10 | |
| Microsoft | |
| Unspecified | |
| Unspecified | |
| 1/7/2019 12:00:00 AM | |
| Unspecified | |
| Stage 1809 | |
| True | |
| Ken on 1/9/2019 3:31:52 AM | |
| Ken on 1/9/2019 3:31:52 AM | |
| 7313 Views / 150 Downloads | |
* Average over 1 rating.
** Log In or Register to add your rating.
|
Relevance
| Used in 368 fixlets | * Results in a true/false |
(if( name of operating system starts with "Win" ) then platform id of operating system != 3 else false) AND (if exists property "in proxy agent context" then ( not in proxy agent context ) else true )
| Used in 5 fixlets | * Results in a true/false |
x64 of operating system AND not ia64 of operating system
| Used in 5 fixlets | * Results in a true/false |
(it starts with "Win" AND it does not start with "Win20") of name of operating system AND (exists value "CurrentMajorVersionNumber" of it AND value "CurrentMajorVersionNumber" of it as integer = 10) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" of native registry
| Used in 4 fixlets | * Results in a true/false |
system ui language as string as lowercase = "English (United States)" as lowercase
| Used in 4 fixlets | * Results in a true/false |
exists value "EditionID" whose (it as string as lowercase = "EducationN" as lowercase OR it as string as lowercase = "Education" as lowercase OR it as string as lowercase = "ProfessionalN" as lowercase OR it as string as lowercase = "Professional" as lowercase OR it as string as lowercase = "EnterpriseN" as lowercase OR it as string as lowercase = "Enterprise" as lowercase) of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" of native registry
| Used in 2 fixlets | * Results in a true/false |
operating system as string does not contain "1809"
| Used in 2 fixlets | * Results in a true/false |
(not exists values "ClearCaseMajorVersion" whose (it as string as version < "10") of keys "HKLM\SOFTWARE\Atria\ClearCase\CurrentVersion" of (x32 registries; x64 registries))
| Used in 2 fixlets | * Results in a true/false |
if exist file "C:\temp\Win10\SW_DVD9_Win_Pro_Ent_Edu_N_10_1809_64-bit_English_MLF_X21-96501.ISO" then true else false
Actions
Action 1 (default)
Action Link Click
here to execute this action.
Script Type
BigFix Action Script
//Start inplace upgradeSuccess Criteria
if {free space of drive of client > 5000000000}
parameter "workISO" = "C:\temp\Win10\SW_DVD9_Win_Pro_Ent_Edu_N_10_1809_64-bit_English_MLF_X21-96501.ISO"
continue if {exists file (parameter "workISO")}
continue if {sha1 of file (parameter "workISO") = "6208b319de3aaf0d8ec5b8d0f710e2744f89d0b4"}
// prepare a workpath to temporary files.
parameter "workPath" = "{(value of variable "SystemDrive" of environment) & "\win10_upgrade_temp"}"
waithidden cmd /C rmdir /S /Q "{parameter "workPath"}"
waithidden cmd /C mkdir "{parameter "workPath"}"
// Create the cleanup file.
delete __appendfile
delete setupcomplete.cmd
appendfile @echo off
appendfile SET WindowsISO="{parameter "workISO"}"
// appendfile powershell.exe "Dismount-DiskImage ""%WindowsISO%"""
// appendfile rmdir /S /Q "{parameter "workPath"}"
move __appendfile setupcomplete.cmd
// Create a debug invocation batch to help in case of failures.
// This batch does not perform an update but with the scanonly option allows you to determine what the problem is.
delete __appendfile
appendfile @echo off
appendfile SET WindowsISO="{parameter "workISO"}"
appendfile FOR /F "skip=3" %%I IN ('powershell.exe "Get-DiskImage """%WindowsISO%""" | Get-Volume | Select-Object {{$_.DriveLetter}"') DO %%I:\setup.exe /auto upgrade /Compat ScanOnly /DynamicUpdate disable"
appendfile echo %errorlevel% > "{parameter "workPath"}\out.log"
move __appendfile "{(parameter "workPath") & "/upgradeCheck.bat"}"
// Create the actual invocation script
// Sleep and Dir were added or command would fail with %errorlevel% 183. Possibly a delay on mount.
delete __appendfile
delete mount.and.install.bat
appendfile @echo on
appendfile SET WindowsISO="{parameter "workISO"}"
appendfile powershell.exe "Mount-DiskImage ""%WindowsISO%"""
appendfile TIMEOUT 10
appendfile FOR /F "skip=3" %%I IN ('powershell.exe "Get-DiskImage """%WindowsISO%""" | Get-Volume | Select-Object {{$_.DriveLetter}"') DO dir %%I: > "{parameter "workPath"}\dir.log" && %%I:\setup.exe /auto upgrade /Quiet /DynamicUpdate disable /postoobe "{pathname of client folder of current site & "\setupcomplete.cmd"}"
appendfile echo %errorlevel% > "{parameter "workPath"}\out.log"
move __appendfile mount.and.install.bat
wait mount.and.install.bat > "{parameter "workPath"}\cmd.log"
wait setupcomplete.cmd >"{parameter "workPath"}\setupcomplete.log"
// setup must finish with RC=0 at this stage if things are ok. If that is not the case content of C:\"\win10_upgrade_temp dir holds useful info.
// Apart from log files, you can run upgradeCheck manually to check with the UI what the problem is.
action requires restart "6208b319de3aaf0d8ec5b8d0f710e2744f89d0b4"
endif
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
| Social Media: |
Comments
|
|
|
| Have you done this with 20H2, did adding that line worked for you for 20H2? Where in that line did you put the "-ExecutionPolicy "Bypass" -command" | |
|
|
|
| Nice job buddy. | |
|
|
|
| I was able to modify this slightly to get it to work with Windows 10 version 2004. In addition to changing the ISO filename and hash values, I had to add "-ExecutionPolicy "Bypass" -command" into the line "appendfile FOR /F "skip=3" %%I IN" etc. | |

