Jump to content


steve11

ReRun Successful Program - Best Practice

Recommended Posts

I need to reinstall successfully installed programs in SCCM 2007 R3. This may be needed anywhere from several days to several months after the program is deployed. I need this when the client has problems relating to the program and it needs to be reinstalled.

 

My original advertisements are all set to "Rerun if failed previously". This works perfectly when the deployments do fail. I have avoided setting this to "Always rerun program" as this will keep installing the same program over the top at any subsequent Mandatory assignment - that is the last thing I want!

 

I have tried creating a 2nd Collection and a 2nd Advertisement set to "Always rerun program", and only used this when I need to reinstall... This is a messy workaround that I want to avoid.

 

What is my best option (best practice) here?

 

Note: I have seen that I could create all my Advertisements = "Always rerun program" and set the Collections to populate based on a Query for whats missing in "Add/Remove programs". I am concerned with this option as the Software Invertory cannot be forced real time therefore the Advertisement will be out of sync with whats actually installed on PCs. This could have the effect of [a] Reinstalling over the top and Not reinstalling until the next Software Inventory which could take several hours.

 

Note2: I have tried the Right Click tools but always get the following execmgr.log error:

The program Office Upgrade will not run because it has been run before and it succeeded and policy indicates it should rerun only it it has previously failed. execmgr 13/07/2011 14:05:36 3092 (0x0C14)

Share this post


Link to post
Share on other sites


Creating a second advertisement of the same program doesn't help, it only creates a mess.. The reason for that is that there are then two advertisement with different settings for the SAME program. So it's unclear which settings will be used.. probably the first one..

 

There is no real best practice for the rerun settings, it all depends on the needs...

Share this post


Link to post
Share on other sites

Ok Peter thanks for the tip - However I realise creating a second advertisement is not good and hence the reason for posting this.

 

Asking for a "Best Practice" on this matter may be asking for too much, so instead I would like to know if I am installing applications like Office 2007, Adobe Reader, Adobe Shockwave, etc out to approx 700 desktops and I need to occasionally reinstall those applications if they are misbehaving - how do go about doing this?

 

I do not want to user Task Sequences for this purpose as my current deployments are using simple Program Advertisements and they work great.

 

I would like to follow a query based solution here which determines if the program has been removed and reinstalls automatically - As I stated earlier this has its own flaws:

I am concerned with this option as the Software Invertory cannot be forced real time therefore the Advertisement will be out of sync with whats actually installed on PCs. This could have the effect of [a] Reinstalling over the top and Not reinstalling until the next Software Inventory which could take several hours.

Share this post


Link to post
Share on other sites

Hi,

 

i'm usually putting everything in a tasksequence, which can be easily duplicated with 2 clicks. Then put a new advertisement on the new task sequence, and delete the old one. The task sequence has the advantage that you can define depencies for installations with wmi queries.

Share this post


Link to post
Share on other sites

Hi,

 

i'm usually putting everything in a tasksequence, which can be easily duplicated with 2 clicks. Then put a new advertisement on the new task sequence, and delete the old one. The task sequence has the advantage that you can define depencies for installations with wmi queries.

 

Thanks for the Task Sequence option, however I have found TS are problematic if there are dependant programs which require reboots in between. After reboots in a TS forcing the secondary program does not work as it does when in a OSD Task Sequence.

 

I have changed my thinking on this - if I set no mandatory assignments and allow the install to be controlled ONLY by using the "Run advertised programs" icon, this safeguards the application being reinstalled by mistake.

 

This introduces one issue: if I make this Advertisement available to all PCs wont this

A: Put a heavy load on the servers

B: If the advertisement is set to download content, the local cache on all PCs will be overloaded with these "persistent" adverstisements?

Share this post


Link to post
Share on other sites

A good option is to encapsulate the installation in a vbscript, which executes a wmi query first, to check if the application is already installed. This way you could set the advertisement to always rerun if you want, without caring about if it will start or not.

As soon as you set a mandatory schedule with local caching at the same time, the clients will download the content. The servers should handle it without problems, since you only have like 700 clients.

 

 

Regarding the reboot problems in task sequences. You can prevent the client from rebooting if you start the installation from a vbscript which replaces the exit code 3010 with 0. If you need the reboot finally though you can also set a task sequence variable in the script, if the return code of the command line was 3010. At the end of the sequence just force a reboot depending on the value of the variable.

Share this post


Link to post
Share on other sites

