Need a script that should notify user to popup window with information about all opned application (in my case any Office application is open) and it should say to save and close the opned applications.

Once if close all the applications(in my case any Office application )it should start contuning th installation , without closing the running applications the installation should not continue

I really appriciate your technical expalantion in detail, thanks for your valuable time.
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Sounds like you are after a script to check for existing open applications. Problem is that you are not just talking about checking for 1 running .exe - but potentially a lot of different executeables (that make up the office suite) - which makes the task considerably more complicated.

Can I ask what you are trying to achieve? e.g. upgrade office 2003 to 2007? If this was the case then the vendor install routine in question would already check for relevant running processes and prompt the user to close them with the usual Ignore, Retry, Cancel box of programs are open.

If this is not the case then is sounds like your best option would be to have the installation run only when no user is logged on... (or a computer based GPO deployment if you are using AD)

Cheers,
Rob.
Answered 09/17/2010 by: MSIPackager
Third Degree Black Belt

Please log in to comment
0
You could try to mess with MsiRMFilesInUse dialog, but I don't think it will work.

you have to write your own CA... to check the open processes, store it in a property -> show question in a custom dialog, and close processes / restart processes

from my own process.cpp i can tell you this will be some work in c++ :)
Answered 09/17/2010 by: rattata
Senior Yellow Belt

Please log in to comment
0
Thank you a lot replay for some information, i hope you understand the task.

am trying to install one application.. not really an upgrade.
In detail, i have few of the application , only those i want to close ..while installing app,if user close those apps only installtion should continue
lets say Ms-word and IE, for these .. just i want to show
".. these apps are opned , please save and close the applcaition to continue the installation."

Once they closed apps . it should continue the installation.
Answered 09/17/2010 by: ABN
Senior Yellow Belt

Please log in to comment
0
Is there any option to implement in
- inside .MSI / CA( vbscript/any..)
- inside .wse
- .batch script

either any one of above is rid out of the solution for me.

Thanks for time and welcome your inputs/hint to way for the solution.
Answered 09/17/2010 by: ABN
Senior Yellow Belt

Please log in to comment
0
AB,

I'd envision a script using a WMI query on the running processes, something along these lines


Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcess = oWMIService.ExecQuery ("Select * from Win32_Process")

For Each oProcess In colProcess
If UCase(oProcess.Name) = UCase("MyProcess.exe")

...
Be aware the code above is just a starting point, but it should point you in the right direction. Also, pre-empting Ian, make sure your code has the needed error-trapping (basically NOTHING works and one day some error will make the building explode and stuff) [:)]

PJ
Answered 09/17/2010 by: pjgeutjens
Red Belt

Please log in to comment
0
Set oWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcess = oWMIService.ExecQuery ("Select * from Win32_Process")
For Each oProcess In colProcess
If UCase(oProcess.Name) = UCase("notepad.exe") Then Wscript.Echo "Please Close : " &oprocess.Name
Next

Somehow I managed to notify the user to "specified applications are opened and to close all ". and to add this script..Need to add 'OK' button.. Once user clicks on 'OK'( 'OK' button actions is to close the application) button after saving the specified applications, the installation should continue.

Hereon..Requirement is to continue the installation after the specified application are closed. Is there any way to put this vbscript as a custom action and alt the installation, after calling this script ( with closing the apps task as done with 'OK' button )... the install should resume the installation.


Thanks in advance .. your help get me the solutions to slove it in efficiant manner.
Answered 09/17/2010 by: ABN
Senior Yellow Belt

Please log in to comment
0
You need to build a construct that gets information from the MsgBox function, the details of which are on MSDN or the VBScript section on DevGuru (MSDN can be a little impenetrable).

You can then populate a property using Session.Property which your package can then process.
Answered 09/17/2010 by: VBScab
Red Belt

Please log in to comment
0
Hi VBScab,

Now the solution is very far..

Can you please brief on below
- how to build a construct that gets information from the MsgBox function...any link ..how exactly to ..
- populate a property using Session.Property which your package can then process

Thanks.
Answered 09/17/2010 by: ABN
Senior Yellow Belt

Please log in to comment
0
Is there some reason why you can't type 'VBSCript +MsgBox' into Google or use DevGuru's Search box?
Answered 09/17/2010 by: VBScab
Red Belt

Please log in to comment
0
Hi this VB script may close(Kill the Process) the application:
On error resume next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'servicename")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Answered 09/17/2010 by: b.kotagi
Orange Senior Belt

Please log in to comment
0
Hi All, its very urjent please provide any script it may be Batch script or it may be VBScript

1> the script should display all the running (Opened) application (Program) not the process and close after hit the OK button on message box and after it should start installation.
Answered 09/20/2010 by: ABN
Senior Yellow Belt

Please log in to comment
0
Please read posts before responding (said the pot to the kettle!) The OP wants to check running applications not file existence.

@ABN: the potential for damage by a half-baked, poorly executed script troubles me. Email me with your EXACT requirements and I'll send you a quotation.
Answered 09/21/2010 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity