I did it slightly differently, using an "avgsetup.ini" file which contains the licence number:
CODE
HIDE:
DONT_START_APPS:
NO_WELCOME:
NO_AVGW_STARTUP:
QUIT_IF_INSTALLED:
LOG: "C:\AVG7INST.LOG"
TARGET_DIR: "C:\Program Files\AVG7"
NAME: "my name here"
COMPANY: "my company here"
LICNO: "my-free-licence-code-here"
This is how it is called from postinst.cmd:
CODE
start /w %systemdrive%\Install\AVG\avgsetup.exe /script_file %systemdrive%\Install\AVG\avgsetup.ini
And this is the clever bit, to update it immediately after installation, assuming you have Internet connectivity:
CODE
start /w %systemdrive%\Install\AVG\avginetl.exe /UPDATE_AVG
"avginetl.exe" is extracted from the "AVG Admin" tool from Grisoft's website -
http://www.grisoft.com/us/us_dwnl7.php?ver=8 - a command line tool to perform an update, as I couldn't figure out a way to initiate one without a pop-up prompt with the standard EXEs.
As far as I know this only works for v7.0 (beta), I think the switches are a little different for v6.x.
I don't know if this means you can use the entries in the script file as switches on the command line (e.g. avgsetup.exe /HIDE /DONT_START_APP /LICNO "licence-code"), but I find it a little tidier to keep these things out of the batch file anyway.