All posts by iiidefix

How to insert hotfixes and drivers and then create a bootable Windows Setup DVD

  • Create local folders c:\temp\src, c:\temp\mount, c:\temp\winremount, c:\temp\hotfix, and c:\temp\drivers.
  • Copy the setup sources from the DVD or a mounted ISO to C:\temp\src.
  • Copy the hotfix (.msu or .cab files) to C:\temp\hotfix.
  • Copy the driver files to c:\temp\drivers.
  • Run Command Prompt as an administrative.
dism /Mount-Wim /WimFile:c:\temp\src\sources\boot.wim /Index:1 /MountDir:c:\temp\mount
dism /Image:C:\temp\mount /Add-Package /PackagePath:c:\temp\hotfix
dism /Image:C:\temp\mount /Add-Driver /Driver:c:\temp\drivers /Recurse
dism /Unmount-Wim /MountDir:C:\temp\mount /Commit
dism /Mount-Wim /WimFile:c:\temp\src\sources\boot.wim /Index:2 /MountDir:c:\temp\mount
dism /Image:C:\temp\mount /Add-Package /PackagePath:c:\temp\hotfix
dism /Image:C:\temp\mount /Add-Driver /Driver:c:\temp\drivers /Recurse
  • Manually sort the folder C:\temp\mount\sources by date, and then copy the updated files to c:\temp\src\sources.
dism /Unmount-Wim /MountDir:C:\temp\mount /commit
  • Obtain the index from the Install.wim information by running the following command, and then check every index to see how many indexes have to be updated.
dism /Get-WimInfo /WimFile:c:\temp\src\sources\install.wim
  • Insert the hotfixes and drivers to install.wim and winre.wim by running the following commands:
dism /Mount-Wim /WimFile:c:\temp\src\sources\install.wim /Index:1 /MountDir:c:\temp\mount
dism /Image:C:\temp\mount /Add-Package /PackagePath:c:\temp\hotfix
dism /Image:C:\temp\mount /Add-Driver /Driver:c:\temp\drivers /Recurse
dism /Mount-Wim /WimFile:c:\temp\mount\windows\system32\recovery\winre.wim /Index:1 /MountDir:c:\temp\winremount
dism /Image:C:\temp\mount /Add-Package /PackagePath:c:\temp\hotfix
dism /Image:C:\temp\mount /Add-Driver /Driver:c:\temp\drivers /Recurse
dism /Unmount-Wim /MountDir:C:\temp\winremount /Commit
dism /Unmount-Wim /MountDir:C:\temp\mount /Commit

Note If there are multiple indexes in step 8, update them one by one.

Create an ISO file by running the following oscdimg commands.

Install the latest Windows ADK for Windows 8.1 update.

  • For Legacy BIOS Boot mode:
oscdimg -LTEST -m -u2 -bC:\temp\src\boot\ C:\temp\src C:\temp\Win7.ISO
  • For Legacy and UEFI BIOS multiple Boot mode:
oscdimg -LTEST -m -u2 -bootdata:2#p0,e,bC:\temp\src\boot\,e,bC:\temp\src\efi\microsoft\boot\efisys.bin C:\temp\src C:\temp\Win7.ISO

Static network config with dhcp fallback


auto wan
iface wan inet manual
	up ifup eth0=eth0-static
	post-up /etc/network/ eth0

iface eth0 inet manual

#static eth0 config
iface eth0-static inet static

#dhcp eth0 config
iface eth0-dhcp inet dhcp



sleep 1

for i in ${@}; do
	ping -c 2 ${i} \
		&& exit 0

# if nothing responds
ifdown ${nif}
ifup ${nif}=${nif}-dhcp

manually override:

  • ifup eth0=eth0-static
  • ifup eth0=eth0-dhcp

WebDAV with cURL

Assuming the following Data:

  • Webdav URL:
  • Username: user
  • Password: pass


Reading Files/Folders

curl ''

Creating new Folder

curl -X MKCOL ''

Uploading File

curl -T '/path/to/local/file.txt' ''

Renaming File

curl -X MOVE --header 'Destination:' ''

Deleting Files/Folders


curl -X DELETE ''


curl -X DELETE ''

List Files in a Folder

curl -i -X PROPFIND --upload-file - -H "Depth: 1" <<end
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:">

Continue reading WebDAV with cURL