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

Add or remove licenses through vbs

Hi to all, i have a question.

Is possible to manage licenses from a vbs file??. I want to create a vbs file that contains a macro to add or remove a licenses.

This vbs has 4 const variables modified when necessary:

1) User (DOMAIN\username)

2) Character that represents the type of the license (N - Named, D - Document)

3) Document path (this is used when i need to give a document license. E.G: "C:\QlikView\Customer_Care\Invoice.qvw")

4) Character that represents the operation (A - Add license, R - Remove license)

Then, i complete the values by hand, and then run the vbs...and like magic...the vbs assigns or remove the license.

I found some time ago an application written in javascript that do something very similar to this...bus it doesn´t assign or remove document licenses. I attached it to this post, is very easy to use.

Well, i need to do something like that but in vbs. So, i wrote some lines based in examples on the web:

Const QVSERVER = "dwin0315"
Const QVOPERATION = "A"
Const QVUSER = "DWIN0315\licencia"
Const QVLICTYPE = "N"
Const QVDOCUMENT = ""

'****************************************************
Sub AddLicense(User,LicType,Document)
msgbox "ehhhhh alta"
End Sub

Sub RemoveLicense(User)
msgbox "uhhhhh baja"
End Sub
'****************************************************
Set client = CreateObject("QvsRemote.Client")
client.AdminConnect QVSERVER

if QVOPERATION = "A" then
call AltaLicencia(QVUSER,QVLICTYPE,QVDOCUMENT)
else
call BajaLicencia(QVUSER,QVLICTYPE,QVDOCUMENT)
end if

But it launches an error in the creation of the object client. Anyone knows how can i do this vbs file...some information or what can i read to do this??

Thanks in advance! Regards!

Sergio

0 Replies