Build an OFFICIAL installer
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Build an OFFICIAL installer
Post#31 by Ahau » 10 May 2011, 12:19
What do you guys think?
Ahau
Hamza
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Build an OFFICIAL installer
Post#33 by Ahau » 10 May 2011, 13:38
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 do this, click on the "Deactivate UAC" button on the win_start_here.hta menu, click Yes to continue, and UAC will be deactivated and your computer will reboot to apply these changes. After rebooting, 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 "Activate UAC" button, and reboot your computer in order to reactivate UAC.
Thanks!!
Ahau
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Build an OFFICIAL installer
Post#34 by fanthom » 10 May 2011, 14:26
(function must check if UAC is active or inactive)
what do you think Blaze?
fanthom
- Blaze
- DEV Team
- Posts: 3998
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
Post#35 by Blaze » 10 May 2011, 19:56
I think it's possible, but will need to use GUI. I tried to tweak my code again:fanthom wrote:my vote goes on "Deactivate/Activate UAC"
Code: Select all
#include <GUIConstants.au3>
Opt("TrayIconHide", 1)
$a = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$b = "ConsentPromptBehaviorAdmin"
$c = "REG_DWORD"
$d = "0"
$e = "PromptOnSecureDesktop"
$f = "EnableLUA"
$g = "5"
$h = "2"
$i = "1"
$font="Arial"
$var1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "ConsentPromptBehaviorAdmin")
$var2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "PromptOnSecureDesktop")
$var3 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", "EnableLUA")
GUICreate("Deactivate/Activate UAC", 400, 370, -1, -1)
GUISetBkColor(0xC8C8C8)
$Button1 = GUICtrlCreateButton("Deactivate UAC", 70, 300, 105, 57)
$Button2 = GUICtrlCreateButton("Activate UAC", 220, 300, 105, 57)
GUICtrlCreateLabel("This program will temporarily disable Windows User Account Control (UAC).", 0, 10, 400, 200, 0x01)
GUICtrlSetFont (-1,10, 400, 0, $font)
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, 200, 0x01)
GUICtrlSetFont (-1,10, 400, 0, $font)
GUICtrlCreateLabel("Note!", 0, 120, 400, 200, 0x01)
GUICtrlSetFont (-1,10, 400, 0, $font)
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, 200, 0x01)
GUICtrlSetFont (-1,10, 400, 0, $font)
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, 200, 0x01)
GUICtrlSetFont (-1,10, 400, 0, $font)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $Button1
If $var1 = 5 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $d)
EndIf
If $var2 = 1 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $e, $c, $d)
EndIf
If $var1 = 2 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $d)
EndIf
If $var3 = 1 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $f, $c, $d)
SplashTextOn("Warning", 'UAC has been disabled.' & @CR & 'Your OS will now reboot.' & @CR & '' & @CR & 'After your system reboots, follow these steps:' & @CR & '' & @CR & '1. Run win_start_here.hta' & @CR & '2. Press the “Install Porteus” button' & @CR & '3. Follow the instructions given by bootinst.bat', 400, 320, -1, -1, "", "", 18)
Sleep(15000)
Shutdown(2)
Exit
EndIf
Case $Button2
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $h)
EndIf
If $var2 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $e, $c, $i)
EndIf
If $var3 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $f, $c, $i)
Shutdown(2)
Exit
EndIf
EndSwitch
WEnd

Please test this UAC.exe and report me about it.
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Blaze
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Build an OFFICIAL installer
Post#36 by brokenman » 10 May 2011, 21:27
@Blaze ... there is a bug in the UAC.exe GUI. The buttons don't appear when i start it. If i run my mouse over where the buttons should be ... they then appear.
Rather than disabling the UAC ... wouldn't a more elegant solution be to elevate privileges so the UAC is no longer a problem? The only down side to this is that explorer would need to be killed, but a quick warning about this would be OK.
http://4sysops.com/archives/temporarily ... ut-reboot/
I don't think remaining with elevated rights will be a problem because one would assume that if you are installing, the next step will be to reboot and try to boot porteus.
Wear your underpants on the outside and put on a cape.
brokenman
- Blaze
- DEV Team
- Posts: 3998
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
Post#37 by Blaze » 11 May 2011, 05:49

I think we can use this tool TweakUAC - it's better way (small size of unpacked TweakUAC.exe ~85 kb, + quiet mode)

MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Blaze
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Build an OFFICIAL installer
Post#38 by fanthom » 11 May 2011, 08:54

fanthom
Hamza
- Blaze
- DEV Team
- Posts: 3998
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
Post#40 by Blaze » 11 May 2011, 13:09
I tested all modes of TweakUAC in Win 7 - it work fine for me.
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Blaze
Hamza
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: Build an OFFICIAL installer
Post#42 by brokenman » 11 May 2011, 18:02
Wear your underpants on the outside and put on a cape.
brokenman
- Blaze
- DEV Team
- Posts: 3998
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
Post#43 by Blaze » 12 May 2011, 10:12
Windows 7 x86, this installer.
brokenman,
unpacked TweakUAC.exe ~85 kbIt is around 300Kb
The installer of TweakUAC with ~300Kb does not need.
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Blaze
- Ahau
- King of Docs
- Posts: 1331
- Joined: 28 Dec 2010, 15:18
- Distribution: LXDE & Xfce 32/64-bit
- Location: USA
Re: Build an OFFICIAL installer
Post#44 by Ahau » 16 May 2011, 20:09
I'm in no position to make decisions, but we need to get this issue settled out if we're going to release V1.0 final...I just want to finish the install guide

Ahau
- Blaze
- DEV Team
- Posts: 3998
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
Post#45 by Blaze » 18 May 2011, 11:01
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
Blaze