Proactive Services
June 19th, 2009, 09:34 AM
For those of you who are new to the Windows Automated Installation Kit (WAIK), a prerequisite of Eset's SysRescue feature, I thought I'd share a bit of knowledge on updating the bootable USB install with the latest NOD32 definitions.
The WAIK is needed as it allows the user to create bootable Windows Vista images. NOD32 is then added to the image and starts automatically when booted, to become SysRescue. SysRescue does have the ability to update itself via the Internet but it can be helpful to have the latest updates pre-installed.
ImageX is the program which creates and modifies these images. To update the definitions the image will need to be mounted to a directory, the necessary files copied over, and then unmounted.
You will need to run this set of commands as a member of the Administrator group and with Elevation if you're on Vista. This batch file assumes the following:
The WAIK is installed to C:\Program Files\Microsoft\Windows AIK
The USB device you're using has the drive letter E:
You're using a 32-bit operating system (change to the appropriate directory under Tools for the AIK path if not)
You have Microsoft's Robocopy.exe (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd) tool available in your PATH. If not, apply your own copy command. Robocopy is useful as it will delete old update files in the image.
Batch file code:
@echo off
rem When opening images, one mounts the image file to a directory then make changes to the files and directories inside.
if not exist "%temp%\SysRescue mount" mkdir "%temp%\SysRescue mount"
rem Mount the image for read/write access to the temporary directory. The "1" specifies the first entry in the image.
"C:\Program Files\Microsoft\Windows AIK\Tools\x86\imagex.exe" /mountrw "E:\sources\boot.wim" 1 "%temp%\SysRescue mount"
rem Copy the update files from the local machine.
robocopy "%programdata%\ESET\ESET NOD32 Antivirus\Updfiles" "%temp%\SysRescue mount\ProgramData\ESET\ESET SysRescue\Updfiles" *.nup /MIR /COPY:DAT
rem Unmount the image and commit the changes.
"C:\Program Files\Microsoft\Windows AIK\Tools\x86\imagex.exe" /unmount /commit "%temp%\SysRescue mount"
rem Remove the temporary directory.
rmdir /s /q "%temp%\SysRescue mount"
I can probably rustle up something for the ISO as well if anyone needs help.
The WAIK is needed as it allows the user to create bootable Windows Vista images. NOD32 is then added to the image and starts automatically when booted, to become SysRescue. SysRescue does have the ability to update itself via the Internet but it can be helpful to have the latest updates pre-installed.
ImageX is the program which creates and modifies these images. To update the definitions the image will need to be mounted to a directory, the necessary files copied over, and then unmounted.
You will need to run this set of commands as a member of the Administrator group and with Elevation if you're on Vista. This batch file assumes the following:
The WAIK is installed to C:\Program Files\Microsoft\Windows AIK
The USB device you're using has the drive letter E:
You're using a 32-bit operating system (change to the appropriate directory under Tools for the AIK path if not)
You have Microsoft's Robocopy.exe (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd) tool available in your PATH. If not, apply your own copy command. Robocopy is useful as it will delete old update files in the image.
Batch file code:
@echo off
rem When opening images, one mounts the image file to a directory then make changes to the files and directories inside.
if not exist "%temp%\SysRescue mount" mkdir "%temp%\SysRescue mount"
rem Mount the image for read/write access to the temporary directory. The "1" specifies the first entry in the image.
"C:\Program Files\Microsoft\Windows AIK\Tools\x86\imagex.exe" /mountrw "E:\sources\boot.wim" 1 "%temp%\SysRescue mount"
rem Copy the update files from the local machine.
robocopy "%programdata%\ESET\ESET NOD32 Antivirus\Updfiles" "%temp%\SysRescue mount\ProgramData\ESET\ESET SysRescue\Updfiles" *.nup /MIR /COPY:DAT
rem Unmount the image and commit the changes.
"C:\Program Files\Microsoft\Windows AIK\Tools\x86\imagex.exe" /unmount /commit "%temp%\SysRescue mount"
rem Remove the temporary directory.
rmdir /s /q "%temp%\SysRescue mount"
I can probably rustle up something for the ISO as well if anyone needs help.