I am a noob to bigfix and action scripting and I must be missing something. I have been racking my brain trying to figure out how to simply delete a file/files based on vbs extension. I would think/hope it would be as simple as the following command in the action script but I cannot get this to work. I have tried both of the following commands.
dos del “C:\Users%USERNAME%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup*.vbs”
you need to insert relevancy in the place of the %username% variable. Note that this will only work for the current user that is logged on to the endpoint. if you want it to recursvily go through all users profile folders and delete *.vbs in them, that is a little more dificult, but still doable.
this is what I would do:
relevance:
-exists logged on user
-exists files whose (name of it as lowercase contains “.vbs”) of folder (“C:\Users” & (name of logged on user) & “\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”
action:
waithidden cmd.exe /c del /Q /F “C:\Users” & {name of logged on user} & “\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup*.vbs”
exists logged on user AND exists files whose (name of it as lowercase contains “*.vbs”) of folder (“C:\Users” & (name of logged on user) & “\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup”)
and the action I copied directly from your post. From the console I told it to apply only to my computer. got the offer and everything ran fine butthe VBS files still exist. Did I do the relevancy code incorrectly.