How to close all opened applications before installation start
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.
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
Answers (12)
Please log in to answer
Posted by:
MSIPackager
14 years ago
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.
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.
Posted by:
rattata
14 years ago
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++ :)
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++ :)
Posted by:
ABN
14 years ago
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.
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.
Posted by:
ABN
14 years ago
Posted by:
pjgeutjens
14 years ago
AB,
I'd envision a script using a WMI query on the running processes, something along these lines
PJ
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
Posted by:
ABN
14 years ago
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.
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.
Posted by:
anonymous_9363
14 years ago
Posted by:
ABN
14 years ago
Posted by:
anonymous_9363
14 years ago
Posted by:
b.kotagi
14 years ago
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
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
Posted by:
ABN
14 years ago
Posted by:
anonymous_9363
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.