locked
Delete advertisement history to be able to rerun advertisements RRS feed

  • Question

  • Hi,

    we have install, uninstall, repair collections for each program with advertisements for the software programs on them. If we add a computer to the install collection, the software is installed. So far, so good. But of we remove the computer from the collection (e.g. uninstall the software) and later want to install it again, it is not enough to add the computer to the install collection again.

    I'm looking for a way, to delete the advertisements run history to be able to rerun advertisements later, as if they were never executed on the client.

    Anyone knows a way for this or has some hints how the client works with the advertisements.

    Thanks in advance!

    Uwe
    Thursday, June 4, 2009 2:44 PM

Answers

  • Setting the "Program rerun behavior " to 'always rerun' should work: http://technet.microsoft.com/en-us/library/bb680997.aspx
    • Marked as answer by Eric C. Mattoon Thursday, June 4, 2009 3:11 PM
    • Unmarked as answer by Uwe82 Thursday, June 4, 2009 6:19 PM
    • Marked as answer by Uwe82 Friday, June 5, 2009 1:11 PM
    Thursday, June 4, 2009 3:05 PM
  • "Always rerun" is still the way to go ...
    Just try it: advertisement for a given collection (mandatory; no recurrence). Add computer to collection. Advertisement is kicked off. Remove computer from collection. Wait for the client's policy polling interval to pass. Add computer to collection. Advertisement is kicked off again.
    • Proposed as answer by kungcocos Friday, June 5, 2009 12:10 PM
    • Marked as answer by Uwe82 Friday, June 5, 2009 1:11 PM
    Thursday, June 4, 2009 7:26 PM

All replies

  • We are thinking about the same thing. We are going to have installation collections based on computer membership in AD groups and uninstallation based on when the computer is removed from the installation collection, but still have the application installed (based on sccm inventory). So far so good. But this, as you say, will only work one time, one install and one uninstall. Therefore we are trying to develop an application that will run periodically on the clients and trigger the correct advertisements again. We are developing the application in vb.net, but if you look in this MyITforum article you will get information on how to trigger an advertisement using vbscript, the code is almost the same: http://www.myitforum.com/articles/8/view.asp?id=6841.

    Hope it helps. Currently we are trying to find a solution on how to only trigger the advertisement if the SCCM client is not busy running other stuff.

    Markus

    Thursday, June 4, 2009 2:59 PM
  • Setting the "Program rerun behavior " to 'always rerun' should work: http://technet.microsoft.com/en-us/library/bb680997.aspx
    • Marked as answer by Eric C. Mattoon Thursday, June 4, 2009 3:11 PM
    • Unmarked as answer by Uwe82 Thursday, June 4, 2009 6:19 PM
    • Marked as answer by Uwe82 Friday, June 5, 2009 1:11 PM
    Thursday, June 4, 2009 3:05 PM
  • Yes, you need to set it to Always rerun, that is part of the solution. But you also need to trigger the advertisement schedule on the client again in some way, only setting it to always rerun is not enough, the client remembers that it already has run the schedule for the advertisement. You certainly don´t want to trigger the advertisement again for all clients in your collection by creating another mandatory assignment. You only want to rerun for the client that does not have the application installed if I understand Uwe82 correctly. If you don´t want to do alot of manual work you need to have an application that temporarily sets the advertisement to "Always Rerun" and triggers the Schedule again and then sets the advertisement back to it´s original value (default=Rerun if failed).
    Thursday, June 4, 2009 3:22 PM
  • @Torsten: But this would result in regularly recurring MSI installations on the client, wouldn't it? The computers will stay in the install collections as long as they are to have the software installed.

    @kungcocos: I will take a look at this, thanks for the tipp. But this also leads to the wrong direction:

    I don't want to have a client software to rerun an advertisement, I want to achieve, that the SCCM client itself triggers a this. The process is as follows: The client is added to the install collection by another self-developed piece of software which also adds self-ordering capabilities for the employees, so there must not be an administrative influence. The software gets installed. Now the employee doesn't need the software any more, he removes it via self-service-portal, which results in a removal of the computer from the install collection and it is added to the uninstall collection.
    A few weeks later, the employee wants to have the software again, and now here is the problem ... I need the SCCM Agent to think that the advertisement has never been run. For that, I am looking for a way, where I can remove this history for this advertisement on the client, whenever I remove a client from a collection.

    For example, this can be a service which regularly checks which advertisements are actually in the Machine Policy and deletes all other history entry from the WMI database. That's what I was thinking about, but I didn't find the correct instances in the WMI namespaces to check what behaviour is behind the SCCM agent to schedule the run of programs in advertisements.
    Thursday, June 4, 2009 6:19 PM
  • "Always rerun" is still the way to go ...
    Just try it: advertisement for a given collection (mandatory; no recurrence). Add computer to collection. Advertisement is kicked off. Remove computer from collection. Wait for the client's policy polling interval to pass. Add computer to collection. Advertisement is kicked off again.
    • Proposed as answer by kungcocos Friday, June 5, 2009 12:10 PM
    • Marked as answer by Uwe82 Friday, June 5, 2009 1:11 PM
    Thursday, June 4, 2009 7:26 PM
  • Just tried it, Torsten is correct (I am wrong). If the policy is removed from the client and then reapplied the program will run again if "Always rerun" is selected. Uwe82, this will work for you.
    Friday, June 5, 2009 12:10 PM
  • Yes, it seems to be correct, I tried it too and it seems the solution for the problem :). I always thought the program would be run at each policy retrieval because of the term "Always rerun". But what would the schedule be for in the advertisement? So, this behaviour is more logical :)

    Thanks a lot, you really helped me!
    Friday, June 5, 2009 1:10 PM