.. Reminder for header structure: Parts (H1) : #################### with overline Chapters (H2) : ******************** with overline Sections (H3) : ==================== Subsections (H4) : -------------------- Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^ Paragraphs (H6) : """"""""""""""""""""" .. |ok| image:: wapt-resources/ok.png :scale: 5% :alt: feature available .. |nok| image:: wapt-resources/nok.png :scale: 5% :alt: feature not available .. |enterprise_feature| image:: wapt-resources/wapt_enterprise.png :scale: 3% :alt: WAPT Enterprise feature only .. meta:: :description: Using WAPT with the Command Line :keywords: command line, WAPT, CLI, documentation .. _wapt_cli: ################################ Using WAPT with the Command Line ################################ The WAPT agent provides a command line interface utility :program:`wapt-get`. .. figure:: wapt-resources/command_line_interface.png :align: center :alt: The Windows Command Line utility The Windows Command Line utility .. note:: * By default, command-line actions in WAPT are executed with the rights of the user who launched the :program:`cmd.exe`. * If the :program:`cmd.exe` has not been launched with :term:`Local Administrator` privileges, the command will be passed on to the :program:`waptservice`. * For security reasons, some actions will require a login and a password. * Only :term:`Local Administrators` and members of the *waptselfservice* Active Directory security group are allowed. * To force using the WAPT service as a :term:`Local Administrator`, simply add *-S* after :code:`wapt-get.exe`. .. _wapt_cli_common_commands: ************************************************************* Using the more common functions in WAPT with the command line ************************************************************* wapt-get install ================ The :code:`wapt-get install ` command launches the installation of a package. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. .. hint:: It's possible to install several packages with the same command : .. code-block:: wapt-get install package1 package2 .. note:: If the package has not been downloaded to cache, :code:`install` will first download the package to cache, then it will install it. .. attention:: Installing a WAPT package with :code:`install` does not add the package as a dependency to the host. The package is installed on the machine, but if the computer is re-imaged, the package will not be reinstalled automatically. The command :code:`wapt-get install tis-firefox` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini installing WAPT packages tis-firefox https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 14121562 / 54313787 (26%) (24624 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 33131357 / 54313787 (61%) (29414 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 50511741 / 54313787 (93%) (30412 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 54313787 / 54313787 (100%) (30360 KB/s) Installing tis-firefox(=94.0.1-106) Installing: Firefox_Setup_94.0.1.exe Waiting for key key Mozilla Firefox 94.0.1 (x64 en-US) to appear in Windows registry Delete C:\Program Files (x86)\wapt\cache\tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt Results : === install packages === tis-firefox [x64_en_PROD] | tis-firefox (94.0.1-106) | tis-firefox (50.0.2-73) wapt-get update =============== The :code:`wapt-get update` command allow to update the list of available packages. The local WAPT agent will download :file:`Packages` file from the private repository and compare it to its local database. * If new updates are available, the WAPT agent switches the packages status to **TO-UPGRADE**. * If new software have been added on the repository, they become downloadable by the WAPT agent. .. note:: The :code:`wapt-get update` command does not download packages, it only updates the local database of packages. The command :code:`wapt-get update` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Update package list from https://srvwapt.mydomain.lan/wapt, https://srvwapt.mydomain.lan/wapt-host Total packages : 8 Added packages : Removed packages : Discarded packages count : 6 Pending operations : install: upgrade: additional: remove: immediate_installs: Repositories URL : https://srvwapt.mydomain.lan/wapt https://srvwapt.mydomain.lan/wapt-host wapt-get upgrade ================ The command :code:`wapt-get upgrade` allows to launch the installation of packages waiting to be upgraded or waiting to be installed. The local WAPT agent downloads if necessary WAPT packages in its local cache then installs them. .. hint:: It's strongly advised to launch a :code:`wapt-get update` command before launching a :code:`wapt-get upgrade` command; Without previously launching a :code:`update`, the WAPT agent will install nothing; The command :code:`wapt-get upgrade` returns: .. code-block:: console Installing tis-mumble Shutting down Mumble installing Mumble 1.2.3 === install packages === tis-mumble wapt-get remove =============== The :code:`wapt-get remove ` command removes a package. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. .. attention:: Removing a WAPT package with :code:`remove` does not remove the package dependency on the host. **The package will effectively be uninstalled from the machine, but it will automatically be reinstalled on the next upgrade.** To completely remove a package from a host, do a :code:`remove` for the targeted package, then edit the host configuration via the WAPT console to remove the package dependency on the host. The command :code:`wapt-get remove tis-firefox` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Removing tis-firefox ... Waiting for the removal of key key Mozilla Firefox 94.0.1 (x64 en-US) from Windows registry === Removed packages === tis-firefox wapt-get uninstall ================== The :code:`wapt-get uninstall ` command run the uninstall package function if exist. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. .. attention:: Run the uninstall package function doesn't remove the package on the host. The command :code:`wapt-get uninstall tis-adwcleaner` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Uninstalling tis-adwcleaner ... None Uninstallation done wapt-get forget =============== The :code:`wapt-get forget ` command install status for package from local database. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. .. attention:: Forgetting the package doesn't uninstall the package. The command :code:`wapt-get forget tis-adwcleaner` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini === Packages removed from status === tis-adwcleaner wapt-get audit ============== The :code:`wapt-get audit []` command run the audit function. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. If the argument is defined, the :code:`wapt-get audit []` command runs the package audit function. Also, the :code:`wapt-get audit` command runs the audit function for all packages installed on the host. The command :code:`wapt-get uninstall tis-firefox` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Auditing tis-firefox ... Auditing tis-firefox OK: Uninstall Key Mozilla Firefox 94.0.1 (x64 en-US) in Windows Registry. tis-firefox -> OK wapt-get show ============= The :code:`wapt-get show ` command displays informations stored in the :file:`Packages` index file. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. If several versions of a package are available on the repository, every version of the package will be displayed. The command :code:`wapt-get show tis-7zip` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Display package control data for tis-7zip package : tis-7zip version : 19.00-25 architecture : x64 section : base priority : optional name : 7-Zip categories : Utilities maintainer : WAPT Team,Tranquil IT,Jimmy PELÉ description : 7-Zip is a free and open-source file archiver with a high compression ratio depends : conflicts : maturity : PROD locale : all target_os : windows min_wapt_version : 1.7 sources : https://www.7-zip.org/download.html installed_size : impacted_process : 7zFM,7z,7zG description_fr : 7-Zip est un logiciel gratuit et open source d'archivage de fichiers avec un taux de compression élevé description_pl : description_de : 7-Zip ist ein Datenkompressionsprogramm mit einer hohen Kompressionsrate description_es : 7-Zip es un archivador de ficheros con una alta relación de compresión description_pt : O 7-Zip é um compactador de arquivos com alta taxa de compressão description_it : description_nl : description_ru : 7-Zip свободный файловый архиватор с высокой степенью сжатия данных audit_schedule : editor : Igor Pavlov keywords : 7zip,7,zip,7-zip,file,archiver,high,compression,ratio licence : LGPL homepage : https://www.7-zip.org/ package_uuid : dc66ccd1-d987-482e-b792-04e89a3803f7 valid_from : valid_until : forced_install_on : changelog : https://www.7-zip.org/history.txt min_os_version : 5.0 max_os_version : icon_sha256sum : eddc038d3625902b6ddeaabd13dd91529e8d457ffbd0c554f96d343ae243a67a signer : documentation signer_fingerprint: 3f2c0a02231a36eafa1f67905f5c083e4b66cb59942f69cbd231d778a1a25b3d signature : QzhPeZFrRbjcGzfqRpoWsDP9Plaz6BBVlL3adq/MRM19D61+Aez/JiA8skriCgwSErJXbxOPfxusVqqIpEtyoqh/RlRcnmgCQqk2Fig4gmxpz0rHKokukPQlRk+HdC/uByxSjfp9oXuB3PVG2PZAFifjVBtjEX2QmV+OY6NdMI9dtkxCsn1Xotn2qhu2bwbJWQ0s51rD9emWuQR7l/8WXl+HoquuRho4aCeAOYd6Nta9ktVSR2FM6OO5ZeUOg4fsnMg+hwp2MlDOmBHX37aJm3hLYkGP2xWjpL9YDDxI7ruRXSHyT7YmbILrS0h1m3PTOiV8jy1hTLDgKVeptPWVgA== signature_date : 2021-11-19T16:15:42.019196 signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes filename : tis-7zip_19.00-25_x64_windows_0f4137ed1502b5045d6083aa258b5c42_5.0_PROD_a10c57d7848cf7b145d6cd64bf4d5389.wapt size : 1704227 md5sum : a10c57d7848cf7b145d6cd64bf4d5389 OK Package control signature checked properly by certificate documentation (fingerprint: 3f2c0a02231a36eafa1f67905f5c083e4b66cb59942f69cbd231d778a1a25b3d ) .. note:: It's possible that a warning message is displayed with this command, for example : .. code-block:: WARNING: control data signature can not be validated with certificates [] This is normal if your certificate is not trusted. Only :file:`control` file is available for :code:`wapt-get show` not all package. If you want correct check the package correctly, download it to the cache an run the :code:`wapt-get show` on local package. For example : .. code-block:: wapt-get download tis-7zip wapt-get show "C:\Program Files (x86)\wapt\cache\tis-7zip_19.00-25_x64_windows_0f4137ed1502b5045d6083aa258b5c42_5.0_PROD_a10c57d7848cf7b145d6cd64bf4d5389.wapt" wapt-get show-params ==================== The :code:`wapt-get show-params ` command return lists of :ref:`parameters ` that would be passed to the :code:`wapt-get install --params=PARAMS` command. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. The command :code:`wapt-get show tis-7zip` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini tis-7zip : {True, 'documentation': True} wapt-get show-log ================= The :code:`wapt-get show-log ` command return the latest audit logs stored in the agent's local sqlite database. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. The command :code:`wapt-get show tis-7zip` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Package: tis-7zip (21.06-34) PROD ------------------- Status: OK Installation log: ------------------- Installing: 7z2106-x64.msi Waiting for key key {23170F69-40C1-2702-2106-000001000000} to appear in Windows registry Installation Parameters: ------------------- {} Last audit: ------------------- Status: OK Date: 2022-01-06T10:32:38.698272 Output: Auditing tis-7zip OK: Uninstall Key {23170F69-40C1-2702-2106-000001000000} in Windows Registry. Next audit on: 2022-01-06T10:32:38.698272 .. _wapt_get_search: wapt-get search =============== The :code:`wapt-get search` command allows to search for one or more package in the repositories. .. warning:: This command returns only the packages avaible for the host executing the command. If another locale, os, architecture or maturity is present in the repository, it's not listed. The search command takes one argument to be looked up in package name and description. The command :code:`wapt-get search "Firefox"` returns (for example): .. code-block:: console status package version target_os architecture maturity locale description repo ---------- ------------------ ---------- --------------- ---- ----- --- -------------------------------------------------------------------------------- ---------- - tis-firefox 94.0.2-106 windows x64 PROD fr Mozilla Firefox est un navigateur web gratuit et open source wapt I tis-config-firefox 68.3-6 windows all PROD Configuration for Mozilla Firefox - The package will not have any effect if an* wapt I tis-firefox-esr 91.3.0-105 windows x64 PROD fr Mozilla Firefox Extended Support Release (ESR) est une version officielle de* wapt .. list-table:: :header-rows: 1 :stub-columns: 1 :widths: auto :align: center * - Value - status - package - version - target_os - architecture - maturity - locale - description - repo * - Description - Packages installation status - Name of package - Version of package - Target OS (if defined) - Architecture of CPU (if defined) - Maturity of package (if defined) - Locale of package (if defined) - Description of package - Folder of package on the server .. note:: The value of :guilabel:`status` defines the installation status as follow * :code:`-` for not installed * :code:`I` for installed wapt-get download ================= The :code:`wapt-get download ` command downloads the WAPT package to the local cache located at :file:`C:\\Program Files\\wapt\\cache`. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. The command :code:`wapt-get download tis-7zip` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Downloading packages tis-7zip(=19.00-25) https://srvwapt.mydomain.lan/wapt/tis-7zip_19.00-25_x64_windows_0f4137ed1502b5045d6083aa258b5c42_5.0_PROD_a10c57d7848cf7b145d6cd64bf4d5389.wapt : 1704227 / 1704227 (100%) (11804 KB/s) Downloaded packages : C:\Program Files (x86)\wapt\cache\tis-7zip_19.00-25_x64_windows_0f4137ed1502b5045d6083aa258b5c42_5.0_PROD_a10c57d7848cf7b145d6cd64bf4d5389.wapt wapt-get download-upgrade ========================= The :code:`wapt-get download-upgrade` command downloads packages to be upgraded to the local WAPT cache :file:`C:\\Program Files (x86)\\wapt\\cache`. The command :code:`wapt-get download-upgrade` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 18466658 / 54313787 (34%) (32089 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 36390179 / 54313787 (67%) (32693 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 52684289 / 54313787 (97%) (31564 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 54313787 / 54313787 (100%) (30747 KB/s) === downloaded packages === C:\Program Files (x86)\wapt\cache\B8D346E7-DDDB-0013-5A8A-425CF3B6199E.wapt C:\Program Files (x86)\wapt\cache\tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt wapt-get list ============= The :code:`wapt-get list` command lists WAPT packages that are installed on the computer. The command :code:`wapt-get list` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini package version install_status install_date description package_uuid ------------------------------------ ---------- ---------- ---------------- -------------------------------------------------------------------------------- ------------------------------------ tis-7zip 21.06-34 OK 2021-12-10T14:57 7-Zip is a free and open-source file archiver with a high compression ratio 717a30cc-0d44-42d1-9538-0f2f298d8603 tis-firefox 94.0.1-106 OK 2021-12-10T14:58 Mozilla Firefox is a free and open-source web browser 5a91f54a-3e27-44cf-a2b6-6b84012aa3a2 .. list-table:: :header-rows: 1 :stub-columns: 1 :widths: auto :align: center * - package - version - install status - install_date - description-S tasks - package_uuid * - Package Name - Package Version - Installation status - Date and time of installation - Package description - Unique UUID of the package wapt-get list-upgrade ===================== The :code:`wapt-get list-upgrade` command lists WAPT packages that are need to be upgraded on the host. The command :code:`wapt-get list-upgrade` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini === upgrade packages === tis-notepadplusplus(=8.2-10) wapt-get -S tasks ================= The :code:`wapt-get -S tasks` command check if some tasks are running or pending in queue. The command :code:`wapt-get -S tasks` returns: .. code-block:: console About to speak to waptservice... Running task 14: Uninstall of tis-vlc (task #14), status: .. _wapt_cli_special_commands: ************************************* Using special Command Lines with WAPT ************************************* wapt-get clean ============== The :code:`wapt-get clean` command removes packages from the :file:`C:\\Program Files (x86)\\wapt\\cache` folder. The :code:`wapt-get clean` command is launched after each upgrade to save disk space. The command :code:`wapt-get clean` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Removed files: C:\Program Files (x86)\wapt\cache\tis-mumble_1.2.3-1_all.wapt C:\Program Files (x86)\\wapt\cache\tis-vlc_1.2.3-2_all.wapt wapt-get upgradedb ================== The :code:`wapt-get upgradedb` command upgrades the local WAPT database schema if necessary. The command :code:`wapt-get upgradedb` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini WARNING upgrade db aborted: current structure version 20210420 is newer or equal to requested structure version 20210420 No database upgrade required, current 20210420, required 20210420 wapt-get add-upgrade-shutdown - wapt-get remove-upgrade-shutdown ================================================================ These 2 commands modify this file : :file:`C:\Windows\System32\GroupPolicy\Machine\Scripts\scripts.ini`. * The :code:`wapt-get add-upgrade-shutdown` command adds a :program:`waptexit` local security policy object, enabling the execution of :program:`waptexit` at system shutdown. The command :code:`wapt-get add-upgrade-shutdown` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini 0 The :file:`scripts.ini` contains : .. code-block:: ini [Shutdown] 0CmdLine = C:\Program Files (x86)\wapt\waptexit.exe 0Parameters = * The :code:`wapt-get remove-upgrade-shutdown` command removes the :program:`waptexit` local security policy object, disabling the execution of :program:`waptexit` during system shutdown. The command :code:`wapt-get add-upgrade-shutdown` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini 0 The :file:`scripts.ini` contains : .. code-block:: ini [Shutdown] wapt-get register ================= The :code:`wapt-get register []` command reports the computer hardware and software inventory to the WAPT inventory server. .. hint:: You can pass a description as an argument to the :code:`register`, that description will be displayed in the WAPT console in the column :guilabel:`description`. You may benefit from WAPT to improve your IT management by affecting a username or a computer serial as descriptions for your hosts. .. note:: If the host is already registered, the new execution with a description updates the registered information. It's not necessary to define a description for register the host with the command line. The command :code:`wapt-get register "John Doe PC"` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Registering host against server: https://srvwapt.mydomain.lan Host correctly registered against server https://srvwapt.mydomain.lan. wapt-get unregister =================== The :code:`wapt-get unregister` command remove the computer hardware and software inventory to the WAPT inventory server. The command :code:`wapt-get unregister` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Unregistering host from server: https://srvwapt.mydomain.lan Please get login for api/v3/hosts_delete:admin Password: Host correctly unregistered against server https://srvwapt.mydomain.lan. wapt-get inventory ================== The :code:`wapt-get inventory` command displays all local inventory information in JSON format. The command :code:`wapt-get inventory` returns (in part): .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini { "host_info": { "description": "John Doe PC", "system_manufacturer": "Xen", "system_productname": "HVM domU", "computer_name": "Documentation", "computer_fqdn": "Documentation.srvwapt.mydomain.lan", "dnsdomain": "mydomain.lan", "workgroup_name": "Documentation", "domain_name": null, "domain_controller": null, "domain_controller_address": null, "domain_info_source": "history", "networking": [ { "iface": "{085AB96368A-05A3B96-43EC-B773-0C0BB96794D9}", "mac": "a2:1d:6e:fc:8d:e6", "addr": [ { "addr": "192.168.0.1", "netmask": "255.255.255.0", "broadcast": "192.168.0.255", "connected": true }, { "addr": "fe80::2437:567f:79c8:f964", "netmask": "ffff:ffff:ffff:ffff::/64", "broadcast": "fe80::ffff:ffff:ffff:ffff%3", "connected": true } ] } ], "gateways": [ "192.168.0.254" ], "dns_servers": [ "192.168.0.11" ], "connected_ips": [ "192.168.0.1", "fe80::2437:567f:79c8:f964" ], "mac": [ "a2:fc:1d:6e:8d:e6" ], ... wapt-get update-status ====================== The command :code:`wapt-get update-status` resends local status to the WAPT inventory server. .. note:: If a hardware component has changed on the computer, :code:`update-status` would not report that information back to the WAPT inventory server. To do so, the command to be used is :code:`inventory`. The command :code:`wapt-get update-status` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Updated host status correctly sent to server https://srvwapt.mydomain.lan. {'success': True, 'msg': 'update_host', 'result': {'uuid': 'B8D346E7-DDDB-0013-5A8A-425CF3B6199E', 'computer_fqdn': 'documentation.mydomain.lan', 'status_hashes': {'dmi': '124b8bcef5b690afea7cf8001351a22132885123', 'wmi': 'ae5dbb5627b7b3a5a31d5914a9dbf48b85b133da', 'host_info': 'e737a82da15fbe9cae88ba9b4a9662a73657d959', 'audit_data': None, 'wapt_status': 'bcb76ad07cf1b6f814082ec5a58c4fee0364a640', 'audit_status': 'c34adb535c711b59d4408f00f77b7392687d7e56', 'host_metrics': '9fc68bd98c82e0e9bece0ce3afaeeb63a3ed1db1', 'waptwua_status': '4f9dcf0af339ce28d7354283fd4e6bdaf17b85c8', 'waptwua_updates': 'c5cf38908fc549f499ade5b17ce221ff0ced377f', 'wuauserv_status': '7c30215c3c34566e5b0c69c9e1dbfe3e6117b837', 'host_capabilities': 'c31286122a213f3bb313531541582bb2ba1d0a81', 'installed_packages': '3279f3bf4d5ed5086b198fa94a6a6f422f519ab3', 'last_update_status': '347c5a8c01e182f1e03e5c9d0fe07dd87ab79153', 'installed_softwares': 'd582a6f7325af35eae17cb7ecdca59ef0d137dda', 'authorized_certificates': '2974f9535f813fc454b735193c31828b132a6ba0', 'waptwua_updates_localstatus': 'c5cf38908fc549f499ade5b17ce221ff0ced377f'}, 'server_uuid': '82295c4d-4944-11ec-bac6-a25b5d7da3d5'}, 'request_time': 0.046843767166137695} wapt-get setlocalpassword ========================= The :code:`wapt-get setlocalpassword` command allows to define a local password for WAPT package installations. The command :code:`wapt-get setlocalpassword` returns: .. code-block:: console Local password: Confirm password: Local auth password set successfully wapt-get reset-uuid =================== The :code:`wapt-get reset-uuid` command retrieves the host :term:`UUID` from BIOS and resends it to the WAPT inventory server. The command :code:`wapt-get reset-uuid` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini New UUID: B0F23D44-86CB-CEFE-A8D6-FB8E3343FE7F wapt-get generate-uuid ====================== The :code:`wapt-get generate-uuid` command creates a new host :term:`UUID` and resends it to the WAPT inventory server. To be uses if you have a :ref:`bios UUID bug `. The command :code:`wapt-get generate-uuid` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini New UUID: RND-0279A1F4-BBBE-43AE-A591-F82652E0104B .. note:: All randomly generated UUID put an RND- in front of. wapt-get get-server-certificate =============================== The :code:`wapt-get get-server-certificate` command downloads the SSL certificate from the WAPT Server to use HTTPS to communicate with the WAPT Server. The downloaded certificate is stored in :file:`C:\\Program Files(x86)\\wapt\ssl\\server`. The command :code:`wapt-get get-server-certificate` returns: .. code-block:: console Server certificate written to C:\Program Files (x86)\wapt\ssl\server\srvwapt.mydomain.lan.crt wapt-get enable-check-certificate ================================= The :code:`wapt-get enable-check-certificate` command downloads the SSL certificate from the WAPT Server and enables secured communication with the server. It's used for :ref:`activating the verification of the SSL / TLS certificate ` The command :code:`wapt-get enable-check-certificate` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Server certificate : C:\Program Files (x86)\wapt\ssl\server\template-auto.test.lan.crt Certificate CN: template-auto.test.lan Pining certificate C:\Program Files (x86)\wapt\ssl\server\template-auto.test.lan.crt wapt-get check-upgrades ======================= The :code:`wapt-get check-upgrades` command show last updates/upgrade status on the host. The command :code:`wapt-get check-upgrades` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini { "running_tasks": [], "errors": [], "date": "2022-01-06T14:09:26.554391", "upgrades": [ "test-notepadplusplus(=8.2-10)" ], "pending": { "install": [], "upgrade": [ "test-notepadplusplus(=8.2-10)" ], "additional": [], "remove": [], "immediate_installs": [] } } wapt-get add-licence ==================== The :code:`wapt-get add-licence` command add the licence on the server. The command :code:`wapt-get add-licence` returns: .. code-block:: console Using config file C:\Program Files (x86)\wapt\wapt-get.ini Server: https://srvwapt.mydomain.lan Server UUID: 82295c4d-4944-11ec-bac6-a25b5d7da3d5 Server CABundle: 0 {"licence_nr":"6f011e23-cb70-40a4-b340-0d18ae1e2f02","product":"WAPT Enterprise","features":["full"],"licenced_to":"documentation","domain":"","contact_email":"documentation@tranquil.it","count":"10","valid_from":"2021-06-14T00:00:0","valid_until":"2022-01-12T00:00:0","renewal_url":null,"signed_attributes":["licence_nr","product","features","licenced_to","domain","contact_email","count","valid_from","valid_until","renewal_url","signed_attributes","signer","signature_date","signer_certificate","server_uuid"],"signer":"","signature_date":"2022-01-13T16:38:56","signer_certificate":"-----BEGIN CERTIFICATE-----\nMIIEIjCCAwqgAwIBAgIUIOMdx8FmRdmCNTHxOfKecSp/cAAwDQYJKoZIhvcNAQEL\nBQAwgZcxCzAJBgNVBAYTAkZSMSIwIAYDVQQHDBlTYWludCBTZWJhc3RpZW4gc3Vy\nIExvaXJlMRwwGgYDVQQKDBNUcmFucXVpbCBJVCBTeXN0ZW1zMSAwHgYDVQQDDBdy\nZWxpY2VuY2luZy50cmFucXVpbC5pdDEkMCIGCSqGSIb3DQEJARYVdGVjaG5pcXVl\nQHRyYW5xdWlsLml0MB4XDTIxMDYwODE0MTQ0MVoXDTMxMDYwNjE0MTQ0MVowgZcx\nCzAJBgNVBAYpk6dZrIrw9Kb5hee+1EgqEbudCBTZWJhc3RpZW4gc3VyIExvaXJl\nMRwwGgYDVQQKDBNUcmFucXVpbCBJVCBTeXN0ZW1zMSAwHgYDVQQDDBdyZWxpY2Vu\nY2luZy50cmFucXVpbC5pdDEkMCIGCSqGSIb3DQEJARYVdGVjaG5pcXVlQHRyYW5x\ndWlsLml0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzT43W8OhWXAe\nhDB+IWwQm9IGGdR0VY/klKcSheo/8jGlNziyH6BANhjFKYNX9UtQ+ghzv6BGfSTH\nyua1aXEQM89sSKFOoJztoD1L9FZtuWQb/vfLWkisP8fRPvH4B/tYG+5nchGa6+6r\nqGSGSpWcnj6CovgQR01ATUuHN3NV1N7q48hBT/ZT9R5U3sEi+hNK4eRIeZ220Pzm\nDoNGkVKlEiczgXuM77ezYp8UWvpk6dZrIrw9Kb5hee+1EgqEbgVmdARoaOPGTK8h\n8VW+milWsl4TEY19kxXWvva+M6wX00ipJ2LxEiu5+dlOok9E8i405UTNE7oSVYsF\n90/6S3C4twIDAQABo2QwYjAPBgNVHRMBAf8EBTADAQH/MCAGA1UdJQEB/wQWMBQG\nCCsGAQUFBwMDBggrBgEFBQcDAjAdBgNVHQ4EFgQUpRT6Co2uoWZMCwP7FKiF73+j\nfAEwDgYDVR0PAQH/BAQDAgHWMA0GCSqGSIb3DQEBCwUAA4IBAQAdXX5IkpuH/Gek\nPPHC4KvE/6GsU0kqLI1w5ML5pbF1zyCCL0nm4f8w2JJIJ2Ycdb4QVD27kJqgZcH1\nniYQ3RCIh6aasS8qpCOf90KkpvKMJiyk/ra7I6NSgPut4ErkoxUWocgF6SNFEjwB\naqUZY//Hkoqk2dXqdujLVGJfBpX95ZJ9PmFNLfsyUsvu1WcFMb0En0EUO74Mq4M3\nKo2S86G9pEDKooaN5Vq19biReOwQYpX1YlSLtrxFx8AM87auQgaD8EWSdA1q2ycN\n8ZnmXGxAhDv8hmE2Fv0x0t3hzYXxxcv1ZjYWRHlMUl/buWQQ35u9MFkjh7YZlTlM\nb9wjtN+W\n-----END CERTIFICATE-----\n","signature":"J7DZ+mja7zGghYFCDKh8WIxzzdhKPeoNswWjnKZziT+ddpoRdg45kZz4E8PxMIUzhTI8WIxzzdhKPeoNswrICpQ8t5kepzovZpoONwjgOQ5PoCAgDOE3NV+larFrMdkAjCpx4tV86n5gyXHJnlnH1OXCpKUBiIiP/de18bEgSSlgjXgE/wr2ZfclsRsRRfsRbGSterRKQcthNDrFlf8RjH5cpDnDvMJ+qJtTsqxA13/WT2NS2uNWZI93si/9mowWY8MdT/PZjosciCqijbq4oa+/FrPsALhUOtcGE9JylwknszUD5Ayfh+9sNLLxsG6eT0JlnNgf4nx9mXAu4GBg==","server_uuid":"82295c4d-4944-11ec-bac6-a25b5d7da3d5"} Login to server api/v3/licences Waptserver https://srvwapt.mydomain.lan Admin User () :admin Waptserver Password: ************ Licence properly activated on server wapt-get check-licences ======================= The :code:`wapt-get check-licences` command shows the licences registered on the server. The command :code:`wapt-get check-licences` returns: .. code-block:: console Using config file C:\Program Files (x86)\wapt\wapt-get.ini Server: https://srvwapt.mydomain.lan Server UUID: 36bf01bc-c8f5-11eb-bf04-36127be97253 Server CABundle: 0 Total licences count: 10 Licenced to: documentation Valid Nr:b7b6e537-3cb7-4d9a-3cb7-2448020e2e51 Count:10 From:2022-01-13T00:00:0 Expire:2023-01-12T23:59:0 Server:36bf01bc-c8f5-11eb-bf04-36127be97253 Licencee:documentation wapt-get dnsdebug ======================= The :code:`wapt-get dnsdebug` command shows the local dns informations. The command :code:`wapt-get dnsdebug` returns: .. code-block:: console DNS Server : dns.mydomain.lan DNS Domain : mydomain.lan Main repo url: https://srvwapt.mydomain.lan/wapt wapt SRV: [] waptserver SRV: [] CNAME: [] ********************************************* Using the Command Line for user session setup ********************************************* wapt-get session-setup ====================== The :code:`wapt-get session-setup []` command launches user level customizations of installed WAPT packages. It's defines at the :ref:`session-setup ` function in the :file:`setup.py` file. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. .. note:: The argument *ALL* will launch :code:`session-setup` for all installed WAPT packages. The command :code:`wapt-get session-setup ALL` returns: .. code-block:: console Configuring tis-7zip ... No session-setup. Done Configuring tis-ccleaner ... Already installed. Done Configuring tis-vlc ... No session-setup. Done Configuring mdl-tightvnc ... No session-setup. Done Configuring tis-brackets ... No session-setup. Done Configuring mdl-firefox-esr ... No session-setup. Done Configuring tis-paint.net ... No session-setup. Done .. _wapt_cli_create_package: ********************************************** Using the Command Line to create WAPT packages ********************************************** wapt-get list-registry ====================== The :code:`wapt-get list-registry` command returns a list of installed software present in the registry. The command can take an argument, not case sensitive, to search for a specific word: :code:`wapt-get list-registry `. The informations returned is: .. list-table:: :header-rows: 1 :align: center * - Information - Definition - Available on Windows - Available on Linux - Available on Mac OS * - :guilabel:`UninstallKey` - Uninstall key indentifier in the registry - |ok| - |nok| - |nok| * - :guilabel:`Software` - Name of the software in the registry - |ok| - |ok| - |ok| * - :guilabel:`Version` - Version of the software in the registry - |ok| - |ok| - |ok| * - :guilabel:`Uninstallstring` - Uninstall string of the software in the registry - |ok| - |nok| - |nok| .. note:: * On Windows, this informations is collected by WAPT from the registry in two localisation : * :code:`Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall` * :code:`Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall` * On Linux, this informations is collected by WAPT in :code:`Applications` * On Mac OS, this informations is collected by WAPT in :code:`/var/lib/dpkg/info/` The command :code:`wapt-get list-registry firefox` returns (on Windows): .. code-block:: bash Using config file: C:\Program Files (x86)\wapt\wapt-get.ini UninstallKey Software Version Uninstallstring --------------------------------------------------------------------------------------------------------------------------------------------------------- Mozilla Firefox 45.5.0 ESR (x64 fr) Mozilla Firefox 45.5.0 ESR (x64 fr) 45.5.0 "C:\Program Files\Mozilla Firefox\uninstall\helper.exe" wapt-get sources ================ The :code:`wapt-get sources ` command downloads sources from a source code management platform like Git or SVN. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. The command :code:`wapt-get sources tis-firefox` returns nothing; wapt-get make-template ====================== .. warning:: This method is to be used only if you cannot use the console to create a package. The :code:`wapt-get make-template [ []]` command allows to create a package template from a binary. Use this arguments : .. list-table:: :header-rows: 1 :align: center * - Argument - Definition - Default value * - installer-path - Installer path of the binary - Not default value, it's necessary * - packagename - Name of package - If it is not defined, the package name is created like :code:`prefix-binary-name_package-version-wapt` * - source directoryname - Directory to save the source files - If not defined, it's the value of :code:`default_sources_root` in :file:`waptconsole.ini` The command :code:`wapt-get make-template C:\\Users\\User\\Downloads\\tightvnc.msi tis-tightvnc` returns: .. code-block:: console Using config file: C:\Users\Documentation\AppData\Local\waptconsole\waptconsole.ini Template created. You can build the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-package C:\waptdev\tis-tightvnc-wapt You can build and upload the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-upload C:\waptdev\tis-tightvnc-wapt .. hint:: * If you have previously installed `tis-waptdev `_ package on your development computer, :program:`PyScripter` editor will launch automatically and open the package in development mode. wapt-get make-host-template =========================== .. warning:: This method is to be used only if you cannot use the console to create a package. The :code:`wapt-get make-host-template [[,,...] [directory]]` command creates an empty WAPT host package from a template. Use this arguments : .. list-table:: :header-rows: 1 :align: center * - Argument - Definition - Default value * - machinename - Name of machine use for package name - If none is given, use the FQDN * - package - List of packages needed on the host. - If it is not define, no packages are added as dependencies * - directory - Directory to save the source files - If it is not define, it's :file:`C:\\waptdev` The command :code:`wapt-get make-host-template host01.mydomain.lan` returns: .. code-block:: console Using config file: C:\Users\Documentation\AppData\Local\waptconsole\waptconsole.ini Template created. You can build the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-package C:\waptdev\host01.mydomain.lan-wapt You can build and upload the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-upload C:\waptdev\host01.mydomain.lan-wapt wapt-get make-group-template ============================ .. warning:: This method is to be used only if you cannot use the console to create a package. The :code:`wapt-get make-group-template ` command creates an empty WAPT group package from a template. The command :code:`wapt-get make-group-template documentation` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Template created. You can build the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-package c:\waptdev\documentation_0-wapt You can build and upload the WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-upload c:\waptdev\documentation_0-wapt .. _build_package: wapt-get build-package ====================== The :code:`wapt-get build-package ` command builds a WAPT package and signs it with the private key associate to :code:`personal_certificate_path` define in the :file:`waptconsole.ini`. The command :code:`wapt-get build-package c:\waptdev\tis-dropbox` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Building packages 1 packages Personal certificate is documentation Please type the password to decrypt the private key C:\Users\documentation\private\documentation.pem Password: Private key is Personal certificate is SSLCertificate cn=documentation Private key is Building c:\waptdev\tis-dropbox Signing c:\waptdev\tis-dropbox with key and certificate documentation (C:\Users\documentation\private\documentation.crt) Package c:\waptdev\tis-dropbox signed : signature : BN7j6lwloY...Iu9QVulA= ...done building. Package filename c:\waptdev\tis-dropbox_104.4.175-7_windows_0f4137ed1502b5045d6083aa258b5c42_5.1_PROD.wapt 1 packages successfully built 0 packages failed You can upload to repository with C:\Program Files (x86)\wapt\wapt-get.exe upload-package "c:\waptdev\tis-dropbox_104.4.175-7_windows_0f4137ed1502b5045d6083aa258b5c42_5.1_PROD.wapt" .. warning:: The directory name doens't define the package name and prefix, it's defined by the :file:`control` file. wapt-get sign-package ===================== The :code:`wapt-get sign-package ` command signs a package with the private key associate to :code:`personal_certificate_path` define in the :file:`waptconsole.ini`. .. attention:: :code:`sign-package` does not rename the WAPT package with the chosen prefix of the :term:`Organization`. The command :code:`wapt-get sign-package c:\waptdev\tis-dropbox` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Signing packages c:\waptdev\tis-dropbox Personal certificate is SSLCertificate cn=documentation Please type the password to decrypt the private key C:\Users\documentation\private\documentation.pem Password: Private key is Signing c:\waptdev\tis-dropbox OK: Package c:\waptdev\tis-dropbox signed : signature : b'nJYfYswDWi'...b'v790D7uA=' .. _wapt_cli_build_upload: wapt-get build-upload ===================== The :code:`wapt-get build-upload ` command builds and uploads a WAPT package onto the main WAPT repository. .. hint:: By passing the *-i* argument to :code:`build-upload`, the WAPT packaging version number is incremented before upload, so to avoid having to modify manually the :file:`control` file. The command :code:`wapt-get -i build-upload c:\waptdev\tis-dropbox` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Building packages 1 packages Personal certificate is documentation Please type the password to decrypt the private key C:\Users\documentation\private\documentation.pem Password: Private key is Personal certificate is SSLCertificate cn=documentation Private key is Building c:\waptdev\tis-dropbox Signing c:\waptdev\tis-dropbox with key and certificate documentation (C:\Users\documentation\private\documentation.crt) Package c:\waptdev\tis-dropbox signed : signature : s9FOLFQvYw...c9T3Hv1A= ...done building. Package filename c:\waptdev\tis-dropbox_104.4.175-7_windows_0f4137ed1502b5045d6083aa258b5c42_5.1_PROD.wapt 1 packages successfully built 0 packages failed Building and uploading packages to https://srvwapt.mydomain.lan Please get login for https://srvwapt.mydomain.lan/api/v3/upload_xxx:admin Password: c:\waptdev\tis-dropbox_104.4.175-7_windows_0f4137ed1502b5045d6083aa258b5c42_5.1_PROD.wapt[================================] 126459984/126459984 - 00:00:40 Package uploaded successfully: 1 Packages uploaded, 0 errors wapt-get duplicate ================== The :code:`wapt-get duplicate [ []]` command duplicates a package. .. warning:: Don't use it for the host package. Use this arguments : .. list-table:: :header-rows: 1 :align: center * - Argument - Definition - Required * - directory or package - Directory path of package or compiled package in :file:`.wapt` - |ok| * - new-package-name - Name of the new package - |ok| * - new-version - Change the package version in the :file:`control` file. If it's not defined, the same version is duplicated. - |nok| * - target directory - Path to the target directory of the duplicated package. If it's not defined, use the same as the source package. - |nok| The command :code:`wapt-get duplicate tis-firefox tis-firefox-custom` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Package duplicated. You can build the new WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-package C:\waptdev\tis-firefox-custom-wapt You can build and upload the new WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe build-upload C:\waptdev\tis-firefox-custom-wapt .. hint:: * If you have previously installed `tis-waptdev `_ package on your development computer, :program:`PyScripter` editor will launch automatically and open the package in development mode. wapt-get edit ============= .. warning:: This method is to be used only if you cannot use the console to create a package. The :code:`wapt-get edit ` command downloads and edits a WAPT package from the server repository. The command takes on argument. That argument is the name package or a list of package names with the repository prefix. The command :code:`wapt-get edit tis-firefox` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 1629411 / 54313787 (3%) (2686 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 8147055 / 54313787 (15%) (5679 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 15207836 / 54313787 (28%) (7367 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 19552932 / 54313787 (36%) (7249 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 24984302 / 54313787 (46%) (7471 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 29329398 / 54313787 (54%) (7143 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 33674494 / 54313787 (62%) (6951 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 40735275 / 54313787 (75%) (7534 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 45623508 / 54313787 (84%) (7326 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 53227426 / 54313787 (98%) (7603 KB/s) https://srvwapt.mydomain.lan/wapt/tis-firefox_94.0.1-106_x64_windows_0f4137ed1502b5045d6083aa258b5c42_6.1_PROD_en_f5335369ad5805e8dbc1f8ae99b2258e.wapt : 54313787 / 54313787 (100%) (7663 KB/s) Package edited. You can build and upload the new WAPT package by launching .. hint:: * If you have previously installed `tis-waptdev `_ package on your development computer, :program:`PyScripter` editor will launch automatically and open the package in development mode. wapt-get edit-host ================== .. warning:: This method is to be used only if you cannot use the console to create a package. The :code:`wapt-get edit-host ` command edits a WAPT *host* package. The command :code:`wapt-get edit-host RND-0279A1F4-BBBE-43AE-A591-F82652E0104B` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Package edited. You can build and upload the new WAPT package by launching C:\Program Files (x86)\wapt\wapt-get.exe -i build-upload c:\waptdev\RND-0279A1F4-BBBE-43AE-A591-F82652E0104B_0-wapt .. hint:: * If you have previously installed `tis-waptdev `_ package on your development computer, :program:`PyScripter` editor will launch automatically and open the package in development mode. wapt-get update-package-sources =============================== The :code:`wapt-get update-package-sources ` command update run the update-package function in :file:`setup.py` file. The command :code:`wapt-get update-package-sources tis-firefox` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Latis Mozilla Firefox version is: 95.0.2 Download URL is: https://download-installer.cdn.mozilla.net/pub/firefox/releases/95.0.2/win64/en-US/Firefox%20Setup%2095.0.2.exe Downloading: Firefox_Setup_95.0.2.exe Firefox_Setup_95.0.2.exe[================================] 54810424/54810424 - 00:00:07 Software version updated (from: 94.0.1 to: 95.0.2) Packages updated : c:\waptdev\tis-firefox_0-wapt .. hint:: * If you have previously installed `tis-waptdev `_ package on your development computer, :program:`PyScripter` editor will launch automatically and open the package in development mode. ******************************************************************* Using the command-lines for WaptWUA management |enterprise_feature| ******************************************************************* wapt-get waptwua-scan ===================== The :code:`wapt-get waptwua-scan` scan status of Windows against current rules and send result to server. The command :code:`wapt-get waptwua-scan` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Ensure wuauserv Auto Update option is disabled Scanning with windows updates rules: { "direct_download": false, "default_allow": false, "filter": "Type='Software' or Type='Driver'", "download_scheduling": "7d", "install_scheduling": null, "install_delay": null, "postboot_delay": "10m" } Downloading wsusscn2.cab file from https://srvwapt.mydomain.lan/waptwua/wsusscn2.cab wsusscn2.cab[================================] 1024297844/1024297844 - 00:02:04 Windows updates rules have been changed Looking for updates with filter: Type='Software' or Type='Driver' Connecting to local update searcher using offline wsusscn2 file... Offline Update searcher ready... Waiting for WUA search to complete Done searching WUA Search completed ! Updates scan done. Writing status in local wapt DB Status: OK (0, 0, 0) None re-enabling wuauserv previous state: 0 wapt-get waptwua-download ========================= The :code:`wapt-get waptwua-download` command scan status of Windows against current rules, download missing kb and send result to server. The command :code:`wapt-get waptwua-download` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Ensure wuauserv Auto Update option is disabled Downloading wsusscn2.cab file from https://srvwapt.mydomain.lan/waptwua/wsusscn2.cab wsusscn2.cab[================================] 1024297844/1024297844 - 00:00:26 Start of install for all pending Windows updates Scanning with params: { "direct_download": false, "default_allow": false, "filter": "Type='Software' or Type='Driver'", "download_scheduling": "7d", "install_scheduling": null, "install_delay": null, "postboot_delay": "10m" } Scanning with windows updates rules: { "direct_download": false, "default_allow": false, "filter": "Type='Software' or Type='Driver'", "download_scheduling": null, "install_scheduling": null, "install_delay": null, "postboot_delay": "10m" } Bypassing scan, no change since last successful scan Writing status in local wapt DB Status: OK {'downloaded': [], 'missing': []} None re-enabling wuauserv previous state: 0 wapt-get waptwua-install ======================== The :code:`wapt-get waptwua-install` install pending updates. The command :code:`wapt-get waptwua-install` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Ensure wuauserv Auto Update option is disabled Downloading wsusscn2.cab file from https://srvwapt.mydomain.lan/waptwua/wsusscn2.cab wsusscn2.cab[================================] 1024297844/1024297844 - 00:00:26 Start of install for all pending Windows updates Scanning with params: { "direct_download": false, "default_allow": false, "filter": "Type='Software' or Type='Driver'", "download_scheduling": "7d", "install_scheduling": null, "install_delay": null, "postboot_delay": "10m" } Scanning with windows updates rules: { "allowed_products": null, "allowed_classifications": null, "allowed_severities": null, "allowed_updates": null, "forbidden_updates": null, "allowed_kbs": null, "forbidden_kbs": null, "default_allow": false } Looking for updates with filter: Type='Software' or Type='Driver' Connecting to local update searcher using offline wsusscn2 file... Offline Update searcher ready... Waiting for WUA search to complete Done searching WUA Search completed ! Updates scan done. Installed 07609d43-d518-4e77-856e-d1b316d1b8a8 : MSXML 6.0 RTM Security Update (925673) Installed bb49cc19-8847-4986-aa93-5e905421e55a : Security Update for Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package (KB2538242) Installed 729a0dcb-df9e-4d02-b603-ed1aee074428 : Security Update for Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package (KB2538243) Installed 719584bc-2208-4bc9-a650-d3d6347eb32e : Security Update for Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (KB2565063) Installed a8761130-35b6-41ce-8b67-2d35bb2d0846 : 2021-02 Cumulative Update for .NET Framework 3.5 and 4.8 for Windows 10, version 20H2 for x64 (KB4601050) Installed 30f75e5d-2c46-42be-aef6-97ae730452be : 2021-07 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB5004945) Installed 6e88be6e-d470-4e7e-9f36-01479049aadb : 2021-08 Servicing Stack Update for Windows 10 Version 20H2 for x64-based Systems (KB5005260) Installed a15155a4-1299-41ff-9a39-28a33ce7cadd : 2021-12 .NET Core 3.1.22 Security Update for x64 Client (KB5009193) Installed 38db0ad6-27f8-4bf9-ab2a-cffc4d7bc390 : Windows Malicious Software Removal Tool x64 - v5.96 (KB890830) Scanning with windows updates rules: { "direct_download": false, "default_allow": false, "filter": "Type='Software' or Type='Driver'", "download_scheduling": "7d", "install_scheduling": null, "install_delay": null, "postboot_delay": "10m" } Windows updates rules have been changed Writing status in local wapt DB Status: OK [] None re-enabling wuauserv previous state: 2 waptwua-status ============== The :code:`wapt-get waptwua-status` return the last update status. The command :code:`wapt-get waptwua-status` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini {'enabled': None, 'last_error': 'OperationalError: cannot rollback - no transaction is active', 'last_install_batch': [], 'last_install_date': None, 'last_install_reboot_required': None, 'last_install_result': None, 'last_scan_date': '2022-01-07T10:20:50.213644', 'last_scan_duration': 1490.500022649765, 'missing_downloads': [], 'rules_packages': [], 'status': 'SCANNING', 'wsusscn2cab_date': '2021-12-14T04:06:46'} None *********************************************************************** Using the command-lines for interaction with users |enterprise_feature| *********************************************************************** wapt-get propose-upgrade ========================= The :code:`wapt-get propose-upgrade` command launch an upgrade proposal by launching waptexit in open sessions. The command :code:`wapt-get propose-upgrade` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini {'result': 1, 'summary': 'waptexit launched for 1 sessions'} ***************************************** Using the command-lines for initial setup ***************************************** wapt-get create-keycert ======================= The :code:`wapt-get create-keycert []` command create a RSA key pair and X509 certificate. .. list-table:: List of options avaible :header-rows: 1 :widths: auto :align: center * - Option - Description - Default Value * - :code:`--CommonName` - Display name of the certificate - / * - :code:`--CommonName64` - Display name of the certificate, encoded in base64 (if accents, spaces etc..) - / * - :code:`--CodeSigning` |enterprise_feature| - If the certificate / key pair will be allowed to sign software packages - :code:`0` * - :code:`--CA` |enterprise_feature| - If this certificate / key pair can be used to sign other certificates (main or intermediate Certificate Authority) - :code:`0` * - :code:`--ClientAuth` - Corresponds to a property (use) of the certificate - :code:`1` for a non-CA certificate * - :code:`--PrivateKeyPassword` - Password for unlocking the key if :code:`--NoPrivateKeyPassword` is not used - Randomly generated password * - :code:`--PrivateKeyPassword64` if :code:`--PrivateKeyPassword` is not used - Password for unlocking the key, encoded in base64 (if accents, spaces etc..) - Randomly generated password * - :code:`--NoPrivateKeyPassword` - If private key is not encrypted if :code:`--PrivateKeyPassword` or :code:`--PrivateKeyPassword64` are not used - Empty * - :code:`-F` - Force overwrite existing certificate - / * - :code:`--Country` - Name of the certificate holder’s country to register in the certificate. - / * - :code:`--Locality` - Name of the certificate holder’s city to register in the certificate. - / * - :code:`--Organization` - Name of the certificate holder’s Organization to register in the certificate. - / * - :code:`--OrgUnit` - Name of the certificate holder’s Organization Unit (Service) to register in the certificate. - / * - :code:`--Email` - Email address of the certificate holder to register in the certificate - / * - :code:`--CAKeyFilename` - Path to the key (:file:`.pem`) of an Certificate Authority - Parameter :code:`default_ca_key_path` in :file:`waptconsole.ini` * - :code:`--CACertFilename` - Path to the certicate (:file:`.crt`) of an Certificate Authority - Parameter :code:`default_ca_cert_path` in :file:`waptconsole.ini` * - :code:`--CAKeyPassword` - Password for unlocking the key of Certificate Authority - / * - :code:`-NoCAKeyPassword` - If Certificate Authority key is not encrypted - / * - :code:`--BaseDir` - Folder where the private key and the public certificate will be stored. - Directory :code:`personal_certificate_path` in :file:`waptconsole.ini` * - :code:`-EnrollNewCert` - Copy the certificate to :file:`wapt\ssl` - / * - :code:`-SetAsDefaultPersonalCert` - The certificate path is assigned to :code:`personal_certificate_path` in :file:`waptconsole.ini` - / The command :code:`wapt-get create-keycert` returns: .. code-block:: console Using config file C:\Users\Administrator\AppData\Local\waptconsole\waptconsole.ini BaseDir: C:\private\ Common name of certificate to create: documentation Private Key Filename: C:\private\documentation.pem Certificate Filename: C:\private\documentation.crt New private key password: QR.-DVp6MPGW .. warning:: If :code:`default_ca_key_path` and :code:`default_ca_cert_path` are defined in :file:`C:\Users\Administrator\AppData\Local\waptconsole\waptconsole.ini` you must place CA certificate in the same location. Else this error appears : .. code-block:: console wapt-get create-keycert Using config file C:\Users\tisadmin\AppData\Local\waptconsole\waptconsole.ini BaseDir: C:\Users\tisadmin\private\ Common name of certificate to create: CRT Exception at 00483595: Exception: CA Certificate C:\Program Files (x86)\wapt\ssl does not exist. wapt-get build-waptagent ======================== The :code:`wapt-get build-waptagent []` compile and upload a :program:`waptagent.exe` and :program:`waptupgrade.exe` package using :code:`/ConfigFilename` parameter to ini file. For ini file use the :ref:`wapt-get.ini ` syntax. .. note:: By default, use :file:`waptconsole.ini` configuration. The command :code:`wapt-get build-waptagent` returns: .. code-block:: console Building customized waptagent.exe installer ...................................................................................... Built C:\Users\documentation\AppData\Local\Temp\wapt20220107T12203700000.tmp\waptupgrade\waptagent.exe Private key Password for C:\Users\documentation\private\documentation.crt : ******** Building waptupgrade package Waptserver https://srvwapt.mydomain.lan Admin User () :admin Waptserver Password: ************ Uploading customized waptagent.exe installer Uploading C:\Users\documentation\AppData\Local\Temp\wapt20220107T12203700000.tmp\waptupgrade\waptagent.exe to waptserver https://srvwapt.mydomain.lan OK Uploading C:\Users\documentation\AppData\Local\Temp\wapt20220107T12203700000.tmp\test-waptupgrade_2.1.2.10605-0_all_PROD_all.wapt to waptserver https://srvwapt.mydomain.lan OK : 1 Packages uploaded, 0 errors. Errors: ************************************************* Using the command-lines for repository management ************************************************* wapt-get upload-package ======================= The :code:`wapt-get upload-package ` command uploads a package onto the main WAPT repository. The command :code:`wapt-get upload-package C:\\waptdev\\tis-tightvnc.wapt` returns: .. code-block:: console Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.ini Uploading packages to https://srvwapt.mydomain.lan Please get login for https://srvwapt.mydomain.lan/api/v3/upload_xxx:admin Password: c:\waptdev\tis-tightvnc.wapt[================================] 54316019/54316019 - 00:00:17 OK : 1 Packages uploaded, 0 errors wapt-get scan-packages ====================== .. hint:: This command it's only for the Windows repositories The :code:`wapt-get scan-packages ` command rebuild a :file:`Packages` file for http package repository. The command :code:`wapt-get scan-packages C:\wapt\waptserver\repository\wapt` returns: .. code-block:: console Using config file: C:\Program Files (x86)\wapt\wapt-get.ini Packages filename: C:\wapt\waptserver\repository\wapt Processed packages: C:\wapt\waptserver\repository\wapt\tis-firefox.wapt C:\wapt\waptserver\repository\wapt\tis-tightvnc.wapt C:\wapt\waptserver\repository\wapt\tis-7zip.wapt Skipped packages: wapt-scanpackages ================= .. hint:: This command it's only for the Linux repositories The :code:`wapt-scanpackages ` command rebuild a :file:`Packages` file for http package repository. The command :code:`wapt-scanpackages /var/www/wapt/` returns nothing .. _re_sign_package_cmd: Re-signing packages on the server using a command line ====================================================== .. hint:: This commands are only avaible on Linux server .. danger:: Before using this method, ensure that your WAPT Server is safe and not under the control of an unauthorized third party entity. * Copy your :file:`.crt` and :file:`.pem` to :file:`/tmp/` on the WAPT Server using :program:`Winscp` or an equivalent tool. * It is then possible to re-sign all the packages at once on the WAPT Server with the following commands. .. code-block:: bash wapt-signpackages -d /var/www/wapt-host -c /tmp/wapt_pub_key.crt -k /tmp/wapt_priv_key.pem -s wapt-signpackages -d /var/www/wapt -c /tmp/wapt_pub_key.crt -k /tmp/wapt_priv_key.pem -s wapt-scanpackages /var/www/wapt/ .. warning:: If the error **Access violation** appear it's beacause the package is too big. Edit the package and see :ref:`this procedure `. .. hint:: Use this method if re-signing from the WAPT console method does not complete successfully. .. attention:: Remove your :file:`.crt` and :file:`.pem` from :file:`/tmp/` on the WAPT Server. .. _command-lines-options: ************************************ Using the command-lines with options ************************************ .. list-table:: :header-rows: 1 :align: center * - Option - Definition * - :code:`--version` - Show program's version number and exit * - :code:`-h` | :code:`--help` - Show help message and exit * - :code:`-c CONFIG` | :code:`--config=CONFIG` - Path to another file like :file:`wapt-get.ini` or :file:`waptconsole.ini`. Replaces the file normally used by the command line. * - :code:`-l LOGLEVEL` | :code:`--loglevel=LOGLEVEL` - Level of log files following this list : 'debug', 'warning', 'info', 'error', 'critical' (default: warning) * - :code:`-D` | :code:`--direct` - Don't use http service for update/upgrade * - :code:`-S` | :code:`--service` - Request a Waptservice user * - :code:`-u` | :code:`--update-packages` - Run :code:`wapt-get update` before the command-line * - :code:`-f` | :code:`--force` - Force the command-line * - :code:`-p PARAMS` | :code:`--params=PARAMS` - Setup params as a JSon Object * - :code:`-r WAPT_URL` | :code:`-repo WAPT_URL` | :code:`--repository=WAPT_URL` - Override URL of main wapt repository from :file:`wapt-get.ini` or :file:`waptconsole.ini` file * - :code:`-y` | :code:`--hide` - Hide the console during the execution of the command-line * - :code:`-F FILTER_ON_HOST_CAP` | :code:`--use-host-caps=FILTER_ON_HOST_CAP` - Filter the packages based on the current host capabilities (0/1) * - :code:`-i` | :code:`--inc-release` - Increase release number when building package * - :code:`-a UPDATE_SERVER_STATUS` | :code:`--update-server-status=UPDATE_SERVER_STATUS` - Send updated status of host (soft, packages, etc..) to server after action. :code:`UPDATE_SERVER_STATUS` takes a value of **0** or **1**) * - :code:`keep-signature-date` - Keep the current package signature date, and file changetime. Only for :code:`wapt-get sign-package` * - :code:`-s SECTION_FILTER` | :code:`--sections=SECTION_FILTER` - Add a filter **section** to :code:`wapt-get search`. Section it's :ref:`type of package ` * - :code:`-o REDIRECT_OUTPUT` | :code:`--output=REDIRECT_OUTPUT` - Redirect the outputs to a given :file:`.ini` file * - :code:`-j` | :code:`-json` - Switch to json output for scripts purpose * - :code:`-e ENCODING` | :code:`--encoding=ENCODING` - Change chararacter encoding for the output * - :code:`-x EXCLUDES` | :code:`--excludes=EXCLUDES` - Comma separated list of files or directories to exclude for build-package * - :code:`-k PERSONAL_CERTIFICATE_PATH` | :code:`--certificate=PERSONAL_CERTIFICATE_PATH` - Path to the PEM X509 certificate to sign packages. Package are unsigned if not provided * - :code:`-w PRIVATE_KEY_PASSWD` | :code:`--private-key-passwd=PRIVATE_KEY_PASSWD` - Path to the file containing the private key password * - :code:`-U USER` | :code:`--user=USER` - To define an interactive user * - :code:`-g USERGROUPS` | :code:`--usergroups=USERGROUPS` - Groups of the final user as a JSon array for checking install permission * - :code:`-t MAX_TTL` | :code:`--maxttl=MAX_TTL` - ax run time in minutes of wapt-get process before being killed by subsequent wapt-get (default: 60 minutes) * - :code:`-L LANGUAGE` | :code:`--language=LANGUAGE` - Override language for install, example : fr (default : en) * - :code:`-m MD` | :code:`--message-digest=MD` - Message digest type for :code:`wapt-get sign-package` * - :code:`-n` | :code:`--newest-only` - Return only the newest version of packages when use :code:`wapt-get search` * - :code:`--locales=LOCALES` - Override packages locales filter for :code:`wapt-get search` * - :code:`--maturity=MATURITY` - Set/change package maturity when building package * - :code:`--pin-server-cert` - When registering, pin the server certificate. * - :code:`--wapt-server-url=SET_WAPTSERVER_URL` - When the setting :code:`wapt_server` is not defined, defined in :file:`wapt-get.ini`. * - :code:`--wapt-repo-url=SET_WAPTREPO_URL` - When the setting :code:`repo_url` is not defined, defined in :file:`wapt-get.ini`. * - :code:`--wapt-server-user=WAPT_SERVER_USER` - Defines the user to upload packages to the server * - :code:`--wapt-server-passwd=WAPT_SERVER_PASSWD` - Defines the password to upload packages to the server * - :code:`--log-to-windows-events` - Log steps to the Windows event log * - :code:`--use-gui` - Force use of GUI Helper even if not in dev mode * - :code:`--no-ide` - Don't launch ide when editing a package