/build/static/layout/Breadcrumb_cap_w.png

Wise Script

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

Answers (3)

Posted by: terebent 11 years ago
Second Degree Brown Belt
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

Comments:
  • The script is in VBScript language. - terebent 11 years ago
  • Thanks for reply,

    As per my understanding above script will first kill process and then start installation right? - Pravin 11 years ago
  • 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. - Pravin 11 years ago
  • Are you trying to install a MSI package or a exe? - terebent 11 years ago
  • exe - Pravin 11 years ago
  • Can you tell us the name of this app? This is strange launching a Winword at the background using a silent command. - dj_xest 11 years ago
  • Oracle BIPublisher Desktop 10.1.3.4.2 - Pravin 11 years ago
Posted by: anonymous_9363 11 years ago
Red Belt
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

Posted by: Rvlieburg 11 years ago
Third Degree Blue Belt
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>

 

 

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