#
# Install software update client files from SD card
#

# Install .NET Compact Framework 3.5
#InstallCab "SD Card\CE\ARM\NETCFv35.wm.armv4i.cab"
InstallCab "SD Card\CE\ARM\NETCFv35.Messages.EN.wm.cab"

# Copy the startup.exe and startup.txt from the SD card to the root folder.
copyreltoabs "startup.exe" "FlashDisk\startup.exe"
# copyreltoabs "startup.txt" "FlashDisk\startup.txt"

# Copy the setup.exe and setup.txt from the SD card to the FlashDisk\CE\ARM boot directory
copyreltoabs "setup.exe" "FlashDisk\CE\ARM\setup.exe"
copyreltoabs "setup.txt" "FlashDisk\CE\ARM\setup.txt"


# Backup the existing SoftwareUpdateClient folder from the device.
deletedir "FlashDisk\Backup\SoftwareUpdateClientBACKUP"
copydir "\Program Files\SoftwareUpdateClient" "FlashDisk\Backup\SoftwareUpdateClientBACKUP"
deletedir "\Program Files\SoftwareUpdateClient"

# Copy the SoftwareUpdateClient folder from the SD card to the Program Files folder.
copydir "\SD Card\SoftwareUpdateClient" "\Program Files\SoftwareUpdateClient"

# Disable unknown publisher warning in Windows Mobile.
SetRegistryValue "HKEY_LOCAL_MACHINE\Security\Policies\Policies" "0000101a" "dword" 1

# Supress the Dial-Up dialog for connecting to the cellular data plan
SetRegistryValue "HKEY_CURRENT_USER\ControlPanel\Notifications\{8ddf46e7-56ed-4750-9e58-afc6ce486d03}" "Options" "dword" "0"

# Run SoftwareUpdater
call "\Program Files\SoftwareUpdateClient\SoftwareUpdateClient.exe"

# Printer fix installer - can cause a reboot
#InstallCab "SD Card\CE\ARM\PrinterIT9000WME.102.CAB"

