Forum: Poser Python Scripting


Subject: Useful Code Snippets

structure opened this issue on Jun 27, 2019 ยท 94 posts


structure posted Tue, 26 October 2021 at 12:11 AM Forum Coordinator

get machine current ID and BIOS serial number

from subprocess import check_output
def get_details():
    current_machine_id = str(check_output('wmic csproduct get uuid'), 'utf-8').split('\n')[1].strip()
    current_machine_sn = str(check_output('wmic bios get serialnumber'), 'utf-8').split('\n')[1].strip()
    return current_machine_id, current_machine_sn

cid, csn = get_details()

Locked Out