If you want the inventory part of the script to not run if a report from a previous inventory on the specific machine or user is found you can change this:

Code:
If Exist($File)
  Exit
EndIf


to this:

Code:
If Exist($File) = 0
  ;do all inventory stuff here.
EndIf


The other parts of the script that are not doing an inventory or should always run even if the report already exists should be before the IF o rafter the EndIf depending on if the inventory depends on the specific piece of the script. Also you could call the UDF so the script is lots easier to read.
How to call UDF’s? You can put each UDF in a separate file and put this:

Code:
Call @scriptdir + "\someudf.udf"
Call @scriptdir + "\someotherudf.udf"


At the top of the script right after this:

Code:
If Not @LOGONMODE
	     Break On
EndIf


Edited by Mart (2007-01-17 03:34 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.