I'm not sure if this would quite fit your problem, but... Why not let your collection do the work? Set up your collection to only populate if the application is not installed, or is a different version than the one you're currently pushing. Then limit that collection to another collection containing all the machines that would ever get the package (either your entire fleet, or a select group that you determine). Then set your advertisement to always rerun. A client gets the app, installs it, and then reports back in that it's installed, and the next time the collection membership query runs, it gets dropped from the collection.

 

Some sample collection queries: http://myitforum.com/cs2/blogs/rbennett806/pages/collection-queries.aspx

 

And if it quirks up, but remains installed, have another collection with a removal program targeted to it that you can plop the client into....

Share this post


Link to post
Share on other sites

A good option is to encapsulate the installation in a vbscript, which executes a wmi query first, to check if the application is already installed. This way you could set the advertisement to always rerun if you want, without caring about if it will start or not.

As soon as you set a mandatory schedule with local caching at the same time, the clients will download the content. The servers should handle it without problems, since you only have like 700 clients.

 

 

Regarding the reboot problems in task sequences. You can prevent the client from rebooting if you start the installation from a vbscript which replaces the exit code 3010 with 0. If you need the reboot finally though you can also set a task sequence variable in the script, if the return code of the command line was 3010. At the end of the sequence just force a reboot depending on the value of the variable.

 

Thanks Peter: I like the logic of a vbscript encapsulated installed but hve avoided this as for me it goes against the reason for using SCCM. Assuming that I chose this option I was thinking that we have approx a dozen applications (like Office, Adobe Reader, Flash, Primo PDF, as well as some other 3rd party Business apps) - which I was wanting to persist in the users "Run advertised programs". This would allow ad hoc reinstalls if the application needed a reinstall. This would mean that we would have 12 x 700 advertisements persistent on our network all the time. Would the servers be able to handle 8400 pending advertised programs?

 

By the way I cant always reset the return code to 0, in particular I have a large app that is require to be reinstalled if Office is installed - the vendor have made a strict rule that the PC must be rebooted after Office is installed (which is before the app itself is installed)

 

I'm not sure if this would quite fit your problem, but... Why not let your collection do the work? Set up your collection to only populate if the application is not installed, or is a different version than the one you're currently pushing. Then limit that collection to another collection containing all the machines that would ever get the package (either your entire fleet, or a select group that you determine). Then set your advertisement to always rerun. A client gets the app, installs it, and then reports back in that it's installed, and the next time the collection membership query runs, it gets dropped from the collection.

 

Thanks Lucid: This option you have given is the most appealing to me becuase it minimises the number of pending advertised programs to a minimum. The only problem here is if a user needs a reinstall of an app, once it is uninstalled you are reqiured to do the following to install it again:

1)Force Hardware inventory (wait several minutes for completion)

2)Update the appropriate collection to force qery to run, and wait until the PC appears

3)Force Machine Policy Update to download advertisement/package

4)Go into "Ran advertised programs" and run the installer

** I have tried to simplify this process using "SCCM Client Centre" or the "Right click" tools, and even tried to make a vbsript to step through this sequentially but either way its a little messy and I would like to know if anyones experiences with this style of persistent installer are good?

Share this post


Link to post
Share on other sites

Run everything through a task sequence and set your conditionals on each individual task sequence item.

 

Hi Trevor, as I said, I did try the Task Sequences but they are problematic if there are dependant programs which require reboots in between. I have found that in a TS, when a reboot occurs, the secondary program does not work as it does when in a OSD Task Sequence. Fot these I cant reset the return code to 0 (when a 3010 code is given) as vendors are enforcing a full reboot in between dependant applcations.

Share this post


Link to post
Share on other sites

Hi Trevor, as I said, I did try the Task Sequences but they are problematic if there are dependant programs which require reboots in between. I have found that in a TS, when a reboot occurs, the secondary program does not work as it does when in a OSD Task Sequence. Fot these I cant reset the return code to 0 (when a 3010 code is given) as vendors are enforcing a full reboot in between dependant applcations.

 

So create multiple task sequences with only one or two steps as necessary, and advertise multiple sequences. You can even have a conditional on the task sequence items (or create a group and set the condition there), that detects if the machine needs to be rebooted or not.

 

Allow the user to run these task sequences as necessary via Run Advertised Programs (make them optional advertisements).

 

Hope this helps.

 

Cheers,

Trevor Sullivan

http://trevorsullivan.net

http://twitter.com/pcgeek86

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...