I tweaked my code. Try my a new version porteus2usb.exe
Thanks for your sugession

hm, XP does not have UAC and my software all the same should work for you.Hamza wrote:Your software is not compatible with XP.
My algorithm is contains it (look at my old share code).Hamza wrote:Could you add a function for detect the REG Key of UAC in regedit?
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 a command line interpreter.' & @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 porteus2usb.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\scripts\bootinst.bat") Then
Run($aDrives[$i] & "\boot\scripts\bootinst.bat")
ExitLoop
EndIf
Next
Else
Exit
EndIf
Please , Don't abandone your installer , the community will see the best installer , and maybe , you can help Blaze with your knowledge.I would like to state that I will not be building the Porteus installer. Yes, it is half-built, but I see that there are several other versions that are coming up. The installer that Blaze has written, seeing that it is honestly good, after giving him a UAC tip, works very well. Therefore, I cannot see why the installer which Blaze has written cannot be the official installer. To be honest, my version would run a GUI program "Preflight", which would notify the user, then turn on the Administrator account. Then, one would run a GUI installer, which would then call for Command Prompt to run as Administrator in the background, and install Porteus normally. Blaze has solved this problem in a much more efficient way by directly dealing with UAC. I commend him for his excellent work, and I think that he will release the official installer! I can see at this point whose installer is the best out of the two. Thank you, everyone, for your patience and understanding. Go Porteus!
What do you mean about DOCS function?fanthom wrote:i'm wonder if you could add functionality of checking the DOCS to your installer same as it's present in brokenman's one.
Ok. What do you think about name: "port2flash" ?fanthom wrote:"porteus2usb" script exist already so another name could be chosen.