Share via


Step 1: Creating and Compiling the Device Update Script

In this step, you will create a Device Update Script which, when run by DUA, will create a new directory on the device, copy files, and run the helloworld executable. After creating the device update script, compile the script file.

To create and compile the device update script

  1. Create a new directory called DUA_polling.

  2. From the Windows XP Embedded Installation CD-ROM 1, copy the helloworld.exe from the Samples\Tutorial directory to the new DUA_polling directory.

  3. Copy the library msvbvm60.dll from the Windows\System32 directory to DUA_polling.

  4. Run Notepad.

  5. Type the following DUA commands and save the file as helloworld.dus in the DUA_polling directory.

    Note   The paths used in this tutorial use C:\ as the root drive for your system. Change this drive letter, or use environment variables if required.

    //Delay 60 seconds.
    2,0,60
    
    //Create a new DUA_Test Directory.
    4,,,c:\DUA_new
    
    //Copy helloworld files to the new directory.
    7,,,c:\DUA_polling\helloworld.exe,1,C:\DUA_new\helloworld.exe,
    7,,,c:\DUA_polling\msvbvm60.dll,1,C:\DUA_new\msvbvm60.dll,
    
    //Execute HelloWorld.
    15,0,0,2,C:\DUA_new\helloworld.exe,0,,0,0,0,1,0,0,,1,0,0,,0,2,C:\DUA_new,1,0,WinSta0\Default
    
  6. Copy the files dusc.exe and duscaut.dll from the C:\Program Files\Windows Embedded\bin directory to the DUA_polling directory.

  7. From the Start menu, choose Run. Then, type cmd. A command prompt window opens.

  8. Change to the DUA_polling directory, for example:

    cd C:\dua_polling
    
  9. Register the duscaut.dll by typing the following command:

    regsvr32 duscaut.dll
    

    A dialog box appears that states that duscaut.dll registered successfully.

  10. Compile your Device Update Script with the following command:

    dusc helloworld.dus 
    

    A message appears that "commands.dup" was successfully created.

  11. Copy the commands.dup file to helloworld.dup with the following command:

    copy commands.dup helloworld.dup
    

When DUA polls local media, it deletes the DUA update file. Saving the backup commands.dup file allows you to edit and recompile the .dup file when you troubleshoot DUA. You have successfully created a Device Update Program. The DUA_polling directory should contain the following files:

  • Commands.dup
  • Duscaut.dll
  • Dusc.exe
  • Helloworld.dus
  • Helloworld.dup
  • Helloworld.exe
  • Msvbvm60.dll

See Also

Device Update Agent | Tutorial: Using Device Update Agent

Last updated on Wednesday, October 18, 2006

© 2006 Microsoft Corporation. All rights reserved.