Build an OFFICIAL installer

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
Ahau
King of Docs
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

As I consider the documentation I'm writing for the UAC installer, I think it might be more clear for users if we had a separate button that only re-activates UAC. So, users could select 'No' without making any changes to their system (if, for some reason they already had UAC disabled). Also, it would be more clear in the instructions (and, I think in practice) if we had them press a button to "Deactivate UAC" and then one to "Activate UAC".

What do you guys think?
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Build an OFFICIAL installer

Post#32 by Hamza » 10 May 2011, 12:21

I agree with you Ahau. This is good idea!
NjVFQzY2Rg==

User avatar
Ahau
King of Docs
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

Here's what I've written for the install guide -- I added a new step for windows installs:

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.
Let me know if this works, or if any changes are needed. If anyone feels that using the "No" option is better, I will edit this accordingly.

Thanks!!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Build an OFFICIAL installer

Post#34 by fanthom » 10 May 2011, 14:26

my vote goes on "Deactivate/Activate UAC" - maybe one button instead of two?
(function must check if UAC is active or inactive)
what do you think Blaze?
Please add [Solved] to your thread title if the solution was found.

User avatar
Blaze
Moderator
Moderator
Posts: 1342
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Build an OFFICIAL installer

Post#35 by Blaze » 10 May 2011, 19:56

fanthom wrote:my vote goes on "Deactivate/Activate UAC"
I think it's possible, but will need to use GUI. I tried to tweak my code again:

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
and this don't & work for me :wall: (for example after second reboot of win 7 - my UAC is activated)

Please test this UAC.exe and report me about it.
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Build an OFFICIAL installer

Post#36 by brokenman » 10 May 2011, 21:27

If i ever get time i will write an installer for windows that is separate from the ISO. This way users can just download the ISO and the installer and get to it.

@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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Blaze
Moderator
Moderator
Posts: 1342
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Build an OFFICIAL installer

Post#37 by Blaze » 11 May 2011, 05:49

Image
I think we can use this tool TweakUAC - it's better way (small size of unpacked TweakUAC.exe ~85 kb, + quiet mode) :good:
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
fanthom
Site Admin
Site Admin
Posts: 4547
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Build an OFFICIAL installer

Post#38 by fanthom » 11 May 2011, 08:54

can't help much here - dont have Win7 :cry:
Please add [Solved] to your thread title if the solution was found.

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Build an OFFICIAL installer

Post#39 by Hamza » 11 May 2011, 11:20

@Blaze,
I agree with you.

@fanthom,
You like PirateBay ;)
NjVFQzY2Rg==

User avatar
Blaze
Moderator
Moderator
Posts: 1342
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Build an OFFICIAL installer

Post#40 by Blaze » 11 May 2011, 13:09

fanthom,
I tested all modes of TweakUAC in Win 7 - it work fine for me.
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Hamza
Warlord
Warlord
Posts: 1846
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Build an OFFICIAL installer

Post#41 by Hamza » 11 May 2011, 13:13

@Blaze,
What's your version?
NjVFQzY2Rg==

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Build an OFFICIAL installer

Post#42 by brokenman » 11 May 2011, 18:02

I have used TweakUAC before (vista). It works well and silent mode is what i meant with my last comment. It is around 300Kb so should do fine.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Blaze
Moderator
Moderator
Posts: 1342
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Build an OFFICIAL installer

Post#43 by Blaze » 12 May 2011, 10:12

Hamza, Are you mean a version of Windows or installer?
Windows 7 x86, this installer.

brokenman,
It is around 300Kb
unpacked TweakUAC.exe ~85 kb
The installer of TweakUAC with ~300Kb does not need.
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Ahau
King of Docs
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

Are we moving forward with TweakUAC, or staying with the UAC.exe?

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 ;)
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Blaze
Moderator
Moderator
Posts: 1342
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Build an OFFICIAL installer

Post#45 by Blaze » 18 May 2011, 11:01

I vote for TweakUAC.exe
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Post Reply