Build an OFFICIAL installer
Re: Build an OFFICIAL installer
I working on an installer for Windows , but still working on download function for download the last version available.
NjVFQzY2Rg==
Re: Build an OFFICIAL installer
Quick Update: I'm also still working on my installer...
Re: Build an OFFICIAL installer
NjVFQzY2Rg==
Re: Build an OFFICIAL installer
Guys, I've quit on my version of the installer. See Install on "Install on Windows Vista and 7" for details to understand why.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Build an OFFICIAL installer
continuation from "Install on Windows Vista and 7" thread.
latest version of 64bit /boot folder:
http://www.4shared.com/file/yp32EWc_/boot.html
has syslinux-4.0.4 included.
tried to leave only necessary files in /boot and move the rest to subfolders. ready to use when you put your vmlinuz and initrd.xz to /boot.
i think it's better now.
any other suggestions? other tweaks to win_start_here.hta?
UAC.exe must have english lang fixed before FINAL.
latest version of 64bit /boot folder:
http://www.4shared.com/file/yp32EWc_/boot.html
has syslinux-4.0.4 included.
tried to leave only necessary files in /boot and move the rest to subfolders. ready to use when you put your vmlinuz and initrd.xz to /boot.
i think it's better now.
any other suggestions? other tweaks to win_start_here.hta?
UAC.exe must have english lang fixed before FINAL.
Please add [Solved] to your thread title if the solution was found.
- 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
I don't have the most current version of the source code for Blaze's installer, and I can't run the .exe file on my computer. So, I've edited the user-readable portions of the latest source code that was posted to the "Install on Vista or 7" thread:
I imagine some changes will be needed, e.g. if the name of the installer is no longer "winstaller.exe"
Would it be possible and/or better to have a program written with an option to re-activate UAC after installation, so the users don't have to do this manually? I think this might make the install program feel more legitimate. Thoughts?
I wouldn't want it to activate UAC for everyone, in case there are some users who have already deactivated it and don't want it active, but it would be easier for those who want it reactivated.
Once we get the behavior of this program, it's name, etc., ironed out, I'll update the install guide to reflect the changes, with a note to Vista and 7 users that they'll need to run the Disable UAC program if they want to install from windows --this does not apply to XP and earlier versions, correct? I'll also remind them that if they are uncomfortable disabling UAC, they can burn the porteus .iso to a CD and run the porteus2usb script or lin_start_here.sh to circumvent Windows.
Thanks!
Code: Select all
#NoTrayIcon
#RequireAdmin
Opt("TrayIconHide", 1)
$a = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$b = "ConsentPromptBehaviorAdmin"
$c = "REG_DWORD"
$d = "0"
$e = "PromptOnSecureDesktop"
$f = "EnableLUA"
$aDrives = DriveGetDrive("All")
$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")
$response = MsgBox(4, "Warning", 'This program will temporarily disable Windows User Account Control (UAC). This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk.' & @CR & '' & @CR & 'Note!' & @CR & '' & @CR & 'If UAC is active, your system must be rebooted after this program disables it.' & @CR & 'If is not active, you will be able to install Porteus without rebooting.' & @CR & '' & @CR & 'When you are done installing Porteus on your USB flash drive, you can activate UAC manually. To do this, you will need to type “uac” in the Start menu, click "Change User Account Control Settings" and restart.' & @CR & '' & @CR & 'Are you sure you want to continue?')
If $response = 6 then
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 & 'After reboot run the winstaller.exe installer again and follow the instructions.', 310, 250, -1, -1, "", "", 24)
Sleep(15000)
Shutdown(2)
Exit
EndIf
For $i = 1 To $aDrives[0]
If DriveStatus($aDrives[$i]) <> "READY" Then ContinueLoop
If FileExists($aDrives[$i] & "\boot\win_start_here.hta") Then
FileChangeDir($aDrives[$i] & "\boot\")
ShellExecute("win_start_here.hta")
ExitLoop
EndIf
Next
Else
Exit
EndIf
Would it be possible and/or better to have a program written with an option to re-activate UAC after installation, so the users don't have to do this manually? I think this might make the install program feel more legitimate. Thoughts?
I wouldn't want it to activate UAC for everyone, in case there are some users who have already deactivated it and don't want it active, but it would be easier for those who want it reactivated.
Once we get the behavior of this program, it's name, etc., ironed out, I'll update the install guide to reflect the changes, with a note to Vista and 7 users that they'll need to run the Disable UAC program if they want to install from windows --this does not apply to XP and earlier versions, correct? I'll also remind them that if they are uncomfortable disabling UAC, they can burn the porteus .iso to a CD and run the porteus2usb script or lin_start_here.sh to circumvent Windows.
Thanks!
Please take a look at our online documentation, here. Suggestions are welcome!
- Blaze
- DEV Team
- Posts: 3885
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
hi Ahau,
Please, will check my English grammar (don't delete the tabulation in this source code). Thanks.
It's possible. My a new source code of UAC.exe:better to have a program written with an option to re-activate UAC after installation
Code: Select all
#NoTrayIcon
#RequireAdmin
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"
$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")
$response = MsgBox(4, "Warning", 'This program will temporarily disable UAC. This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk.' & @CR & '' & @CR & 'Note!' & @CR & 'If UAC is active, your system must be rebooted after this program disables it.' & @CR & 'If is not active, you will be able to install Porteus without rebooting.' & @CR & '' & @CR & 'When you have installed Porteus on your usb flash you can active UAC.' & @CR & 'For it to press the button “NO” and then restart your OS.' & @CR & '' & @CR & 'Are you sure you want to continue?')
If $response = 6 then
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 reboot:' & @CR & '1. Run win_start_here.hta' & @CR & '2. Press the button:' & @CR & '“Install Porteus”.' & @CR & '3. Follow instruction.', 350, 260, -1, -1, "", "", 18)
Sleep(15000)
Shutdown(2)
Exit
EndIf
Else
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $g)
EndIf
If $var2 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $e, $c, $i)
EndIf
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $h)
EndIf
If $var3 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $f, $c, $i)
EndIf
Exit
EndIf
You are rightthis does not apply to XP and earlier versions, correct?
this does not apply to XP and earlier versions
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
- 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
Thanks, Blaze! Sorry for deleting the tabs -- I edited this in windows notepad, and it removed them. I edited it in Word, hopefully this works better:
Please let me know if I've properly described how to reactivate UAC. Did I interpret your wording correctly? Does pressing "no" activate UAC?
Thank you very much!
Code: Select all
#NoTrayIcon
#RequireAdmin
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"
$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")
$response = MsgBox(4, "Warning", 'This program will temporarily disable Windows User Account Control (UAC). This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk.' & @CR & '' & @CR & 'Note!' & @CR & 'If UAC is active, your system must be rebooted after this program disables it.' & @CR & 'If UAC is not active, you will be able to install Porteus without rebooting.' & @CR & '' & @CR & 'When you are done installing Porteus on your USB flash drive, you can reactive UAC by running this program again, pressing the “NO” button, and restarting windows.' & @CR & '' & @CR & 'Are you sure you want to continue?')
If $response = 6 then
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 & '1. Run win_start_here.hta' & @CR & '2. Press the “Install Porteus” button' & @CR & '3. Follow the instructions given by win_start_here.hta.', 350, 260, -1, -1, "", "", 18)
Sleep(15000)
Shutdown(2)
Exit
EndIf
Else
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $g)
EndIf
If $var2 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $e, $c, $i)
EndIf
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $h)
EndIf
If $var3 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $f, $c, $i)
EndIf
Exit
EndIf
Thank you very much!
Please take a look at our online documentation, here. Suggestions are welcome!
- Blaze
- DEV Team
- Posts: 3885
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
exactly. This activate UAC.Does pressing "no" activate UAC?
Code: Select all
#NoTrayIcon
#RequireAdmin
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"
$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")
$response = MsgBox(4, "Warning", 'This program will temporarily disable Windows User Account Control (UAC). This is necessary in order to modify the Master Boot Record of your flash drive, and it will temporarily put your computer at risk.' & @CR & '' & @CR & 'Note!' & @CR & 'If UAC is active, your system must be rebooted after this program disables it.' & @CR & 'If UAC is not active, you will be able to install Porteus without rebooting.' & @CR & '' & @CR & 'When you are done installing Porteus on your flash drive, you can reactive UAC by running this program again, pressing the “NO” button, and restarting Windows.' & @CR & '' & @CR & 'Are you sure you want to continue?')
If $response = 6 then
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
Else
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $g)
EndIf
If $var2 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $e, $c, $i)
EndIf
If $var1 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $b, $c, $h)
EndIf
If $var3 = 0 Then
FileWrite (@CommonFilesDir & "\System\en-US\mui\log.txt","Text")
RegWrite($a, $f, $c, $i)
EndIf
Exit
EndIf
win_start_here.hta
Code: Select all
<html>
<head>
<title>Porteus winstaller</title>
<HTA:APPLICATION
ID="objScriptFromText"
CONTEXTMENU = "No"
APPLICATIONNAME="Porteus winstaller"
SCROLL="no"
SINGLEINSTANCE="yes"
BORDER="thin"
ICON="docs\favicon.ico"
>
</head>
<SCRIPT Language="VBScript">
Sub Window_onLoad
intWidth = 350
intHeight = 190
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 2) - (intWidth / 2)), ((Screen.Height / 2) - (intHeight / 2))
End Sub
Sub UAC
CreateObject("WScript.Shell").Run "tools\UAC.exe"
End Sub
Sub InstallGuide
CreateObject("WScript.Shell").Run "wordpad.exe docs\install.txt"
End Sub
Sub ReadCheatcodes
CreateObject("WScript.Shell").Run "wordpad.exe docs\cheatcodes.txt"
End Sub
Sub Requirements
CreateObject("WScript.Shell").Run "wordpad.exe docs\requirements.txt"
End Sub
Sub InstallPorteus
CreateObject("WScript.Shell").Run "scripts\bootinst.bat"
End Sub
Sub PorteusExit
window.close()
End Sub
Sub Pointer
document.body.style.cursor = "hand"
End Sub
Sub DefaultCursor
document.body.style.cursor = "default"
End Sub
</SCRIPT>
<body background="docs\porteus.png">
<table width="100%">
<tr>
<td align="center">Information<br /><br /><input style="width: 9em" id=runbutton class="button" type="button" value="Requirements" name="run_button" onClick="Requirements">
<input style="width: 9em" id=runbutton class="button" type="button" value="Install guide" name="run_button" onClick="InstallGuide">
<input style="width: 9em" id=runbutton class="button" type="button" value="Cheatcodes" name="run_button" onClick="ReadCheatcodes"></td>
<td align="center">Install<br /><br /><input style="width: 9em" id=runbutton class="button" type="button" value="UAC" name="run_button" onClick="UAC">
<input style="width: 9em" id=runbutton class="button" type="button" value="Install Porteus" name="run_button" onClick="InstallPorteus">
<input style="width: 9em" id=runbutton class="button" type="button" value="Exit" name="run_button" onClick="PorteusExit"></td>
</tr>
</table>
</body>
</html>
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Build an OFFICIAL installer
@Ahau, Blaze
great stuff guys - updated my snapshot with these files. will be ready for testing in 64bit rc2.
great stuff guys - updated my snapshot with these files. will be ready for testing in 64bit rc2.
Please add [Solved] to your thread title if the solution was found.
- 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
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?
What do you guys think?
Please take a look at our online documentation, here. Suggestions are welcome!
- 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
Here's what I've written for the install guide -- I added a new step for windows installs:
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!!
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!!
Please take a look at our online documentation, here. Suggestions are welcome!
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: Build an OFFICIAL installer
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?
(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.
- Blaze
- DEV Team
- Posts: 3885
- Joined: 28 Dec 2010, 11:31
- Distribution: ⟰ Porteus current ☯ all DEs ☯
- Location: ☭ Russian Federation, Lipetsk region, Dankov
- Contact:
Re: Build an OFFICIAL installer
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.
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16