Jump to content


  • 0
ScottXIsles

Application removes whilst in use

Question

Hi all, First post so here goes.

 

Running SCCM 2007 and trying to deploy a newer revision of our SAP gui to about 200 users.

The problems arise when I deploy to a machine where the application is installed and in use, the batch removes the currently installed version in the background and throws the user out of the Gui. The application then send SCCM a notification to say successful.

 

Is there any way to make the package wait till the files are not in use before removing?

 

Here is the command line I have used to remove and install the new revision of the gui.

 

REM ***Removal***

"C:\Program Files\SAP\SAPsetup\setup\NwSapSetup.exe" /uninstall /product="ECL710+BW350+KW710+GUI710ISHMED+GUI710TWEAK+JNet+SAPGUI710+SAPBI" /TitleComponent:"SAPGUI710" /IgnoreMissingProducts /silent

 

REM ***Installation***

"%~dp0RSL_SAP_GUI_72_7_20110809_1041.exe" /silent

msiexec.exe /i "%~dp0SapGuiAdditionalFiles.msi" RebootYesNo="No" Reboot="ReallySuppress" /qn

 

Thanks for any help on the matter.

S

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

Thanks for the response.

 

What command line would you use to query that the process is running? I dont want to kill the process as this would also throw the user from there session.

Just a query to result whether to proceed with the install or pause until files are not in use would be helpful.

 

Thanks

S

Share this post


Link to post
Share on other sites

  • 0

Hello,

 

You'd probably want to have a wrapper script that waits (up to a limited period of time, not perpetually) for the GUI process to exit, and then proceed with the installation.

 

Although that is the traditional method, you can also register for WMI events using Windows PowerShell, and immediately begin the installation after the process has exited. The WMI query you would use to subscribe for such events would look like this (against the root\cimv2 WMI namespace):

 

select * from __InstanceDeletionEvent within 10 where TargetInstance ISA 'Win32_Process' and TargetInstance.Name = 'sapgui.exe'

 

Of course, you'll need to replace 'sapgui.exe' with whatever the actual process name is, but you get the idea.

 

To use this practically in PowerShell, you would use the Register-WmiEvent cmdlet, along with the -Query, -Namespace, and -Action parameters. The value passed to the -Action parameter would be a PowerShell ScriptBlock that could fire off your setup program, along with any other tasks. You may want to insert a final check for any remaining instances of 'sapgui.exe' in the event that there were multiple processes with the same name (though I've left this out of the example below).

 

$ActionBlock = { setup.exe /s; }

Register-WmiEvent -Namespace root\cimv2 -Query "select * from __InstanceDeletionEvent within 10 where TargetInstance ISA 'Win32_Process' and TargetInstance.Name = 'sapgui.exe'" -Action $ActionBlock

 

Hope this helps.

 

 

Cheers,

Trevor Sullivan

http://trevorsullivan.net

http://twitter.com/pcgeek86

Share this post


Link to post
Share on other sites

  • 0

related to Lucids remark, the general best practise is to mail an IT Upgrade annoucement to the group of users affected, and/or post it on your Annoucements section of your company intranet etc..

 

Then schedule the update with interaction from the user to confirm run and have a mandatory end date, to run out of hours if needed also.

much much simpler, no need to over complicate it.

 

**step back out of the box, POV*

  • Like 1

Share this post


Link to post
Share on other sites

  • 0

Thanks for all your suggestions!

 

I have set a 90 minute timer on the application to install with SCCM and given the users the ability to run independently. I have also sent out comm's to let the user base know what to expect as part of the roll out.

 

Using this route on another package I have included a VB front end to inform the user an application will install over the next hour etc etc and what to expect. This helped pause the job until the user accepts the splash screen (all close function have been hidden) I will probably use this going forward for most big applications.

 

User communication is always the best route forward :) Thanks.

Share this post


Link to post
Share on other sites

  • 0

Just by the way. There is no need to uninstall SAPGui 7.10 before installing 7.20. The Setup Routine is doing that by itself, if it is configured right. I have just updated 4200 clients to 7.20.

Simply put the installation in a task sequence and put 2 wmi queries as condition on the installation step. First one checking the installed version and the second any running SAP process.

Set the advertisement on rerun and put a schedule on it. Link it to a collection which checks the installed version of SAP.

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
Answer this question...

×   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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.