Skip to content
This repository was archived by the owner on Dec 10, 2018. It is now read-only.

Commit 308b567

Browse files
committed
Backported previous changes to the volume label
1 parent 790e264 commit 308b567

1 file changed

Lines changed: 29 additions & 35 deletions

File tree

bin/ESDDecrypter.ps1

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,8 @@ function Get-InfosFromESD(
596596
remove-item lang.ini -force
597597

598598
$tag = 'ir3'
599-
599+
$DVD = 'DV9'
600+
600601
if ($WIMInfo[4].Architecture -eq 'x86') {
601602
$arch = 'x86'
602603
}
@@ -615,43 +616,36 @@ function Get-InfosFromESD(
615616
$tag = 'ir6'
616617
}
617618

618-
$DVDLabel = ($tag+'_CCSA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()
619-
if ($WIMInfo.header.ImageCount -eq 4) {
620-
if ($WIMInfo[4].EditionID -eq 'Core') {$DVDLabel = ($tag+'_CCRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
621-
if ($WIMInfo[4].EditionID -eq 'CoreN') {$DVDLabel = ($tag+'_CCRNA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
622-
if ($WIMInfo[4].EditionID -eq 'CoreSingleLanguage') {$DVDLabel = ($tag+'_CSLA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
623-
if ($WIMInfo[4].EditionID -eq 'CoreCountrySpecific') {$DVDLabel = ($tag+'_CCHA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
624-
if ($WIMInfo[4].EditionID -eq 'Professional') {$DVDLabel = ($tag+'_CPRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
625-
if ($WIMInfo[4].EditionID -eq 'ProfessionalN') {$DVDLabel = ($tag+'_CPRNA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
626-
if ($WIMInfo[4].EditionID -eq 'ProfessionalWMC') {$DVDLabel = ($tag+'_CPWMCA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
627-
if ($WIMInfo[4].EditionID -eq 'CoreConnected') {$DVDLabel = ($tag+'_CCONA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
628-
if ($WIMInfo[4].EditionID -eq 'CoreConnectedN') {$DVDLabel = ($tag+'_CCONNA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
629-
if ($WIMInfo[4].EditionID -eq 'CoreConnectedSingleLanguage') {$DVDLabel = ($tag+'_CCSLA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
630-
if ($WIMInfo[4].EditionID -eq 'CoreConnectedCountrySpecific') {$DVDLabel = ($tag+'_CCCHA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
631-
if ($WIMInfo[4].EditionID -eq 'ProfessionalStudent') {$DVDLabel = ($tag+'_CPRSA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
632-
if ($WIMInfo[4].EditionID -eq 'ProfessionalStudentN') {$DVDLabel = ($tag+'_CPRSNA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV9').ToUpper()}
633-
}
634-
635619
if ([int] $WIMInfo[4].Build -gt '9600') {
636-
$DVDLabel = ('JM1_CCSA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()
637-
if ($WIMInfo.header.ImageCount -eq 4) {
638-
if ($WIMInfo[4].EditionID -eq 'Core') {$DVDLabel = ('JM1_CCRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
639-
if ($WIMInfo[4].EditionID -eq 'CoreSingleLanguage') {$DVDLabel = ('JM1_CSLA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
640-
if ($WIMInfo[4].EditionID -eq 'CoreCountrySpecific') {$DVDLabel = ('JM1_CCHA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
641-
if ($WIMInfo[4].EditionID -eq 'Professional') {$DVDLabel = ('JM1_CPRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
642-
if ($WIMInfo[4].EditionID -eq 'Enterprise') {$DVDLabel = ('JM1_CENA_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
643-
}
620+
$tag = 'JM1'
621+
$DVD = 'DV5'
644622
}
645-
646623
if ([int] $WIMInfo[4].Build -ge '9896') {
647-
$DVDLabel = ('J_CCSA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()
648-
if ($WIMInfo.header.ImageCount -eq 4) {
649-
if ($WIMInfo[4].EditionID -eq 'Core') {$DVDLabel = ('J_CCRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
650-
if ($WIMInfo[4].EditionID -eq 'CoreSingleLanguage') {$DVDLabel = ('J_CSLA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
651-
if ($WIMInfo[4].EditionID -eq 'CoreCountrySpecific') {$DVDLabel = ('J_CCHA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
652-
if ($WIMInfo[4].EditionID -eq 'Professional') {$DVDLabel = ('J_CPRA_'+$arch+'FRER_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
653-
if ($WIMInfo[4].EditionID -eq 'Enterprise') {$DVDLabel = ('J_CENA_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_DV5').ToUpper()}
654-
}
624+
$tag = 'J'
625+
$DVD = 'DV5'
626+
}
627+
628+
$DVDLabel = ($tag+'_CCSA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()
629+
if ($WIMInfo.header.ImageCount -eq 4) {
630+
if ($WIMInfo[4].EditionID -eq 'Core') {$DVDLabel = ($tag+'_CCRA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
631+
if ($WIMInfo[4].EditionID -eq 'CoreConnected') {$DVDLabel = ($tag+'_CCONA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
632+
if ($WIMInfo[4].EditionID -eq 'CoreConnectedCountrySpecific') {$DVDLabel = ($tag+'_CCCHA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
633+
if ($WIMInfo[4].EditionID -eq 'CoreConnectedN') {$DVDLabel = ($tag+'_CCONNA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
634+
if ($WIMInfo[4].EditionID -eq 'CoreConnectedSingleLanguage') {$DVDLabel = ($tag+'_CCSLA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
635+
if ($WIMInfo[4].EditionID -eq 'CoreCountrySpecific') {$DVDLabel = ($tag+'_CCHA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
636+
if ($WIMInfo[4].EditionID -eq 'CoreN') {$DVDLabel = ($tag+'_CCRNA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
637+
if ($WIMInfo[4].EditionID -eq 'CoreSingleLanguage') {$DVDLabel = ($tag+'_CSLA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
638+
if ($WIMInfo[4].EditionID -eq 'Professional') {$DVDLabel = ($tag+'_CPRA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
639+
if ($WIMInfo[4].EditionID -eq 'ProfessionalN') {$DVDLabel = ($tag+'_CPRNA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
640+
if ($WIMInfo[4].EditionID -eq 'ProfessionalStudent') {$DVDLabel = ($tag+'_CPRSA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
641+
if ($WIMInfo[4].EditionID -eq 'ProfessionalStudentN') {$DVDLabel = ($tag+'_CPRSNA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
642+
if ($WIMInfo[4].EditionID -eq 'ProfessionalWMC') {$DVDLabel = ($tag+'_CPWMCA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
643+
if ($WIMInfo[4].EditionID -eq 'Education') {$DVDLabel = ($tag+'_CEDA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
644+
if ($WIMInfo[4].EditionID -eq 'EducationN') {$DVDLabel = ($tag+'_CEDNA_'+$arch+'FRE_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
645+
if ($WIMInfo[4].EditionID -eq 'Enterprise') {$DVDLabel = ($tag+'_CENA_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
646+
if ($WIMInfo[4].EditionID -eq 'EnterpriseN') {$DVDLabel = ($tag+'_CENNA_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
647+
if ($WIMInfo[4].EditionID -eq 'EnterpriseS') {$DVDLabel = ($tag+'_CES_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
648+
if ($WIMInfo[4].EditionID -eq 'EnterpriseSN') {$DVDLabel = ($tag+'_CESN_'+$arch+'FREV_'+$WIMInfo[4].DefaultLanguage+'_'+$DVD).ToUpper()}
655649
}
656650

657651
$result.VolumeLabel = $DVDLabel

0 commit comments

Comments
 (0)