Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How Close Qlikview Application using Batch File

Hello Friends ,

I want to close Qlikview Application using Batch file.

3 Replies
ecolomer
Master II
Master II

The /r parameter should serve the purpose.

It wil save and close the doc after load.

qv.exe /r

ecolomer
Master II
Master II

But for kill the process

"taskkill /f /im qv.exe"

petter
Partner - Champion III
Partner - Champion III

A VBscript can act like a batch-file and here is how to do it from VBScript (put the code in a text-file and name it QuitQV.vbs for example):

2015-05-02 #9.PNG

Sub StartAndOpenDoc
Set QvDoc = GetObject("C:\ProgramData\QlikTech\QlikView Documentation\Automation\APIguide.qvw")
End

Sub AttachAndQuit
On Error Resume Next
Set Qv = GetObject( , "QlikTech.QlikView" )
If Err.Number <> 0 Then
  MsgBox "Couldn't find QlikView running on this computer."
Else
  DocName = Qv.ActiveDocument.Name
  If Err.Number <> 0 Then
   DocName = ""
  End If
  MsgBox "About to close QlikView (" & DocName  & ") now..."
  Qv.Quit
  MsgBox "Closed QlikView just now."
End If
End Sub

MsgBox "Started"
CALL AttachAndQuit
MsgBox "Finished"