Skip to content

Commit

Permalink
owo
Browse files Browse the repository at this point in the history
  • Loading branch information
aubreyrs committed Aug 15, 2024
1 parent 4467848 commit 7b24cb1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 84 deletions.
89 changes: 6 additions & 83 deletions ISO/pixie.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Preset isAutoSaved="true" xmlns="urn:schemas-nliteos-com:pn.v1">
<Date>08/15/2024 16:04:55</Date>
<Date>08/15/2024 17:29:01</Date>
<AppInfo>
<Version>2024.8.10014</Version>
<Licensed>No</Licensed>
Expand All @@ -9,7 +9,7 @@
</AppInfo>
<ImageInfo>
<Version mode="offline">Windows 11 Professional 24H2 x64 - 10.0.26100.1 (en-GB)</Version>
<GUID>{0900BC2F-231F-42DA-B79E-C33C53DD09F9}</GUID>
<GUID>{974B85AE-B435-4B3F-A326-0609CB692EBB}</GUID>
</ImageInfo>
<RemoveComponents AppRemovalMode="DISM"></RemoveComponents>
<Compatibility protectHidden="false">
Expand Down Expand Up @@ -66,10 +66,7 @@
<Machine enabled="no">VMware VM</Machine>
</MachineDrivers>
</Compatibility>
<Features>
<Feature name="VirtualMachinePlatform">true</Feature>
<Feature name="HypervisorPlatform">true</Feature>
</Features>
<Features></Features>
<Packages>
<Options>
<CleanHotfixedLeftovers>0</CleanHotfixedLeftovers>
Expand All @@ -89,63 +86,14 @@
<ShowHidden>false</ShowHidden>
</Options>
</Drivers>
<Unattended mode="1">
<Unattended mode="0">
<AnswerFileLocationPanther>false</AnswerFileLocationPanther>
<AnswerFileLocationBoot>false</AnswerFileLocationBoot>
<SaveBothArch>false</SaveBothArch>
<EditionPrompt>false</EditionPrompt>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core">
<InputLocale>0809:00000809</InputLocale>
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-GB</UILanguage>
<UILanguageFallback>en-GB</UILanguageFallback>
<UserLocale>en-GB</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup">
<TimeZone>GMT Standard Time</TimeZone>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<ProtectYourPC>3</ProtectYourPC>
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount>
<DisplayName>Aubrey</DisplayName>
<Group>Administrators</Group>
<Name>aubrey</Name>
<Password>
<PlainText>false</PlainText>
<Value>MwAxADMAMQBQAGEAcwBzAHcAbwByAGQA</Value>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup">
<ComputerName>pixie</ComputerName>
</component>
</settings>
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE">
<InputLocale>0809:00000809</InputLocale>
<SystemLocale>en-GB</SystemLocale>
<UILanguage>en-GB</UILanguage>
<UILanguageFallback>en-GB</UILanguageFallback>
<UserLocale>en-GB</UserLocale>
</component>
<component name="Microsoft-Windows-Setup">
<Diagnostics>
<OptIn>false</OptIn>
</Diagnostics>
<DynamicUpdate>
<Enable>false</Enable>
<WillShowUI>OnError</WillShowUI>
</DynamicUpdate>
<ImageInstall>
Expand All @@ -160,8 +108,6 @@
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>aubrey</FullName>
<ProductKey>
<Key></Key>
</ProductKey>
Expand All @@ -171,32 +117,9 @@
</Unattended>
<Tweaks>
<Settings>
<TweakGroup name="EventLogs">
<Tweak name="Microsoft-Windows-DeviceUpdateAgent\Operational\Enabled">0</Tweak>
<Tweak name="Microsoft-Windows-WindowsUpdateClient\Operational\Enabled">0</Tweak>
</TweakGroup>
<TweakGroup name="WindowsUpdateTasks">
<Tweak name="CrossDeviceUpdate\CrossDeviceUpdate">0</Tweak>
<Tweak name="DevHomeUpdate\DevHomeUpdate">0</Tweak>
<Tweak name="EdgeUpdate\EdgeUpdate">0</Tweak>
<Tweak name="OutlookUpdate\OutlookUpdate">0</Tweak>
<Tweak name="TFLUpdate\TFLUpdate">0</Tweak>
</TweakGroup>
<TweakGroup name="WindowsUpdate">
<Tweak name="DriverSearching\SearchOrderConfig">0</Tweak>
<Tweak name="Preferences\ModelDownloadAllowed">0</Tweak>
<Tweak name="Device Metadata\PreventDeviceMetadataFromNetwork">1</Tweak>
<Tweak name="Settings\AllowAutoWindowsUpdateDownloadOverMeteredNetwork">0</Tweak>
<Tweak name="WindowsUpdate\DisableWUfBSafeguards">1</Tweak>
<Tweak name="Settings\IsContinuousInnovationOptedIn">0</Tweak>
<Tweak name="7971f918-a847-4430-9279-4a52d1efe18d\RegisterWithAU">0</Tweak>
<Tweak name="WindowsUpdate\ExcludeWUDriversInQualityUpdate">1</Tweak>
<Tweak name="MRT\DontOfferThroughWUAU">1</Tweak>
<Tweak name="Settings\HideMCTLink">1</Tweak>
<Tweak name="Settings\IsExpedited">0</Tweak>
<Tweak name="WindowsStore\AutoDownload">0</Tweak>
<Tweak name="AU\NoAutoUpdate">1</Tweak>
<Tweak name="AU\AUOptions">2</Tweak>
<Tweak name="DriverSearching\SearchOrderConfig">1</Tweak>
<Tweak name="AU\NoAutoUpdate">-1</Tweak>
</TweakGroup>
</Settings>
<Services></Services>
Expand Down
8 changes: 7 additions & 1 deletion Pixie/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,15 @@ func refreshenv() error {
}
logger.log("✅ Environment refreshed", false)
logger.Printf("[INFO] Updated PATH: %s", string(output))
os.Setenv("PATH", strings.TrimSpace(string(output)))

return nil
}

func choco() error {
logger.log("🍫 Checking Chocolatey installation...", false)

// Check if Chocolatey is already installed
cmd := exec.Command("where", "choco")
if err := cmd.Run(); err == nil {
logger.log("Chocolatey is already installed. Skipping installation.", false)
Expand All @@ -283,14 +287,16 @@ func choco() error {
logger.log(fmt.Sprintf("Failed to refresh environment after Chocolatey installation: %v", err), true)
}

cmd = exec.Command("choco", "--version")
chocoPath := `C:\ProgramData\chocolatey\bin\choco.exe`
cmd = exec.Command(chocoPath, "--version")
output, err = cmd.CombinedOutput()
if err != nil {
logger.Printf("[ERROR] Failed to verify Chocolatey installation: %v\nOutput: %s", err, string(output))
return fmt.Errorf("failed to verify Chocolatey installation: %w", err)
}

logger.log(fmt.Sprintf("✅ Chocolatey installed successfully. Version: %s", strings.TrimSpace(string(output))), false)
os.Setenv("PATH", os.Getenv("PATH")+";C:\\ProgramData\\chocolatey\\bin")

return nil
}
Expand Down

0 comments on commit 7b24cb1

Please sign in to comment.