Re: Build an OFFICIAL installer
Posted: 18 May 2011, 11:15
@Blaze
could you provide updated "win_start_here.hta" + TweakUAC.exe for testing, please.
could you provide updated "win_start_here.hta" + TweakUAC.exe for testing, please.
Then to you will be accessible the choice (2 buttons) Restart now and Restart later. The settings is save (change).Does Tweak UAC automatically reboot the machine when the settings are changed?
Code: Select all
4) If you are running the installer from Windows Vista or Windows 7 (users of Windows XP and earlier versions can skip this step), you must disable the User Account Control (UAC) program. To simplify this task, an application called Tweak UAC has been included with our installer. In order to temporarily disable UAC, click on the "Tweak UAC" button on the win_start_here.hta menu, then select the "Turn UAC off now" radio button and click OK. Then select the option to "Reboot now". After your computer reboots into Windows, open the win_start_here.hta application again, and proceed with Step 5 below. Once your installation is complete, you can run the win_start_here.hta application again, click on the "Tweak UAC" button, and select the "Leave UAC on" or "Switch UAC to the quiet mode" radio button, click OK and reboot your computer again in order to reactivate UAC.
Open win_start_here.htaI think we should have the button say "Tweak UAC"
Code: Select all
<td align="center">Install<br /><br /><input style="width: 9em" id=runbutton class="button" type="button" value="UAC" name="run_button" onClick="UAC">
Code: Select all
<td align="center">Install<br /><br /><input style="width: 9em" id=runbutton class="button" type="button" value="Tweak UAC" name="run_button" onClick="UAC">
All okThis is what I've written for the install guide. Let me know if this sounds clear and direct...
Code: Select all
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("TrayIconHide", 1)
GUICreate("Deactivate/Activate UAC", 400, 370, -1, -1)
GUISetBkColor(0xC8C8C8)
$Button1 = GUICtrlCreateButton("Deactivate UAC", 70, 300, 105, 57)
$Button2 = GUICtrlCreateButton("Activate UAC", 230, 300, 105, 57)
GUICtrlCreateLabel("This program will temporarily disable Windows User Account Control (UAC).", 0, 10, 400, 50, 0x01)
GUICtrlCreateLabel("This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk.", 0, 60, 400, 50, 0x01)
GUICtrlCreateLabel("Note!", 0, 120, 400, 50, 0x01)
GUICtrlCreateLabel("If you are running the installer from Windows Vista or Windows 7, you must disable the UAC. To do this, click on the “Deactivate UAC” button, and UAC will be deactivated and your computer will reboot to apply these changes.", 0, 150, 400, 50, 0x01)
GUICtrlCreateLabel("When you are done installing Porteus on your flash drive, you can reactive UAC by running this program again, pressing the “Activate UAC” button, and your computer will reboot.", 0, 230, 400, 50, 0x01)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
If $nMsg = $Button1 Then $iValue = 0
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "REG_DWORD", $iValue)
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin", "REG_DWORD", $iValue)
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "PromptOnSecureDesktop", "REG_DWORD", $iValue)
$response = MsgBox(4, "Warning", 'You must restart your computer to apply these changes.' & @CR & '' & @CR & 'Before restarting, save any open files and close all programs.' & @CR & '' & @CR & 'Do you want to restart your computer now?')
If $response = 6 then
Shutdown(2)
Exit
EndIf
If $response = 7 then
Exit
EndIf
Case $Button2
If $nMsg = $Button2 Then $iValue = 1
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA", "REG_DWORD", $iValue)
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin", "REG_DWORD", $iValue)
RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "PromptOnSecureDesktop", "REG_DWORD", $iValue)
$response = MsgBox(4, "Warning", 'You must restart your computer to apply these changes.' & @CR & '' & @CR & 'Before restarting, save any open files and close all programs.' & @CR & '' & @CR & 'Do you want to restart your computer now?')
If $response = 6 then
Shutdown(2)
Exit
EndIf
If $response = 7 then
Exit
EndIf
EndSwitch
WEnd
It may be better to show a short explanation as to the risk.This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk