The following sample script commands can be created in a text editor and then compiled by using the Device Update Agent script compiler. Samples are provided with and without named constants.
Use CREATEDIRECTORY to create the directories c:\DaTest1 and c:\DaTest2 by using the following commands:
4,0,,c:\DaTest1 4,0,,c:\DaTest2The following commands show named constants:
CREATEDIRECTORY,DAERH_ABORT,,c:\DaTest1 CREATEDIRECTORY,DAERH_ABORT,,c:\DaTest2Use REMOVEDIRECTORY to remove the directory c:\DaTest1 by using the following command:
5,0,,C:\DaTest1The following command shows named constants:
REMOVEDIRECTORY,DAERH_ABORT,,C:\DaTest1Use HTTPGET to initiate an HTTP transfer of the file update.dll from a Web server.
16,,,servername.domain.com,,duapoll/update.dll,,c:\dua\update\update.dll,,,,,DAHTTPSNote When you use HTTPS, the servername listed in the Device Update Script must be identical to the servername listed in the certificate authorization. Use the fully qualified domain name of the server when you use HTTPS.
Use COPYFILE to copy the file c:\windows\system32\notepad.exe to c:\notepad.exe, and copy the file c:\windows\system32\calc.exe to c:\calc.exe by using the following commands:
7,0,,c:\windows\system32\notepad.exe,,c:\notepad.exe,1 7,0,,c:\windows\system32\calc.exe,,c:\calc.exe,1The following commands show named constants:
COPYFILE,DAERH_ABORT,,c:\windows\system32\notepad.exe,,c:\notepad.exe,1 COPYFILE,DAERH_ABORT,,c:\windows\system32\calc.exe,,c:\calc.exe,1Use DELETEFILE to delete the file c:\notepad.exe by using the following command:
8,0,,c:\notepad.exeThe following command shows named constants:
DELETEFILE,DAERH_ABORT,,c:\notepad.exeUse EXECUTEPROCESS to execute the process c:\calc.exe by using the following command:
15,0,0,,c:\calc.exe,,,0**Note **This command is identical to any of the following commands that use [Optional] settings.
15,0,0,,c:\calc.exe,,, 15,0,0,,c:\calc.exe,, 15,0,0,,c:\calc.exe, 15,0,0,,c:\calc.exeThe following command shows named constants:
EXECUTEPROCESS,DAERH_ABORT,DANO,,c:\calc.exe,,,DANOUse DELAY to set a system delay of 60 seconds by using the following command:
2,0,60The following command shows named constants:
DELAY,DAERH_ABORT,60Use REBOOT to reboot the system using the following command:
1,0,2The following command shows named constants:
REBOOT,DAERH_ABORT,DAREBOOTOPT_REBOOT
See Also
Last updated on Wednesday, October 18, 2006
© 2006 Microsoft Corporation. All rights reserved.