Trouble deleting new files created during software install

(imported topic written by DotA)

Hi, we are using BigFix 5.1, I’m performing a software installation which creates new files (an exe and some start menu shortcuts) that I’m trying to delete within the same task. We’ve tried the delete command and also creating a vb script with using _appendfile. It appears that BigFix does not recognize these new files within the same task. If the action script is run after the install as a separate task with using either the delete command or using the vb script it has no problem deleting these files. Is this known behavior within BigFix 5.1? Is it corrected in 6? Will be upgrading to 6 shortly.

(imported comment written by jessewk)

Hi DotA,

It sounds like you are launching the installer and the delete commands are being run before the files exist. This might happen because you are launching the installer with the ‘run’ command instead of the ‘wait’ command. It might also happen if you are using ‘wait’, but the installer launches a subprocess and then quits. The ‘wait’ command does not wait for child processes.

So first make sure you’re using ‘wait’. If you already are, or that doesn’t work, you probably need to add a ‘pause while’ condition and wait for the files to show up before deleting them. You can search the forum for a couple of examples on how to use ‘pause while’. Here’s one: http://forum.bigfix.com/viewtopic.php?id=1021

Also, I highly recommend you move to version 6 or 7… you won’t regret it.

Jesse

(imported comment written by DotA)

Thanks for the suggestion Jesse, I am already using the wait command and just tested using the pause while command but still no luck!!! The action rolls over the “pause while” and continues running the rest of the script. This is the syntax I used: pause while {not exists “C:\Documents and Settings\All Users\Start Menu\Programs\IBM iSeries Access for Windows\Welcome Wizard.lnk”}

(imported comment written by jessewk)

Can you post the action script and also the log file from when the action is running?

(imported comment written by DotA)

Although listed as “Completed” the deletion of all the .lnk files from the Start Menu and the cwbunnav.exe did not delete off the PC. If this entire script is put in a batch file and run locally without BigFix there are no problems with deletions of any files. I have attached the Action and log

(imported comment written by DotA)

Jesse, FYI when the PC is rebooted and the appendfile part of the Action script is run again, it deletes the files with no issues. So I’m pretty sure the script is correct, just that BF is not recognizing the existence of the files until after a reboot.

(imported comment written by jessewk)

Hi DotA,

If the vbscript portion of the action works after reboot, than I’ll stick with my previous assessment that the script is running too early. I’d try adding some debug logging to the vbscript to note the cases when the file doesn’t exists, and then adjust your pause while statement based on what you discover.

Jesse

(imported comment written by DotA)

Thanks for all your help. Issue appears to be resolved when using the “pause while” command to perform a 5 min pause to allow the subprocesses to complete, then continuing on to delete the newly created links.

// Set starting time.

setting “_BESClient_PauseWhile”="{now as string}" on “{parameter “action issue date” of action}” for client

// Pause for 5 minutes while silent install completes

pause while {(now - (value of setting “_BESClient_PauseWhile” of client as string as time)) < 5*minute}

We are upgrading to Bigfix version 6 next week, do you know if these commands will be the same?

(imported comment written by jessewk)

Hi DotA,

Glad you got it working. It should continue to work in version 6.

Jesse