Check license programmatically

Hey Guys
I’m looking for way to check license by script, I need to check a license of 200 IS so do it by hand is a quite an issue

Many Thanks for any sugestion

Hi Marcin,

Can you please provide more information on what exactly you want to check through license file?


just an expidation date and license key

You could use wm.server.query:getLicenseSettings, wm.server.query:getLicenseDetails services. Please note that standard caveat about utilizing WmRoot services applies here as well.

1 Like

Could you please send more details how to use this services ?

You would invoke these services as any other IS services. Please try invoking these service from Designer or Admin UI and you would get the details about the information that these services provides.


To make WmRoot visible on your Desinger package navigator, add the below setting on “Settings > Extended” (refersh designer) and use the serivce as suggested by other experts. Note, this is a internal service and might change anytime without prior notice or documentation hence use it at your own risk.


Any questions?

Try this Java service to retrieve license key and expiration date.


		String licenseKey = null;
		String expirationDate = null;
		for (ComponentInfo componentInfo : KeyInfo.getComponentInfo()){
			if (componentInfo.getComponentName().equals("SalesInfo")){
				IDataCursor componentInfoCursor = componentInfo.getComponentInfo().getCursor();
				IData salesInfo = IDataUtil.getIData(componentInfoCursor, "Sales Information");
				IDataCursor salesInfoCursor = salesInfo.getCursor();
				licenseKey = IDataUtil.getString(salesInfoCursor, "License Key");
			if (componentInfo.getComponentName().equals("ProductInfo")){
				IDataCursor componentInfoCursor = componentInfo.getComponentInfo().getCursor();
				IData productInfo = IDataUtil.getIData(componentInfoCursor, "Product Information");
				IDataCursor productInfoCursor = productInfo.getCursor();
				expirationDate = IDataUtil.getString(productInfoCursor, "Expiration Date");
		IDataCursor pipelineCursor = pipeline.getCursor();
		IDataUtil.put(pipelineCursor, "licenseKey", licenseKey);
		IDataUtil.put(pipelineCursor, "expirationDate", expirationDate);