Re: Install on Vista or 7
Posted: 25 Apr 2011, 21:12
I will write a shell installer (similar to Migration Tool)
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 UAC. This may put your computer at risk.' & @CR & 'It necessary for install Porteus to a flah drive.' & @CR & '' & @CR & 'Note!' & @CR & '' & @CR & 'If UAC is active, your system will be rebooted for disable it.' & @CR & 'If is not, to you it will be accessible Porteus Winstaller.' & @CR & '' & @CR & 'When you have installed Porteus on your usb flash you can active UAC manually. 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 was disabled.' & @CR & 'Your OS will reboot.' & @CR & 'After reboot run the winstaller.exe installer again and follow instruction.', 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'm very bad in Visual Basic. I need help. Download and test it.Sub DisableUAC
CreateObject("WScript.Shell").Run "boot\tools\winstaller.exe"
End Sub
Please report about my mistakes (sorry about my english ) and i fix it.UAC.exe must have english lang fixed before FINAL.