- Local time
- 11:47 AM
- Posts
- 46
- Location
- Glaschu, Alba
- OS
- Win 10 LTSC + Win 11 Pro + Linux Mint + Debian KDE
I've used the schneegans.de website to create an unattended xml file.
Using VirtualBox to test it, everything works ok until I get to the bit where I'm trying to automatically install 3 programs at first logon as a test. All that happens is, the first program in the list installs, but I have to click the 'ok' button for it to install. Changing the order of the programs makes no difference. The next two programs dont install.
Code I'm using here:
I've created a Powershell script that installs as many programs as I want, but it would be good if I could get this to work in the autounattend.xml file instead.
Anyone any pointers?
Thanks in advance.
Using VirtualBox to test it, everything works ok until I get to the bit where I'm trying to automatically install 3 programs at first logon as a test. All that happens is, the first program in the list installs, but I have to click the 'ok' button for it to install. Changing the order of the programs makes no difference. The next two programs dont install.
Code I'm using here:
<File path="C:\Windows\Setup\Scripts\unattend-03.ps1">
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath '7z*-x64.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\7-Zip"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath 'npp*x64.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\Notepad++"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath 'OpenShellSetup*.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\Open-Shell"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
</File>
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath '7z*-x64.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\7-Zip"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath 'npp*x64.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\Notepad++"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
foreach( $drive in [System.IO.DriveInfo]::GetDrives() ) {
if( $found = Join-Path -Path $drive.RootDirectory -ChildPath 'OpenShellSetup*.exe' -Resolve -ErrorAction 'SilentlyContinue' ) {
Start-Process -FilePath $found -ArgumentList '/S /D="C:\Program Files\Open-Shell"' -Wait;
return;
}
}
'Cannot find any files that match pattern.' | Write-Warning;
</File>
I've created a Powershell script that installs as many programs as I want, but it would be good if I could get this to work in the autounattend.xml file instead.
Anyone any pointers?
Thanks in advance.
My Computer
System One
-
- OS
- Win 10 LTSC + Win 11 Pro + Linux Mint + Debian KDE
- Computer type
- PC/Desktop
- Manufacturer/Model
- Self built
- CPU
- Intel i5-13600K
- Motherboard
- ASRock Z790 PG Riptide
- Memory
- Corsair VENGEANCE 64GB (2 x 32GB) DDR5 6000MHz
- Graphics Card(s)
- Radeon RX 9070 16GB
- Sound Card
- Creative AE-5X
- Monitor(s) Displays
- HP 24" 1080p
- Screen Resolution
- 1920 x 1080
- Hard Drives
- • Boot drive (Windows) - Kingston FURY 2TB Renegade PCIe 4.0 NVMe M.2
• Boot drive (Linux) - WD BLACK 1TB SN770 M.2 2280 Gen4 NVMe
• Data drive - Crucial BX500 2TB SATA SSD
• Games drive - Crucial BX500 2TB SATA SSD
• VMs drive - Crucial MX500 1TB SSD
• Back-up (internal) - Seagate 4TB HDD
• Back-up (external) - Seagate 8TB HDD
- PSU
- Corsair RM850 850 Watt 80 Plus Gold Fully Modular ATX PSU
- Case
- Fractal Design Define 7 XL Full-Tower
- Cooling
- • CPU cooler - Scythe FUMA 2 Rev B • 7 x 140mm case fans: 3 x PWM + 4 x non-PWM
- Keyboard
- Microsoft Wired Keyboard 600
- Mouse
- Dell MOCZUL 6-Button 400-1600 DPI
- Browser
- Firefox




