Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
nitishvashisht
New Contributor

How Close Qlikview Application using Batch File

Hello Friends ,

I want to close Qlikview Application using Batch file.

Tags (1)
3 Replies
ecolomer
Honored Contributor II

Re: How Close Qlikview Application using Batch File

The /r parameter should serve the purpose.

It wil save and close the doc after load.

qv.exe /r

ecolomer
Honored Contributor II

Re: How Close Qlikview Application using Batch File

But for kill the process

"taskkill /f /im qv.exe"

MVP
MVP

Re: How Close Qlikview Application using Batch File

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"