An example of variables and commands in AutoInstall

Using the commands and variables in an AutoInstall script lets you ask for and receive user input, run commands, and customize AutoInstall. The following example script gives the user a choice of options, and then installs a file.

A sample script follows.

UNINSTALL: yes, packagename="Distribute Files Package" 
BEGINFIRSTSCREEN title="Installing template files" 
This program lets you install template files to your hard drive. 
ENDFIRSTSCREEN 
BEGINGROUP EXCLUSIVE, caption="Installing template files" 
Select one of the following options to install the correct template 
files. 
01 [x] Administration 
Install Administrative templates 
02 [ ] Customer Service 
Install Customer Service templates 
03 [ ] Cancel 
ENDGROUP 
POPMESSAGE 0, fontsize=23 
Installing administration templates 
EndPop 
POPMESSAGE 01 
Installing customer service templates 
EndPop 
IF GROUP = 01 
FILE: "Admin.000", overwrite=ask, popid=00, From="C:\Documents and 
Settings\Administrator\Admin.dot" 
SHORTCUT: "$ALLUSERSDIR$", "Administration" 
ENDIF 
IF GROUP = 02 
FILE: "CUST_S~1.000", overwrite=ask, popid=01, From="C:\Documents 
and Settings\Administrator\Cust_service.dot" 
SHORTCUT: "$ALLUSERSDIR$", "Customer Service" 
ENDIF 
IF GROUP = 01 
BEGINLASTSCREEN title="Files Install", caption="Files Install" 
The file has been successfully installed onto your computer.  
ENDLASTSCREEN 
ENDIF 
IF GROUP = 02 
BEGINLASTSCREEN title="Files Install", caption="Files Install" 
The file has been successfully installed on your computer. 
ENDLASTSCREEN 
ENDIF 

This example provides three choices for the user:

  • To install templates for administration personnel
  • To install templates for customer service personnel
  • To cancel without installing any files

An AI package is created using AI Builder commands and variables. The package is distributed to users and is executed on client computers. The user can then run the AI package and install files as required.


Объявления: