I am deploying setup.exe using .iss file in system context. Installation starts but remains running because winword.exe is called by setup.exe and keep running.

 

I want check winword.exe after installation started if found then kill process and continue installation.

Please suggest how to do it using wisescript/vbscript?

 

thank in advance

 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1
 Function TaskKill(strTaskName)
Dim objWSH
Dim strTaskName
Dim shellCommand
Set objWSH = CreateObject("WScript.Shell")

shellCommand = "cmd /c taskkill /f /IM " & strTaskName & """"
objWSH.Run shellCommand, 0,true
End Function
Answered 05/28/2013 by: terebent
Brown Belt

  • The script is in VBScript language.
  • Thanks for reply,

    As per my understanding above script will first kill process and then start installation right?
  • My issues is that when i start installation then winword.exe gets run in background therefore installation gets pause.once i kill that process manually then only installation go ahead and finishes.
  • Are you trying to install a MSI package or a exe?
  • exe
  • Can you tell us the name of this app? This is strange launching a Winword at the background using a silent command.
  • Oracle BIPublisher Desktop 10.1.3.4.2
Please log in to comment
1

>The script is in VBScript language.

..."and I'm too lazy to use Google and find one myself"

http://www.lmgtfy.com/?q=wise+script+kill+process

Answered 05/28/2013 by: VBScab
Red Belt

Please log in to comment
0

Run the following hta script separately while installing:

<html>
<head>
<title>ATTENTION</title>
<HTA:APPLICATION
     ID="objAutoRefresh"
     APPLICATIONNAME="Winword killer"
     SCROLL="no"
     SINGLEINSTANCE="no"
     WINDOWSTATE="minimize"
     BORDER=none
>
</head>

<SCRIPT LANGUAGE="VBScript">
Set wshShell = CreateObject("WScript.shell")
set filesys= CreateObject("Scripting.FileSystemObject")

    Sub Window_OnLoad
        iTimerID = window.setInterval("RefreshList", 10000)
    End Sub

    Sub RefreshList
on error resume next

   strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = 'winword.exe'")
  strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = 'winword.exe'")
if colProcesses.Count = 1 then wshshell.run ("kill /f winword.exe")
if colProcesses.Count = 1 then wscript.quit
if colProcesses.Count = 1 then self.close
    End Sub
window.resizeTo screen.width,130
        window.moveTo intTop

</SCRIPT>

<body STYLE="font:14 pt arial; color:white;
 filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#000000', EndColorStr='#0000FF')">
<input type="image" src="exit.gif" title='Exit' name="image" width="75" height="75" onclick=self.close()></input>

        Hta to kill winword <br>
<span  id="section1" name="section1"
<body>
</html>

 

 

Answered 05/29/2013 by: Rvlieburg
Third Degree Blue Belt

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