Sorry, but Zenity is not included by default in Porteus.To maintain compatibility with kdialog, I *might* use zenity--but I'm not sure yet...
If you need anyhelp about the design. PM me.
Sorry, but Zenity is not included by default in Porteus.To maintain compatibility with kdialog, I *might* use zenity--but I'm not sure yet...
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
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
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
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
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>