send activation key with autoit

Hello everyone,
in my new software packaging installation, the application requires a licensed activation key wish is already provided, using " winwaitactivate/winactivate " send key in my script doesn’t work properly, installation steps works fine but the activation key won’t be written as i hoped, any one could help please?

Do you have a command-line that does your install/license/configuration silently (i.e. no pop-ups or other interaction)?

Is the license per machine or per user?

1 Like

What OS is this software being installed on? I assume Windows?

What is the software?

In my experience, it is best to figure out where the license info is stored, in the registry or file or similar, then just write the license info there directly. Alternatively some software provides a way to license it on the command line either during install or after the fact. These are all better and more consistent methods than using autoit that can be done easier.

Doing the autoit approach almost always requires running the software and the autoit as the current user, and only if a user is logged on, and it will be visible to the end user when it happens, which sucks. You could try to run the software hidden, license it with autoit, then close it all as the current user, but running it as hidden can generally break autoit approaches.

I would strongly recommend against any approach that uses autoit or autohotkey unless there is absolutely no other way to do it, and in my experience, that is very very rare. (but does exist)

I would also recommend asking the vendor for enterprise deployment and licensing documentation and if they have a script to license the software on the command line. That is a very good place to start from. Otherwise if they do not or will not provide it, then look at how others are licensing the software automatically. Once you see how it is done through either commands or reg edits, that can be adapted to be done through BigFix very easily, just let us know how it is done and we can help.

If you let us know what software it is, we might already have something for it, or can help look up the best approach.

Related:

hello,
As a start the activation key is provided by the software owner him self , it’s for engineering software called “Beijer_iX Developer_2_40_SP4Developer” , the same key should be executed for all end users once the application is launched that’s why he asked to be written automatically and not manually.
install/license/configuration is silent , her’s a pick on my script:

#include <GUIConstants.au3>
#include <file.au3>
#AutoIt3Wrapper_icon=\mqde01epmcorelab\depot__au3_sources__templates\package.ico ;package icon
#AutoIt3Wrapper_OutFile=Activation.exe ;compile script as MQSetup.exe
#AutoIt3Wrapper_UseUPX=n ;no compression

$Product = (“Beijer_iX Developer_2_40_SP4”)

$LogDir = (“C:\Windows\MQ\logs”) ;path to the log dir
If Not FileExists($LogDir) Then DirCreate($LogDir)
If Not FileExists($LogDir & “\install”) Then DirCreate($LogDir & “\install”)
If Not FileExists($LogDir & “\uninstall”) Then DirCreate($LogDir & “\uninstall”)
If Not FileExists($LogDir & “\mq-tools”) Then DirCreate($LogDir & “\mq-tools”)

$LogFile_install_mqs = ($LogDir & “\install” & $Product & “_activation_mqs.log”) ;log file of the MQSetup.exe script (install)
_FileWriteLog($LogFile_install_mqs, “start activation of " & $Product & " using the logged in user context”)
_FileWriteLog($LogFile_install_mqs, "Execute " & $Product)
$rslt = Run(‘C:\Program Files (x86)\Beijer Electronics AB\iX Developer 2.40 SP4\Bin\NeoIDE.exe /silent’)
If $rslt = 0 Then
_FileWriteLog($LogFile_install_mqs, "failed to execute " & $Product & " result : " & $rslt & " extended error : " & @error)
exit(9999)
EndIf
_FileWriteLog($LogFile_install_mqs, $Product & " successfully executed … Process ID : " & $rslt)

$rslt = WinWaitActive(“iX Developer 2.40 SP4”)
Sleep(15000)
Send("!n")
Send("{TAB}")
Send("{TAB}")
Send("{Enter}")
Send("")
Send ("
-")
Send ("
-")
Send ("
")
Send("-9C")
Send(“07”)
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")