# Changelog of opsi-script package All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [4.12.22.0-1] - 2026-11-11 ### Changed - Update opsi-script to 4.12.22.0 (Jan Schneider ) - oswebservice.pas: service requests are retried with reconnect on transport failures (connection loss, timeouts, resets, changing network interfaces); failed attempts are logged with socket/TLS error details. TLS protocol and certificate errors are not retried. Connect timeout 10 s, receive timeout 60 s (120 s for log upload) unless set by omc.timeout. An explicit timeout (e.g. in opsiservicecall) is the total time budget of the call including all retries; without it the total budget is 90 s (180 s for log upload). - osmain.pas: with -opsiservice opsi-script aborts with an error message if the service is not reachable at startup (after the retries) or if backend_info fails. - osmain.pas: with /productid the first connection probe is done without retries so the fallback to https://localhost:4441/rpc starts immediately. - oswebservice.pas: log an error if a product on client update (installationStatus, actionProgress, ...) or the log upload to the service fails. - oswebservice.pas: improved logging of service connection problems: messages name the request (RPC method) and the service URL, the error class, the duration of the attempt and the reason for giving up (permanent error, no attempts left, retries disabled, time budget used up). Giving up is logged as error, a recovered connection as notice. - log file: the format "[level] [date time] [product id] message" is unchanged, but the content is more compact and consistent. Startup messages are written with their original time and level (also those from before the log file was created); the log header and footer use "Label: value" lines (script, encodings, start time, product, client, user, script mode, system info, exit code, duration, number of errors and warnings); the service connection is summarized (one "Service call: method(args) -> result, duration" line per call, slow calls as notice/warning, server IP logged once and as warning if it changes); the configuration read from the service, the log settings and the client info are logged as one line each; no plaintext password is written to the log; log level changes, registry variable changes, logged-in users and the client FQDN are logged more compactly; several typos were fixed. - oswebservice.pas: the "Service call" log line shows the parameters in detail (object keys with short values, the first items of lists, each parameter limited in length; values of keys like password, secret, token, hostkey are masked). - oswebservice.pas: network failures no longer trigger the HTTP 500 communication mode fallback. - oswebservice.pas, osmain.pas: with -opsiservice the service connection events before the log file is created (retries, failures) are written to the log as startup messages. - oswebservice.pas: removed the misleading "HTTPSender result: 500" message after a failed log upload (no response received). - osmain.pas: a client name that differs from COMPUTERNAME only by the domain part or the case is no longer reported as warning. - osparser.pas: GetIpByName on macOS returned a name instead of an IP address because a reverse lookup (dig -x) was used; it now does a forward lookup (dscacheutil). ## [4.12.21.2-12] - 2026-11-06 ### Changed - openssl libs to version 3.5.9 - uib opsiscript libs to version 4.12.21.2 ### Fixed - Corrected username detection for background install (now returns empty string instead of \ ). Note: Background install is currently unsupported. - Fixed getFileInfoMap for UTF-8 Windows environments. ## [4.12.21.1-11] - 2026-09-07 ### Fixed - custom skin know works on macOS, too. - depotpath parameter on windows: if you pass a path that contains a drive letter no drive letter is added to the path anymore. ## [4.12.21.0-11] - 2026-08-07 ### Changed - shutdown.exe and opsiwinstxmlplugin.exe are signed, too. ## [4.12.21.0-10] - 2026-06-30 ### Changed - ExecWith-Section: window is hide and not minimized. - opsi-script command line parameter "/normalwindow" works in opsi service context, too. - long path awareness is enabled - openssl libs to version 3.0.21 ### Fixed - no syntax error when using getFileInfoMap32 ## [4.12.20.2-9] - 2026-03-17 ### Fixed - ExitScript command does not exit opsi-script anymore, it stops only the execution of the product. ## [4.12.20.1-9] - 2026-03-17 ### Changed - Reverted: local/defined functions: fix in parser, parser now outputs a syntax error if the number of arguments passed is too small. (for backward compatibility reasons) ## [4.12.20.0-9] - 2026-03-11 ### Changed - openssl libs to version 3.0.19 ## [4.12.20.0-8] - 2026-03-10 ### Changed - background install (experimental feature): improved process handling ### Fixed - UEFI detection on Linux - Modifier WaitForProcessEnding: logging while waiting of process ending no longer stops after 60 seconds - function HashFromFile: improved behaviour if file is already in use - local/defined functions: fix in parser, parser now outputs a syntax error if the number of arguments passed is too small. ## [4.12.19.0-8] - 2025-12-16 ### Changed - uib opsiscript libs to version 4.12.19.0 ### Fixed - uib_exitcode.opsiscript: function isMsiExitcodeFatal_short, correct syntax (case 1618, in comment) and fix error code in log (case 1618, in LogWarrning) ## [4.12.19.0-7] - 2025-11-14 ### Added - command ExitScript ## [4.12.18.8-7] - 2025-10-14 ### Changed - uib opsiscript libs to version 4.12.18.8 - openssl libs to version 3.0.18 ### Fixed - uib opsiscript libs: uib_driver_install.opsiscript: improved import driver certificates handling, paths which contain spaces are now handled correct. - include_insert/include_append: does not replace opsi constants any more, that fixes that constants were already replaced when calling a section again through a modifier like AllUserProfiles - fixes an issue within confidential strings (https://forum.opsi.org/viewtopic.php?t=14745) ## [4.12.18.7-7] - 2025-08-27 ### Changed - new script constant %installVersion% (needed for background install) ## [4.12.18.6-7] - 2025-08-27 ### Fixed - background install: reporting product status ## [4.12.18.5-7] ### Changed - osbackgroundinstall: removeServicesBinariesFromList: fix service list handling - osmain: CheckForProcessProduct: Abort Installation on no usable installer in meta file (scriptstopped=true) ## [4.12.18.4-7] ### Changed - osmain: ProcessProdukt: update state and progress not for tacLogin - osmain: Statprogrammodes: Loginscripts: do not write login script log to Component log file (lastprodlog) ## [4.12.18.3-7] ### Fixed - fix product state unknown while install was missing - fix handling install_in_background=false - fix reset defaultloglevel for every product ## [4.12.18.2-7] ### Changed - more logging, for example for UserLoginScripts ### Fixed - fix an issue introduced in 4.12.18.1 related to some opsi constants on linux systems - fix for kill processes on french systems ## [4.12.18.1-7] ### Fixed - osfunc: getOSArchitecture: windows: use WMI CPU Architecture together with osfunc:Is64BitSystem (OS bitness) to dermine the os architecture (now arm / arm64 also supported) - osbackgroundinstall: bg-dialog: write: #@ProgramName@# bold - osbackgroundinstall: bg-dialog: no double process entries ## [4.12.18.0-7] - 2025-06-24 ### Added - background install [W] (pilot phase) ### Changed - getOSArchitecture for Windows ARM64 - openssl to version 3.0.17 ## [4.12.17.2-6] - 2025-02-13 ### Changed - openssl version to 3.0.16 ### Fixed - GetProductPropertyList(,): now correctly works with opsiconfd >= 4.3.28.15 ## [4.12.17.1-6] - 2025-01-22 ### Fixed - Logging: do not log product property states on lower log level than 9 during startup due to potential confidential content. - JSON handling: improvements in JSON handling for large and complex JSON strings including lot of special chars ## [4.12.17.0-6] - 2024-10-28 ### Changed - increased performance (in some cases) while patching user profiles [W] - opsiscript lib: uib_exitcode.opsiscript now also handles winget exitcodes, function isWingetExitcodeFatal ### Fixed - powershellcall/ExecWith powershell: avoid output with one empty string in stringlist also for a internal function may used in very rare cases ## [4.12.16.1-6] - 2024-09-13 ### Fixed - powershellcall/ExecWith powershell output: avoid output with one empty string in stringlist ## [4.12.16.0-6] - 2024-09-04 ### Changed - openssl version to 3.0.15 ## [4.12.16.0-5] - 2024-08-08 ### Changed - logging: for more clarity we remove logging indents and set the log level for (IF-)conditions to "Debug2" ### Fixed - sleepseconds: better handling of syntax and runtime errors - powershellcall/ExecWith powershell: approvments in runnning of powershell commands on machines were the powershell execution policy is "Restricted" or "AllSigned" or "RemoteSigned" - HasMinimumSpace for Linux and macOS: if drive name is empty the actual dir "." is used, if incorrectly %SYSTEMDRIVE% is used a warning is logged and as fallback the root dir: "/" is used ## [4.12.15.4-5] - 2024-07-17 ### Fixed - an issue in connection with opsi-auto-update - jsonAsArrayToStringList, stringListToJsonArray: more robust conversion of JSON array from / to string list - testsyntax: sleepseconds - no parameter error message in testsyntax mode - files section: more reliable deleting of files under windows ## [4.12.15.3-5] - 2024-07-01 ### Fixed - an error in the former hotfix (4.12.15.2-5) for High DPI screens ## [4.12.15.2-5] - 2024-06-27 ### Fixed - BatchGUI was not displayed correctly on High DPI screens ## [4.12.15.1-5] - 2024-06-19 ### Fixed - message in BatchGUI was not displayed correctly ## [4.12.15.0-5] - 2024-06-13 ### Changed - openssl version to 3.0.14 - used openssl version is logged ### Fixed - in some circumstances powershellcalls/ExecWith powershell does not work if powershell execution policy was set by "UserPolicy" to "AllSigned" or "Restricted" - TOML file handling: now correctly escape backslash ## [4.12.14.1-5] - 2024-04-24 ### Fixed - opsi-template-with-userlogin: the fqdn/clientdID is no longer empty ## [4.12.14.0-5] - 2024-04-12 ### Changed - opsiservicecall now specifies its own user agent: ProductID + ' (opsiservicecall:)' - uib opsiscript libs to version 4.12.14.0 - uib_state_and_condition.opsiscript: Update for deffunc isRebootPending(), new reg keys; documentation ### Fixed - uib_reboot_lib.opsiscript: fix in prepare_uefi_boot_to for Linux ## [4.12.13.0-5] - 2024-02-09 ### Changed - update the progress during product processing for action requests uninstall and always - isFatalError: additional log the error message in the logfile - Registry section: improvments regarding modifier AllUserProfiles(former AllNTUserDats) and for user logging scripts - opsi-script logging at startup now contains compile date information - Files section: unzipfile comment has a new parameter encoding - ExecWith section: now works with pwsh or pwsh.exe - FileExists-functions: log resulting filename ### Fixed - getMyIpByTarget on MacOS - problem with backslash(\) in a comment - Files section: "unzipfile" now handles UTF8 filenames in zip archives correct ## [4.12.12.1] - 2023-11-09 ### Fixed - opsiservicecall: using modifiers opsiclientd/opsiclientd-once now work also on Unix systems [L/M] ## [4.12.12.0] - 2023-11-03 ### Changed - powershellcall: improve robustness (ExecutionPolicy handling, old powershell versions) [W] - use new opsi 4.3 API method "configState_getValues" to read configs from service (opsi 4.3) - remove/replace deprecated API methods (opsi 4.3) - fpTOML library to new version (https://github.com/genericptr/fpTOML) - uib opsiscript libs to version 4.12.12.0 ### Fixed - local user profiles: patch local NTUSER.dat also if logged-in user could not be determined [W] - event silent install: show an individual error message in report - opsi-script will no longer run in an exception, if the setActionProgress command is used and no service is available ## [4.12.11.1] - 2023-09-22 ### Changed - updated graphics to new design Custom skin file handling ## [4.12.11.0] - 2023-07-21 ### Changed - update ssl version to openssl 3 use new product sorting algorithm (only opsi 4.3) update translations ### Fixed - correct logviewer paths ## [4.12.10.0] - 2023-06-14 ### Added - Files section: we prevent the deletion of the program files directories 'C:\Program Files\' and 'C:\Program Files (x86)\' [W] LinkFolder section: delete_element can now also delete url links if the link name ends on '.url' Registry section: allow modifier name '/AllUserProfiles' in addition to '/AllNTUserDats‘ [W] ShellInAnIcon/DosInAnIcon/ShellBatch/DosBatch sections: unify sections with 'ShellScript' as new name. The old names are discouraged. Logging: opsi-script log header now shows 'MS Windows 11.0 (10.0)' as version on Windows 11 operating systems [W] ### Changed - Turn the fatal error in case of no or an empty actions section into a warning with improved description ### Fixed - Primary sections: fix subrelease in getLinuxVersionMap [L] Registry: do not create key Wow6432Node if writing in key HKCU/Software on 64 systems [W] ## [4.12.9.1] - 2023-04-14 ### Fixed - Empty (property) values from service are now handled correct. ## [4.12.9.0] - 2023-04-11 ### Changed - replace deprecated API methods, adaptations for opsi 4.3 ### Fixed - remove possible memory leaks remove TQProgressBar to fix memory leaks fix in handling profiles, avoid empty string in the profilelist [W] ## [4.12.8.1] - 2023-04-03 ### Fixed - fix a problem in BatchGUI related to user login scripts. fix in FileGetWriteAccess, only set rigths for the current director but not for any subdirectories and files within ## [4.12.8.0] - 2023-03-17 ### Added - General: High DPI support for BatchGUI. opsi-script for aarch64 (raspi 64 bit). EXPERIMENTAL! Sections: Primary sections: New script statement 'setdebug_lib' to set/change the config opsi-script.global.debug_lib within your script. LinkFolder: delete_subfolder, better error reporting on non win32 systems. ### Fixed - removeFromListByContaining: Correct removing of the last element from the list. TOML files: Fix that all boolean values are lower case after modifications to match TOML syntax. Actions section: Log an error if an actions section is expected but not found. ## [4.12.7.5-3] - 2023-01-04 ### Fixed - Syntax Check: - include_insert/include_append: if the include file is not found, the script is not set to failed in testsyntax mode anymore. - WinBatch/DosBatch: if timeoutseconds is not an integer, the script is not set to failed in testsyntax mode anymore. - ShowBitmap (only on windows): if a slash in the parameter string without number is given, the script is not set to failed in testsyntax mode anymore, because it could be unix code (with a unix path) opsi-script libs [W/L/M]: - uib_lin_install.opsiscript: fixes in installupdates(), linuxRemoveOneOf($packagelist$ : stringlist) : string, cleanupPackageSystem() ## [4.12.7.4-3] - 2022-12-14 ### Fixed - Registry section [W]: - exportformat: hexdecimal values are now handled correctly. ## [4.12.7.3-3] - 2022-12-14 ### Fixed - Registry section [W]: - exportformat: hexdecimal values with letters throw no syntax errors anymore. opsi-script libs [M]: - uib_macosinstalllib.opsiscript: fixes whitespace handling in deffunc install_macos_app($myapp$ : string) : string. ## [4.12.7.2-3] - 2022-12-05 ### Added - Parser [W/L/M]: - Syntax Check: if testsyntax is set (via config or opsi-script-gui -> Button Test Syntax) only the syntax of the script is tested. The script is not excecuted. ### Fixed - Parser [W/L/M]: - fix in OpsiServiceCall section xml2 [W]: - attribute sequence - makeNodePathWithTextContent: - additional parameter for strictmode - use strictmode parameter for node creation LinkFolder [W/L/M]: - In DeleteShellLink use GetSpecialFolderPath instead of hard-coded path to handle all kinds of base folders ## [4.12.6.2-3] - 2022-10-19 ### Fixed - WinBatch, DOSBatch/ShellBatch/DOSInAnIcon/ShellInAnIcon [W]: fix in WaitForProcessEnding. ## [4.12.6.1-3] - 2022-08-31 ### Added - Registry section [W]: - We support the data type QWord. - New command "deleteListEntries" to remove entries from list variables. Files section [L]: copy -u for Linux. Functions: - HashFromFile(,) [W/L/M]: Supporting about 80 hashing algorithms. - GetValueFromIniFile (,
, , , []) [W/L/M]: new optional encoding parameter. EXPERIMENTAL: Statement reloadProductList [W/L/M]: Product list from the opsi-server can now be reloaded into ospi-script without the need of a reboot. The reload occured after finishing the script in which reloadProductList is called. ### Changed - Actions section [W/L/M]: - direct initialization of variables (string and stringlist) works similar to 'set' now, e.g. logging. Registry section [W]: - synchronize data type handling with the documentation, i.e. supp does not change data types. Functions: - md5fromFile() [W/L/M]: now uses internally the new function HashFromFile. ### Fixed - Interpreter [W/L/M]: If the script could not be loaded the product is not set to successful anymore. External processes[L/M]: at unix the exicodes also from child processes are caught to avoid zombies. Actions section [W/L/M]: - Parse and evaluate generic stringlist equal to createStringList for correct functionality. - Generic string list definition works the same way as the function createStringList now. - Throw an error if a variable is defined twice outside of defined functions. Files section [W/L/M]: - del command now deletes any file including hidden files. ## [4.12.5.6-3] - 2022-07-14 ### Fixed - Files section: del command with empty string e.g. del -sf "" does not create an exception anymore, gives only a warning ## [4.12.5.5-3] - 2022-07-14 ### Fixed - getLinuxVersionMap/getLinuxDistroType now correctly work on new linux distributions where lsb_release does not work anymore ## [4.12.5.4-3] - 2022-06-29 ### Fixed - config opsi-script.global.writeProductLogFile is created as boolean also if config opsi-script.global.writeProductLogFile already exists but with wrong type ## [4.12.5.4-2] - 2022-06-22 ### Fixed - powershellcall with no access string given resulted in an empty modifier instead of the default 'sysnative' config opsi-script.global.writeProductLogFile is created as boolean. ## [4.12.5.3-1] - 2022-06-09 ### Changed - powershellCall [W]: execution of powershellcall with powershell.exe -ExecutionPolicy ByPass ## [4.12.5.2-1] - 2022-06-09 ### Fixed - webservice [M]: fix on openssl. Openssl units from opsi-script 4.12.5.1 did not work correctly on MacOS. - files section [W/L/M]: handle division by zero if files to zip are empty - powershellCall [W]: correction for powershellcall without assignment ## [4.12.5.1-1] ### Added - Patches section [W]: support %userprofiledir% inside of patches section. - Files section [L]: Command CHMOD with mode formats 'ugo=+-rwx' and '-rwxrwxrwx' and with parameter '/AllSubFiles'. - functions for TOML files handling [W/L/M]: LoadTOMLFile(): StringList, GetTOMLAsStringList(): StringList, GetTOMLKeys(): StringList, GetTOMLTableNames(, ): StringList, ReadTOMLFile (): String, GetTOMLAsString(): String, GetTOMLTableAsString(,
): String, GetValueFromTOML(, , ): String, ModifyTOML(, , , ): String, DeleteTableFromTOML(, ): String, ConvertTOMLtoJSON(): String, SaveToTOMLFile (, ) : boolean, ConvertTOMLfileToJSONfile(, ): boolean. - GetRegistry functions [W]: getRegistryKeyList(, ), getRegistryVarList(, ), getRegistryVarMap(, ). - defined functions [W/L/M]: support string concatenation in call of defined functions. ### Changed - openssl [W]: update openssl on Windows to version 1.1.1n. - webservice [W/L/M]: improved debugging and error handling. - getWinProcessList [W]: use wincp2utf8 to reencode results. ### Fixed - PowershellCall [W]: now shows output also for piped commands e.g. powershellCall("Get-hotfix | Select HotfixId"). Neverthless be carefull using piped commands in powershellCall! - Files section [W/L/M]: "del" now works with wildcards. - Registry section [W]: "deletekey" now handles umlauts correctly. - Comment [W/L/M]: Syntax errors in comments were ignored so far, now they will throw a syntax error. - isProcessChildOf [W/L/M]: avoiding of an endless loop (hanging) which might occur under certain circumstances. - sub [W/L/M]: spaces in front of the lines of a sub file will not be removed any more (so that e.g. python code in an ExecWith section keeps its syntax). - opsiservicecall [W/L/M]: support newline and tab. - oswebservice: correct detection of opsi 4.0/4.1 (necessary for establishing the connection) ## [4.12.4.37-1] - 2022-02-01 ### Changed - osparser: new global constant %opsiUsertmpDir%; implements #4496 - osparser: allow json value syntax in params in opsiServiceCall: i.e. numeric/boolean values, arrays, objects and null without quotes; implements #4705 - oscertificates: finalize function for linux /mac: function pemfileToSystemStore(filename: string): boolean; function removeCertFromSystemStore(labelstr: string): boolean; function listCertificatesFromSystemStore(): TStringList; function isCertInstalledInSystemStore(labelstr: string): boolean; - new function isCertInstalledInSystem(