Kaseya Community

excluding a computer in a procedure

  • I am trying to write an procedure to uninstall a program and run on all computers in my network except a couple computers that I need the program to stay installed on.

    I wrote the uninstall procedure, but not sure how to exclude certain computer by name.

    Can anyone give me some advice on this?

  • This could handled in a couple ways.  If you are just running the procuedre once and thats it. I would just uncheck the computers you don't want to run the uninstall procedure on and use run now.

    If it something you are going to continually run on a scheduled basis  Then I would create a view and use the advanced filter and in the Computer Name filed put NOT *computer1* AND NOT *computer2*  ect...  then you can run the procedure on that view and/or create a policy to have a schedule.

  • Hi Mike. First thing to mind is not to schedule your agent procedure on these machines. So you would make a view, or filter your machines a way to only show the machines you want to run the uninstall script on.

    Other way I can think of is to use a variable with the computername and check it with 'if checkvar'. You can configure that to if it contains a certain value (the computer you wanna skip) to do nothing. But if you have a long list of computer names to skip, this is a lot of work.

    Third way; make a custom field like 'Must_uninstall_app' with a yes or no value. Fill this field for all your system (by a procedure, or by hand, depending on the amount of machines)(maybe start by setting them all to No by hand, and update them to Yes if applicable). Then schedule the procedure on only the Yes systems, or adjust your procedure to only uninstall if this value is set to Yes.