Install on Vista or 7

Here you can post about non-standard installation methods
(for example when using grub4dos).
User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Install on Vista or 7

Post#46 by Hamza » 25 Apr 2011, 21:12

I will write a shell installer (similar to Migration Tool)
NjVFQzY2Rg==

User avatar
Blaze
DEV Team
DEV Team
Posts: 1509
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Install on Vista or 7

Post#47 by Blaze » 26 Apr 2011, 10:41

fanthom, ok.
Try my a new version winstaller.rar (+ I tweaked the win_start_here.hta)

Source code:

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
Cheers
Linux porteus 4.13.3-porteus #1 SMP PREEMPT Sat Sep 23 18:22:13 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Install on Vista or 7

Post#48 by Hamza » 26 Apr 2011, 12:35

I see the source of your installer...

And , You have added an autorun function for start win_start.hta from /boot folder.

That's great , you have added a function for looks if win_start_here.hta exist before to run it.

You doing a great works!
NjVFQzY2Rg==

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Install on Vista or 7

Post#49 by fanthom » 27 Apr 2011, 10:46

@Blaze
yep - good job :)
anyway i would do it differently (just a suggestion)
1) user would start "win_start_here.hta" as normal which could check if user is running Vista/Win7, if yes then win_start_here.hta could call 'winstaller' placed in /boot/tools to disable UAC. is it possible?
Please add [Solved] to your thread title if the solution was found.

User avatar
Blaze
DEV Team
DEV Team
Posts: 1509
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Install on Vista or 7

Post#50 by Blaze » 27 Apr 2011, 14:18

fanthom, I think it's possible, but need to tweak win_start_here.hta
I try to tweak win_start_here.hta...
I have problem with run "boot\tools\winstaller.exe" on Visual Basic (look at blue line)
Sub DisableUAC
CreateObject("WScript.Shell").Run "boot\tools\winstaller.exe"
End Sub
I'm very bad in Visual Basic. I need help. Download and test it.
Linux porteus 4.13.3-porteus #1 SMP PREEMPT Sat Sep 23 18:22:13 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
fanthom
Site Admin
Site Admin
Posts: 4621
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Install on Vista or 7

Post#51 by fanthom » 27 Apr 2011, 16:36

@Blaze
thats because path is wrong:
"CreateObject("WScript.Shell").Run "boot\tools\winstaller.exe""
should be:
"CreateObject("WScript.Shell").Run "tools\winstaller.exe""

i have re based whole /boot folder and tweaked all scripts. /boot looks more tidy now. need to ask Ahau to fix docs. give me a while and i will publish new version of /boot folder with syslinux-4.04.

it's getting really off topic here, let's move back to Development thread:
viewtopic.php?f=53&t=429&start=20
Please add [Solved] to your thread title if the solution was found.

User avatar
Blaze
DEV Team
DEV Team
Posts: 1509
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: Install on Vista or 7

Post#52 by Blaze » 27 Apr 2011, 20:36

fanthom, you are right :)
I some tweaked my installer for this. Try this variant.
UAC.exe must have english lang fixed before FINAL.
Please report about my mistakes (sorry about my english :oops:) and i fix it.
Cheers ;)
Linux porteus 4.13.3-porteus #1 SMP PREEMPT Sat Sep 23 18:22:13 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Post Reply