Page 2 of 5

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 08:57
by Hamza
To maintain compatibility with kdialog, I *might* use zenity--but I'm not sure yet...
Sorry, but Zenity is not included by default in Porteus.

If you need anyhelp about the design. PM me.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 17:20
by agreimann
I just need to know if there's a week or so available... because to be honest, I have lot of things I must get done this coming week. I'm going to have to let the Porteus Installer take a backseat for a few days. I hope everyone understands. I will be using Windows for the work--but this means things will be more script-like in nature, but it will still remain true to what I said it should do--it will be GUI. I'm glad, then, that Porteus doesn't have zenity--this would not have been the best route anyway.

If I remember right, Slax did include kdialog, though, which is a port of gdialog to KDE. When I mentioned zenity, I meant zenity for Windows, but with no coretoools support in Windows (outside of the 300+ MB UNIX SDK from the MSDN website or cygwin), this would have failed miserably--as most conditions would have required headers or bash.

Also, for those concerned, source will be included, in keeping with the MIT license, or if so inclined, the GPL. The MIT license is more liberal than the GPL... but it's really up to fanthom what he wants to use in this case.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 17:36
by Hamza
No problem.

Waiting on the first installer.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 17:40
by Ahau
Yeah, I think you have a week. 32-bit doesn't have an RC1 candidate yet, and release of the final version will come after Slackware 13.37 (whenever they decide to drop final). We'll want to hurry this through some community testing, though, if it's going to make it in V1.0.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 20:40
by fanthom
@agreimann
yes - a week for sure... maybe 2 (i feel ready for 1.0 but need to wait on 32bits). let's say that next weekend we would like to get something for testing.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 20:42
by Hamza
I working on an installer for Windows , but still working on download function for download the last version available.

Re: Build an OFFICIAL installer

Posted: 22 Apr 2011, 23:25
by agreimann
Quick Update: I'm also still working on my installer... :)

Re: Build an OFFICIAL installer

Posted: 23 Apr 2011, 09:31
by Hamza

Re: Build an OFFICIAL installer

Posted: 23 Apr 2011, 18:46
by agreimann
Guys, I've quit on my version of the installer. See Install on "Install on Windows Vista and 7" for details to understand why.

Re: Build an OFFICIAL installer

Posted: 27 Apr 2011, 17:28
by fanthom
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.

Re: Build an OFFICIAL installer

Posted: 03 May 2011, 15:55
by Ahau
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:

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
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!

Re: Build an OFFICIAL installer

Posted: 03 May 2011, 20:10
by Blaze
hi Ahau,
better to have a program written with an option to re-activate UAC after installation
It's possible. My a new source code of UAC.exe:

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
Please, will check my English grammar (don't delete the tabulation in this source code). Thanks.
this does not apply to XP and earlier versions, correct?
You are right
this does not apply to XP and earlier versions

Re: Build an OFFICIAL installer

Posted: 03 May 2011, 20:32
by Ahau
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:

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
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!

Re: Build an OFFICIAL installer

Posted: 04 May 2011, 06:42
by Blaze
Does pressing "no" activate UAC?
exactly. This 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
Download UAC.exe

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>
Copy porteus.png Image to /docs/

Re: Build an OFFICIAL installer

Posted: 04 May 2011, 16:40
by fanthom
@Ahau, Blaze
great stuff guys - updated my snapshot with these files. will be ready for testing in 64bit rc2.