Jump to content

License key is not seen when started from Windows Task Scheduler


Recommended Posts

Dear Everyone,

I created a script that looks through our results folder and archives files based on file age. The script itself is working flawlessly. I decided to use Task Scheduler to automate starting of the script. My problem is if GOM Inspect is started from the Task Scheduler, it doesn't see the license. I attached a few pictures too. The command I'm using is:

"C:\Program Files\GOM\2020\bin\start_gom.exe" gom_inspect PRO -eval "import AutoArchive.py"

When executing the same command from a command prompt, it does the job fine so I guess it's down to a Task Scheduler setting but I just couldn't figure it out.

Currently I'm logged in as admin, and the task is ran as admin too. As it's mentioned in the task desription, I'm killing gom_inspect.exe from another task after 90 minutes (that should be enough) to avoid re-opening issues. Interestingly the killing task also doesn't run, at leat it didn't close the app last night, even though the task history tells me that it was completed (History screenshot is about the killing task). Though I'm also not sure if exit code (2) is good or not. I tried to fill in the "Start in (optional)" field in Task Scheduler, but it didn't help. I'm running GOM Inspect 2020.

Does anyone have any idea what am I doing wrong? Beside this, the Scanbox works just fine in every aspect.

Thanks in advance,



TS issue 01.jpg

TS issue 02.jpg

TS issue 03.jpg

TS issue 04.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Hello Peter,
I think the parameters in the shortcut must be specified in a different way.
For example, if I want to start GOM Inspect Pro 2022 from a desktop shortcut with a script, the following works for me:

"C:\Program Files\GOM\2022\bin\GOMSoftware.exe" -license gom-inspection-pro -eval "gom.script.userscript.TEST()"

Behind "-license" the required licenses must be specified. Otherwise all available licenses will be used automatically.
That's why the following also works:

"C:\Program Files\GOM\2022\bin\GOMSoftware.exe" -eval "gom.script.userscript.TEST()"


In the software 2020 there are sometimes other notations.
Maybe one of the following options works for you:

"C:\Program Files\GOM\2020\bin\start_gom.exe" -eval "gom.script.userscript.AutoArchive.py()"
"C:\Program Files\GOM\2020\bin\start_gom.exe" -license inspect_all -eval "gom.script.userscript.AutoArchive.py()"
"C:\Program Files\GOM\2020\bin\start_gom.exe" -license gom-inspection-pro -eval "gom.script.userscript.AutoArchive.py()"
"C:\Program Files\GOM\2020\bin\start_gom.exe" -license gom-inspect-pro -eval "gom.script.userscript.AutoArchive.py()"

Unfortunately, I no longer have the 2020 software installed. Otherwise I could test it.
If a desktop shortcut works in the test, hopefully it should also work with the Task Scheduler.

Best regards

Link to comment
Share on other sites

  • 1 month later...

Hello Frank,

Sorry for not answering so long, unfortunately non of the above mentioned solutions worked for me. They all work until I put them into Task Scheduler, but then I still have the license error. I have a bunch of other tasks currently so it's a bit out of focus, I'll get back to the topic later. Anyway, thanks for the suggestions!

Best wishes,



Link to comment
Share on other sites

Ive never tried doing this , so this is a stab in the dark , but im wondering if there needs to be a prompt somehow to ensure the codemeter software is accessible.

Link to comment
Share on other sites


  • Create New...