Sample DUA Script

5/10/2007

The following list shows what the sample DUA script does:

  1. Delay 5 seconds.
  2. Creates C:\DUAUpdate directory.
  3. Downloads image.jpg file from the http server.
  4. Creates the registry key: HKLM\CurrentControlSet\Services\DUAgent\regtest
  5. Sets the value to test1 and test2
//****************************************
//** DELAY           : 2
//** ErrorMode       : 0
//** TimeOut         : 5 (Sec)
//**

2,0,5


//****************************************
//** CREATE DIRECTORY    : 4
//** Error Mode          : 0
//** Expand Mode         : 0
//** Directory           : c:\DUAUpdate
//** Status              : 

4,,,C:\DUAUpdate


//****************************************
//** HTTP GET           : 16 
//** Error Mode         : 0
//** Expand Mode        : 0
//** Server             : myhostname.domain.com
//** ExpandMode         : 0
//** Remote File        : dua_files/image.jpg
//** Expand Mode        : 0
//** Local File         : c:\DUAUpdate\image.jpg
//** Replace File       : 0
//** Proxy Type         : 0 (N0 Proxy)
//** Expand Mode        : 0
//** Proxy Name         : 0
//** Expand Mode        : 0
//** bypass list        : <local>
//** Protocol           : 1 (HTTPs)
//** Port               : 443 (HTTPs)
//** Expand Mode        : 0
//** Protocol Version   : HTTP/1.1
//** Expand Mode        : 0
//** Referer            : ANY
//** AutoLogonLevel     : 2 (0,1,2)
//** Expand Mode        : 0
//** UserName           : <Username>
//** Expand Mode        : 0
//** Password           : <Password>

16,0,0,<myhostname.domain.com>,0,dua/image.jpg,0,c:\DUAUpdate\image.jpg,,,,,,<local>,1,443,0,,,,2,0,<username>,0,<password>


//************************************
//** REG CREATE KEY       : 9
//** error mode           : 0
//** HKEY_LOCAL_MACHINE   : HKEY_LOCAL_MACHINE
//** Expand Mode          : 0
//** Key to create        : SYSTEM\CurrentControlSet\Services\DUAgent\regtest
//** DAREG_OPTION_NON_VOLATILE  : 0
//** KEY_ALL_ACCESS       : 983103
//** Status               : PASS Agent PASS Xlator

9,0,HKEY_LOCAL_MACHINE,0,SYSTEM\CurrentControlSet\Services\DUAgent\regtest,0,983103


//******************************
//** REG SET VALUE        : 11
//** Error Mode           : 0
//** HKEY_LOCAL_MACHINE   : HKEY_LOCAL_MACHINE
//** Expand Mode          : 0
//** Key to Set           : SYSTEM\CurrentControlSet\Services\DUAgent\regtest
//** Expand Mode          : 0
//** Value Name           : TestValueMulti
//** Type DAREG_MULTI_SZ  : 7
//** Size for DAREG_MULTI_SZ : must be the number of strings = 2
//** list of 2 strings    : test1,test2


11,0,HKEY_LOCAL_MACHINE,0,SYSTEM\CurrentControlSet\Services\DUAgent\regtest,0,TestValueMulti,7,2,test1,test2,


//******************************
//** REBOOT            : 1
//** Error Mode        : 0
//** Flags             : DAREBOOTOPT_REBOOT (Shuts down & restarts the system)

1,,DAREBOOTOPT_REBOOT

See Also

Concepts

DUA Script Command Reference
DUA Sample Script Commands