mirror of
https://github.com/PhoenixPE/PhoenixPE.git
synced 2025-09-16 18:18:04 +02:00
fixed bug in FIDO ISO download, auto select Win 10 Pro image if available
This commit is contained in:
@@ -157,28 +157,40 @@ End
|
||||
If,%cmb_BaseWim%,Equal,"Boot.wim",Begin
|
||||
// Get the number of images in the wim file.
|
||||
WimInfo,%SourceBaseWim%,0,ImageCount,%imgCount%
|
||||
Set,%indexList%,""
|
||||
Set,%imgIndexList%,""
|
||||
Set,%imgNameList%,""
|
||||
// Loop through each image and get the information.
|
||||
Loop,%ScriptFile%,GetImgInfo_Loop,1,%imgCount%,%SourceBaseWim%
|
||||
StrFormat,LTrim,%indexList%,1,%indexList%
|
||||
// Populate cmb_SrcBaseImage
|
||||
WriteInterface,Items,%ScriptFile%,Interface,cmb_SrcBaseImage,%imgIndexList%
|
||||
// Select the highest number image as the default.
|
||||
List,Count,%indexList%,%splitCount%
|
||||
StrFormat,Split,%indexList%,|,%splitCount%,%indexSelected%
|
||||
WriteInterface,Items,%ScriptFile%,Interface,cmb_SrcBaseImage,%indexList%
|
||||
List,Count,%imgIndexList%,%SrcBaseImageCount%
|
||||
List,Get,%imgIndexList%,%SrcBaseImageCount%,%indexSelected%
|
||||
WriteInterface,Value,%ScriptFile%,Interface,cmb_SrcBaseImage,%indexSelected%
|
||||
End
|
||||
|
||||
// Install.wim
|
||||
// Get the number of images in the wim file.
|
||||
WimInfo,%SourceInstallWim%,0,ImageCount,%imgCount%
|
||||
Set,%indexList%,""
|
||||
Set,%imgIndexList%,""
|
||||
Set,%imgNameList%,""
|
||||
|
||||
// Loop through each image and get the information.
|
||||
Loop,%ScriptFile%,GetImgInfo_Loop,1,%imgCount%,%SourceInstallWim%
|
||||
// Select the highest number image as the default.
|
||||
List,Count,%indexList%,%splitCount%
|
||||
StrFormat,Split,%indexList%,|,%splitCount%,%indexSelected%
|
||||
WriteInterface,Items,%ScriptFile%,Interface,cmb_SrcInstallImage,%indexList%
|
||||
|
||||
// Populate cmb_SrcInstallImage
|
||||
WriteInterface,Items,%ScriptFile%,Interface,cmb_SrcInstallImage,%imgIndexList%
|
||||
|
||||
// Select the Windows 10 Pro image as default.
|
||||
List,Pos,%imgNameList%,"Windows 10 Pro",%ProPos%
|
||||
If,%ProPos%,Equal,0,Begin
|
||||
// Could not find Windows 10 Pro index. Just select the highest numbered image.
|
||||
List,Count,%imgIndexList%,%SrcInstallImageCount%
|
||||
List,Get,%imgIndexList%,%SrcInstallImageCount%,%indexSelected%
|
||||
End
|
||||
Else,List,Get,%imgIndexList%,%ProPos%,%indexSelected%
|
||||
WriteInterface,Value,%ScriptFile%,Interface,cmb_SrcInstallImage,%indexSelected%
|
||||
|
||||
// Populate ImgInfo for the selected image
|
||||
Run,%ScriptFile%,GetSourceWimImage
|
||||
|
||||
@@ -202,7 +214,10 @@ System,Cursor,Normal
|
||||
// %imgArch% - Arch (x86/x64)
|
||||
// %imgLang% - Default Language
|
||||
// %imgName% - Image Name
|
||||
// %indexList% - String containing a pipe separated list of all images in <WimFile> formatted for use in cmb_SrcBaseImage and cmb_SrcInstallImage
|
||||
// %imgIndexList% - String containing a pipe delimited list of all images in <WimFile> formatted for use in
|
||||
// cmb_SrcBaseImage and cmb_SrcInstallImage (Index - Name).
|
||||
// %imgNameList - String containing a pipe delimited list of names for all images in <WimFile>
|
||||
// Useful for selecting a specific/default image name.
|
||||
// Author.........: Homes32
|
||||
// Remarks........:
|
||||
// Related........:
|
||||
@@ -230,7 +245,8 @@ StrFormat,CTrim,%imgFallbackLang%,|,%imgFallbackLang%
|
||||
If,%imgArch%,Equal,0,Set,%imgArch%,"x86"
|
||||
Else,Set,%imgArch%,"x64"
|
||||
|
||||
List,Append,%indexList%,"#c - %imgName%"
|
||||
List,Append,%imgIndexList%,"#c - %imgName%"
|
||||
List,Append,%imgNameList%,"%imgName%"
|
||||
|
||||
[#GetSourceWimImage#]
|
||||
// ===============================================================================================================================
|
||||
@@ -295,7 +311,7 @@ Set,%imgTemp%,Nil
|
||||
[DownloadWithFido]
|
||||
Set,%FidoURL%,"https://github.com/pbatard/Fido/releases/latest/download/Fido.ps1.lzma"
|
||||
If,QUESTION,"This option will download and run the open source Fido powershell script which will allow you to choose which ISO images to download from Microsoft's servers.#$x#$xFor more info please visit [https://github.com/pbatard/Fido].#$x#$xAre you sure you want to continue?",Begin
|
||||
WebGet,%FidoURL%,%ProjectTemp%
|
||||
WebGet,%FidoURL%,"%ProjectTemp%\Fido.ps1.lzma"
|
||||
7z,"x -y #$q%ProjectTemp%\Fido.ps1.lzma#$q -o#$q%ProjectTemp%#$q"
|
||||
ShellExecuteEx,Open,"powershell.exe","-noexit –ExecutionPolicy Bypass & #$q%ProjectTemp%\Fido.ps1#$q"
|
||||
End
|
||||
@@ -432,7 +448,7 @@ bvl_Homepage=bvl_Homepage,1,12,302,5,121,25
|
||||
web_TechBench="Techbench ISO Images",1,10,309,9,113,18,https://tb.rg-adguard.net/public.php
|
||||
bvl_ImageCfg="Configure Source Image",1,12,5,146,532,130,8,Bold
|
||||
lbl_BaseWim="Base Wim:",0,1,69,166,54,18,8,Normal
|
||||
cmb_BaseWim=WinRE.wim,0,4,130,162,100,21,Boot.wim,WinRE.wim,_SaveSource_,False
|
||||
cmb_BaseWim=Boot.wim,0,4,130,162,100,21,Boot.wim,WinRE.wim,_SaveSource_,False
|
||||
lbl_SrcBaseImg="'Base' Image:",1,1,56,193,92,18,8,Normal
|
||||
cmb_SrcBaseImage="[Please select a valid source]",1,4,130,188,395,21,"[Please select a valid source]",_UpdateBaseWimLabel_,True
|
||||
lbl_SrcInstallImage="'install.wim' Image:",1,1,29,221,94,18,8,Normal
|
||||
|
@@ -35,8 +35,8 @@ Author=Homes32
|
||||
Level=5
|
||||
Selected=False
|
||||
Mandatory=False
|
||||
Version=1.0.0.0
|
||||
Date=2020-03-31
|
||||
Version=1.1.0.0
|
||||
Date=2021-03-22
|
||||
Interface=Interface
|
||||
|
||||
[Variables]
|
||||
@@ -103,17 +103,18 @@ IniWrite,"%TargetPrograms%\%ProgramFolder%\BackupRecovery.ini","BackupSetting","
|
||||
IniWrite,"%TargetPrograms%\%ProgramFolder%\other.ini","UserExperience","ExperienceValue",0
|
||||
|
||||
// Product Registration
|
||||
If,%HostArch%,Equal,x86,Set,%WOW6432Node%,""
|
||||
Else,Set,%WOW6432Node%,"WOW6432Node\"
|
||||
|
||||
If,%cmb_RegEdition%,Equal,"Standard",RegWrite,HKLM,0x3,"Tmp_Software\Microsoft\Windows\CurrentVersion","ProgramData",08,77,2f,f2,ca,c7,37,a1,1e,e2,3e,e2,ef,7b,18,b5,1d,d3,4d,d2,1c,9b,19,92,31,93,64,f6,5a,f0,61,92,2c,85,3f,80,56,eb,1b,ee,2a,97,9e,a4,89,a9,b5,51,b2,88,c8,df,d1,df,64,a9,21,d1,a1,b5,85,b9,71,d4,5c,41,8a,26,8e,45,01,2b,16,6a,b6,62,c6,6d,46,6e,15,5b
|
||||
Else,If,%cmb_RegEdition%,Equal,"Import License From Host",Begin
|
||||
If,%HostArch%,Equal,x86,Set,%WOW6432Node%,""
|
||||
Else,Set,%WOW6432Node%,"Wow6432Node\"
|
||||
RegRead,HKLM,"Software\%WOW6432Node%Microsoft\Windows\CurrentVersion","ProgramData",%Host_LicKey%
|
||||
If,%Host_LicKey%,Equal,"",Halt,"ERROR: Could not retrieve license key from host system."
|
||||
Else,RegWrite,HKLM,0x3,"Tmp_Software\%WOW6432Node%Microsoft\Windows\CurrentVersion","ProgramData",%Host_LicKey%
|
||||
Else,RegWrite,HKLM,0x3,"Tmp_Software\Microsoft\Windows\CurrentVersion","ProgramData",%Host_LicKey%
|
||||
End
|
||||
Else,Begin
|
||||
If,%txt_LicKey%,Equal,"",Halt,"ERROR: You must enter a license key."
|
||||
Else,RegWrite,HKLM,0x3,"Tmp_Software\%WOW6432Node%Microsoft\Windows\CurrentVersion","ProgramData",%txt_LicKey%
|
||||
Else,RegWrite,HKLM,0x3,"Tmp_Software\Microsoft\Windows\CurrentVersion","ProgramData",%txt_LicKey%
|
||||
End
|
||||
|
||||
IniWrite,"%TargetPrograms%\%ProgramFolder%\Version.ini","VersionInfo","versionCode",2
|
||||
@@ -293,7 +294,7 @@ lbl_Language=Language,1,1,159,110,153,16,8,Normal
|
||||
cmb_Language="English [en]",1,4,160,126,150,21,"Chinese (Traditional) [zh-TW]","Chinese (Simplified) [zh-CN]","Dutch (Belgium) [nl-be]","Dutch (Netherlands) [nl]","English [en]","French [fr]","German [de]","Italian [it]","Japanese [jp]","Portuguese (Brazil) [pt]","Spanish [es]","Turkish [tr]"
|
||||
lbl_RegEdition="Software Edition",1,1,160,185,153,16,8,Normal
|
||||
cmb_RegEdition=Standard,1,4,160,200,174,21,Standard,"Import License From Host","Enter License Key",_ToggleRegKey_,True
|
||||
txt_LicKey="License Key",0,0,160,243,174,21,,"__Enter your license key in HEX. You can export the value from: HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\ProgramData"
|
||||
txt_LicKey="License Key",0,0,160,243,174,21,,"__Enter your license key in HEX.#$xYou can export the value from: HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion, ProgramData"
|
||||
|
||||
[InterfaceEncoded]
|
||||
Trash.ico=1150,1212
|
||||
|
Reference in New Issue
Block a user