def installed(product_key):
    cmd = r'cscript C:\Windows\System32\slmgr.vbs /dli'
    out = __salt__['cmd.run'](cmd)
    return product_key[-5:] in out
Check to see if the product key is already installed.
dataset/ETHPy150Open saltstack/salt/salt/modules/win_license.py/installed