Updated version of DUAScriptGen (v1.1.0010) is now available
I have released an updated version of DUAScriptGen tonight that contains a couple of bug fixes, one that is relatively small and one that is bigger. I decided to increase the version number by more than 1 to indicate that the change is more substantial than in the last couple of minor releases, so that is why this is v1.1.0010 when the previous version was v1.1.0004. You can download the latest version of DUAScriptGen from this location.
The big change in this version is in regards to how DUAScriptGen generates the file copy operations in the DUS file. Previously, it had some logic to try to handle files in use on the device by setting the flags DAMOVEFILE_REPLACE_EXISTING and DAMOVEFILE_DELAY_UNTIL_REBOOT in the MOVEFILE operations. However, a customer pointed out to me that this is not a reliable way to cause DUA to delay file renaming until after the reboot because of some permission issues if the DUAgent service is running with certain credentials on the device.
The v1.1.0010 version of DUAScriptGen now uses the recommendations in this Windows XP Embedded MSDN document and creates a set of steps to rename the current file, copy the new file, reboot and delete the renamed file to accomplish copy operations in case files are in use. There is one problem though - there is no way to know for sure when creating the DUS file whether or not the file will be in use on the embedded device when the update is applied. Because of that, I added a checkbox in the file properties dialog that appears when you double-click on a file in the DUAScriptGen file list box. This checkbox lets you specify whether or not the file is expected to be in use on the device. If that checkbox is set, DUAScriptGen will use the 4 step process in the MSDN article above to copy the file to the system and if not it will use a single step. Files in use can only affect copy and delete operations, so the checkbox will be grayed out in the DUAScriptGen UI if one of the other file operations (move or execute) are selected for the file. When adding new files in DUAScriptGen, the files in use checkbox will default to off, but you can change that setting prior to generating your DUS file if desired.
The above change was made in such a way that previously generated DUS files can still be loaded correctly in the DUAScriptGen UI. If you want to quickly update to this new file copy logic for a DUS file that you previously created in DUAScriptGen, all you have to do is get the new version of DUAScriptGen, load the DUS file, check the files in use checkbox for the relevant files, and recreate the DUS file.
The small bug fix I mentioned above is a logic change when you have local polling selected in the DUAScriptGen options dialog. Previously, DUAScriptGen only wrote the name of the next file to poll for to the registry entry in the DUS file, but now it will correctly write the full path of the next file to poll for. Thanks to Lynda for pointing out this problem to me!
As always, please let me know if you see any additional issues with DUAScriptGen.