I am facing a very strange problem when I try to use AutoIT : the temporary scripts generated with AutoIT directives contain Winst directives in fact, and therefore I get an error on executing it, ruining my installation.
My code is looking like this :
Code: Alles auswählen
KillTask "AutoIt3.exe"
comment "Start autoit setup GENERIC"
ChangeDirectory "%SCRIPTPATH%\sources\Installation_generic"
ExecWith_autoit_install_generic "%SCRIPTPATH%\AutoIt3.exe" WINST /letThemGo /EscapeStrings
DosInAnIcon_install_generic
Sub_check_exitcode
KillTask "AutoIt3.exe"
includelog $AutoitLog$ "500"
KillTask "taskhost.exe"
KillTask "AutoIt3.exe"
comment "Start autoit setup ADDON"
ChangeDirectory "%SCRIPTPATH%\sources\Add_Ons\ADD_ONs\DEA288"
ExecWith_autoit_install_addon "%SCRIPTPATH%\AutoIt3.exe" WINST /letThemGo /EscapeStrings
DosInAnIcon_install_addon
Sub_check_exitcode
KillTask "AutoIt3.exe"
includelog $AutoitLog$ "500"
KillTask "AutoIt3.exe"
comment "Start autoit setup UPDATE"
ChangeDirectory "%SCRIPTPATH%\sources\Upgrade_telecharge"
ExecWith_autoit_install_update "%SCRIPTPATH%\AutoIt3.exe" WINST /letThemGo /EscapeStrings
DosInAnIcon_install_update
Sub_check_exitcode
KillTask "AutoIt3.exe"
includelog $AutoitLog$ "500"
KillTask "taskhost.exe"
Winbatch_set_rights /64Bit
comment "Set file rights"
comment "Create shortcuts"
Files_shortcutsinstall /64Bit
LinkFolder_clean
ExitWindows /Reboot
[DosInAnIcon_install_generic]
install.exe
[DosInAnIcon_install_addon]
NetzschSetup.exe
[DosInAnIcon_install_update]
setup.exe
Code: Alles auswählen
Line 1 (File "c:\opsi.org\tmp\_opsiscript_Mc12Zt61.cmd")
setup.exe
^ERROR
Error : unknown function name
But sometimes it fails with the first "ExecWith", sometimes with the second.
All I can say is that the wrong script content is the related "DosInAnIcon" content.
"/EscapeStrings" was tried by despair, but the result is the same with or without it.
"AutoIT.Exe" is really in the script directory, I put the latest exe available but the behavior is the same.
is it a parsing problem or am I writing it wrong ?
PS : I assumed "winst32.exe" is guilty so I decided to replace the "opsi-winst" directory on the client machine by the latest stable available on your repository, but the result is the same.