Compare commits

...

35 Commits

Author SHA1 Message Date
Kroese 69951d9341
Update readme.md 2024-04-28 12:53:36 +02:00
Kroese dc106f0957
Update winvistax64.xml 2024-04-28 12:40:45 +02:00
Kroese 27d92f440c
Update win81x64.xml 2024-04-28 12:40:20 +02:00
Kroese 55dedde013
Update win81x64-enterprise-eval.xml 2024-04-28 12:39:54 +02:00
Kroese 11cd0244bc
Update win7x64.xml 2024-04-28 12:39:26 +02:00
Kroese a72f273325
Update win2022-eval.xml 2024-04-28 12:39:07 +02:00
Kroese 83c52f1823
Update win2019-eval.xml 2024-04-28 12:38:49 +02:00
Kroese 312772e34a
Update win2016-eval.xml 2024-04-28 12:38:32 +02:00
Kroese ed2a580229
Update win2012r2-eval.xml 2024-04-28 12:38:13 +02:00
Kroese 1f34f8d204
Update win2008r2.xml 2024-04-28 12:37:52 +02:00
Kroese a49e0b88fa
Update win11x64.xml 2024-04-28 12:37:19 +02:00
Kroese 1099481bf1
Update win11x64-enterprise-eval.xml 2024-04-28 12:36:55 +02:00
Kroese 883cc87309
Update win10x64.xml 2024-04-28 12:36:31 +02:00
Kroese e3a75d2d7a
Update win10x64-ltsc.xml 2024-04-28 12:36:13 +02:00
Kroese 26979749df
Update win10x64-iot.xml 2024-04-28 12:35:54 +02:00
Kroese 593c356180
Update win10x64-enterprise-eval.xml 2024-04-28 12:35:30 +02:00
Kroese 2b2bc907a1
Update install.sh 2024-04-28 12:27:25 +02:00
Kroese becd0fc315
Update win11x64.xml 2024-04-28 12:20:17 +02:00
Kroese b75f7911f1
Update win11x64-enterprise-eval.xml 2024-04-28 12:19:18 +02:00
Kroese 312f855199
Update win10x64.xml 2024-04-28 12:18:37 +02:00
Kroese ddfc414816
Update win10x64-ltsc.xml 2024-04-28 12:18:18 +02:00
Kroese e592bda4df
Update win10x64-iot.xml 2024-04-28 12:18:00 +02:00
Kroese 8fbdb17c07
Update win10x64-enterprise-eval.xml 2024-04-28 12:17:41 +02:00
Kroese 8fbbc8af96
Update win11x64.xml 2024-04-28 12:13:33 +02:00
Kroese 6f9f1341cf
Update win11x64-enterprise-eval.xml 2024-04-28 12:12:46 +02:00
Kroese 95b1b25c16
Update win10x64.xml 2024-04-28 12:12:09 +02:00
Kroese bca7c75f07
Update win10x64-ltsc.xml 2024-04-28 12:11:49 +02:00
Kroese aac0dd3318
Update win10x64-iot.xml 2024-04-28 12:11:32 +02:00
Kroese 6bfc1364c5
Update win10x64-enterprise-eval.xml 2024-04-28 12:11:13 +02:00
Kroese 0028eda4f2
docs: Custom script 2024-04-28 12:05:21 +02:00
Kroese d5baa1d0dd
Update win11x64.xml 2024-04-28 11:32:32 +02:00
Kroese 8c9840dfdc
Update install.sh 2024-04-28 11:24:53 +02:00
Kroese fc83e5aed6
Update install.sh 2024-04-28 11:18:53 +02:00
Kroese b45f33323a
fix: Use Windows OEM folder 2024-04-28 11:10:48 +02:00
hellodword 57704f2fc0
feat: automatically execute /storage/shared/FirstLogonCommands/install.bat 2024-04-28 03:34:40 +00:00
17 changed files with 120 additions and 3 deletions

View File

@ -462,6 +462,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -470,6 +470,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -468,6 +468,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -464,6 +464,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -485,6 +485,11 @@
<CommandLine>reg.exe add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v SV2 /d 0 /t REG_DWORD /f</CommandLine>
<Description>Disable unsupported hardware notifications</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>24</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -487,6 +487,11 @@
<CommandLine>reg.exe add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v SV2 /d 0 /t REG_DWORD /f</CommandLine>
<Description>Disable unsupported hardware notifications</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>24</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -302,6 +302,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>17</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -341,6 +341,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>17</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -371,6 +371,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -375,6 +375,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -375,6 +375,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>23</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -305,6 +305,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>17</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -326,6 +326,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>17</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -335,6 +335,11 @@
<CommandLine>netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes</CommandLine>
<Description>Enable File Sharing</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>17</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -259,6 +259,11 @@
<CommandLine>reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v "fAllowUnlistedRemotePrograms" /t REG_DWORD /d 1 /f</CommandLine>
<Description>Enable RemoteAPP to launch unlisted programs</Description>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>20</Order>
<CommandLine>cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat"</CommandLine>
<Description>Execute custom script from the OEM folder if exists</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>

View File

@ -168,9 +168,7 @@ docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_
* ### How do I customize the installation?
You can customize any part of the automatic installation, and even execute certain commands at boot if needed.
Download the XML file corresponding to your Windows version, for example [win11x64.xml](https://raw.githubusercontent.com/dockur/windows/master/assets/win11x64.xml). Then apply your modifications to it, and add this line to your compose file:
You can customize every setting used by the automatic installation. Download the XML file corresponding to your Windows version, for example [win11x64.xml](https://raw.githubusercontent.com/dockur/windows/master/assets/win11x64.xml). Then apply your modifications to it, and add this line to your compose file:
```yaml
volumes:
@ -179,6 +177,17 @@ docker run -it --rm --name windows -p 8006:8006 --device=/dev/kvm --cap-add NET_
Replace the example path `/home/user/custom.xml` with the filename of the modified XML file.
* ### How do I run a script after installation?
To run your own script after installation, you can create a file called `install.bat` and place it in a folder together with other files it needs (programs to install for example). Then bind it in your compose file like this:
```yaml
volumes:
- /home/user/example:/storage/oem
```
The example path `/home/user/example` will be copied to `C:\OEM` during installation and the containing `install.bat` will be executed.
* ### How do I perform a manual installation?
It's best to use the automatic installation, as it optimizes various settings for use with this container. These tweaks will give you maximum performance and prevent common issues.

View File

@ -1077,6 +1077,35 @@ updateImage() {
return 0
}
copyOEM() {
local dir="$1"
local folder="$STORAGE/oem"
local src
[ ! -d "$folder" ] && folder="$STORAGE/OEM"
[ ! -d "$folder" ] && folder="$STORAGE/shared/oem"
[ ! -d "$folder" ] && folder="$STORAGE/shared/OEM"
[ ! -d "$folder" ] && return 0
local msg="Copying OEM folder to image..."
info "$msg" && html "$msg"
src=$(find "$dir" -maxdepth 1 -type d -iname sources | head -n 1)
if [ ! -d "$src" ]; then
error "failed to locate 'sources' folder in ISO image!" && return 1
fi
local dest="$src/\$OEM\$/\$1/"
mkdir -p "$dest"
if ! cp -r "$folder" "$dest"; then
error "Failed to copy OEM folder!" && return 1
fi
return 0
}
buildImage() {
local dir="$1"
@ -1231,6 +1260,10 @@ if ! rm -f "$ISO" 2> /dev/null; then
rm -f "$ISO"
fi
if ! copyOEM "$DIR"; then
exit 63
fi
if ! buildImage "$DIR"; then
exit 65
fi