diff --git a/files/grub.cfg b/files/grub.cfg index b1e4dba..19d95b1 100644 --- a/files/grub.cfg +++ b/files/grub.cfg @@ -20,6 +20,7 @@ menuentry "Tunic Automatic Linux Installer" { ls ls ($root) echo "ISO: ${root} ${iso_path}" + echo '' echo 'Loading Linux kernel...' linux (loop)/casper/vmlinuz file=/isodevice${tunic_dir}/preseed.cfg automatic-ubiquity boot=casper iso-scan/filename=${iso_path} nomodeset toram noprompt -- @@ -41,6 +42,7 @@ menuentry "Try out Linux without install" { ls ls ($root) echo "ISO: ${root} ${iso_path}" + echo '' echo 'Loading Linux kernel...' linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=${iso_path} nomodeset toram noprompt -- diff --git a/tunic.nsi b/tunic.nsi index 2200892..a6859e6 100644 --- a/tunic.nsi +++ b/tunic.nsi @@ -5,10 +5,16 @@ SilentInstall silent Unicode true Icon "files\tunic-logo.ico" +!include x64.nsh + Section "Tunic Linux Installer" SetOutPath "$TEMP\Tunic" file tunic.ps1 file /r files - ExecWait 'powershell.exe -executionpolicy bypass -nologo -inputformat none -noninteractive -WindowStyle Hidden -file tunic.ps1 hidden' + ${If} ${RunningX64} + ExecWait '$WINDIR\sysnative\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -nologo -inputformat none -noninteractive -WindowStyle Hidden -file tunic.ps1' + ${Else} + ExecWait 'powershell.exe -executionpolicy bypass -nologo -inputformat none -noninteractive -WindowStyle Hidden -file tunic.ps1' + ${EndIf} SectionEnd diff --git a/tunic.ps1 b/tunic.ps1 index ee3a13e..27a4d04 100644 --- a/tunic.ps1 +++ b/tunic.ps1 @@ -222,7 +222,7 @@ function downloadIso() { if ( -not (Test-Path "$iso_path") ) { $ciso = "Z:\Downloads\$iso_file" if ( Test-Path "$ciso" ) { - echo 'Cached.' + write-host 'Cached.' copy "$ciso" "$iso_path" } else { try { @@ -1149,17 +1149,15 @@ function hideConsole() { $consoleWin = [Console.Window]::GetConsoleWindow() - write-host "c = $consoleWin" - # https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow - [Console.Window]::ShowWindow($consoleWin, 6) + [void][Console.Window]::ShowWindow($consoleWin, 6) } function uninstall() { if( !([Security.Principal.WindowsPrincipal] ` [Security.Principal.WindowsIdentity]::GetCurrent() ` ).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) ) { - echo 'Must be an Administrator' + write-host 'Must be an Administrator' exit 1 } if( test-path("${global:tunic_dir}\bcd.id") ) {