Function LastStepsPage
!insertmacro MUI_HEADER_TEXT "$(LASTSTEPS_TITLE)" "$(LASTSTEPS_SUBTITLE)"
ReadRegStr $ShellPUFix HKLM "Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot" "Shell"
StrCmp $ShellPUFix "USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon" isShellPUFix isNotShellPUFix
Goto doneShellPUFix
isShellPUFix:
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 4" "Flags" "DISABLED"
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 5" "Flags" "DISABLED"
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 6" "Flags" "DISABLED"
Goto doneShellPUFix
isNotShellPUFix:
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 4" "Flags" ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 5" "Flags" ""
!insertmacro MUI_INSTALLOPTIONS_WRITE "LastSteps" "Field 6" "Flags" ""
Goto doneShellPUFix
doneShellPUFix:
# Display the page.
!insertmacro MUI_INSTALLOPTIONS_DISPLAY_RETURN "LastSteps"
Pop $R0 ;Get the return value
StrCmp $R0 "success" isSuccess isNotSuccess
isSuccess:
# Get the user entered values.
!insertmacro MUI_INSTALLOPTIONS_READ $Reboot "LastSteps" "Field 2" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $SetShell "LastSteps" "Field 3" "State"
!insertmacro MUI_INSTALLOPTIONS_READ $ShellPUFix "LastSteps" "Field 4" "State"
IntCmp 1 $ShellPUFix isShellPUFix2
Goto doneShellPUFix2
isShellPUFix2:
WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\IniFileMapping\system.ini\boot" "Shell" "USR:Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer" "DesktopProcess" 0x00000001
Goto doneShellPUFix2
doneShellPUFix2:
IntCmp 1 $SetShell isSetShell
Goto doneSetshell
isSetShell:
WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\Winlogon" "Shell" "$INSTDIR\SharpCore.exe"
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer" "DesktopProcess" 0x00000001
Goto doneSetShell
doneSetShell:
IntCmp 1 $Reboot isReboot
Goto doneReboot
isReboot:
Reboot
Goto doneReboot
doneReboot:
isNotSuccess:
FunctionEnd