While you can't run qubeworker as a program, you might want have a look at this
Qube Knowledge Base article which should tell you how to set up login/logout to lock/unlock a Worker:
You can use Windows' logon/logoff scripts to automatically lock/unlock a machine when users logon/off. Basically, you'd call "qblock <machinename>" in the logon script, and "qbunlock <machinename>" in the logoff script. To set up logon/logoff scripts for local logins, you edit settings in the Windows' "group policy editor":
- Select Start Menu -> Run...
- Type "gpedit.msc", enter-- launches the group policy editor.
- In the gpedit, in the left pane, choose "User Configurations" -> "Windows Settings" -> "Scripts (Logon/Logoff)"
- On the right pane, double-click on the "Logon", choose "Add"
- In the "Script Name", type "C:\Program Files\pfx\qube\bin\qblock", or browse to the file.
- In the "Script Parameter", type "%COMPUTERNAME%".
- Click OK.
- Do the same for the "Logoff" script, but substitute "qbunlock" for "qblock".
- You also need to make sure that all users have permissions to "qblock" a machine. With qube 4.0 and later, users do have this permission by default, but to make sure, see the "qbusers --list" output, and look for the line for user "[default]". If it looks like:
---l jcg krmpbuicseyqg-vft [default]
you're good (the 4th column's "l" means the default users have lock permission).