0

My office uses program licenses that have to be manually activated and returned, and people tend to forget to do this when they go home for the day, resulting in most licenses tending to be unavailible for anyone coming in early next morning and needing a license to work.

Screenshot of the License Manager Window

I've been trying to create an automatic BAT script that is to open the license manager, search for the specific line "Activated locally", select that line (if found) and return it, then close the manager. Problem is, I'm not that familiar with complex BAT scripting and I need some tips on what functions I could use for this purpose. This BAT file is to be automatically run when someone logs out from or shuts down their computer.

This far, I've only managed to start the program itself:

START /WAIT "LicenseManagementUtility.exe" /D "C:\Program Files\Common Files\MagiCAD Shared\License Management Utility" /B "LicenseManagementUtility.exe" /MORE
FIND "Activated locally"

If I can just get the select line bit to function, I could probably work out the rest from there.

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79
  • `find.exe`/`findstr.exe` utilities can search for a text string in a _plain text_ file or in `STDOUT` stream (generally, `cmd` can't interact a graphical user interface of _any_ GUI-based application). – JosefZ Jan 23 '20 at 15:40
  • Welcome to ServerFault. You will likely need to talk to the maker of LicenseManagementUtility.exe to find out if they have a command-line capability. As JosefZ says, it's highly unlikely you'll be able to get a `cmd` program to interact with a GUI. If you only need to send keystrokes, you might be able to do something with AutoHotKey. But if you need to find something first, it'll probably need the cooperation of the target program. – Doug Deden Jan 24 '20 at 02:03

0 Answers0