Using WAPT with the Command Line¶
The WAPT Agent provides a command line interface utility wapt-get.
Note
By default, command-line actions in WAPT are executed with the rights of the user who launched the cmd.exe.
If the cmd.exe has not been launched with Local Administrator privileges, the command will be passed on to the waptservice.
For security reasons, some actions will require a login and a password.
Only Local Administrators and members of the waptselfservice Active Directory security group are allowed.
To force using the WAPT service as a Local Administrator, simply add -S after
wapt-get.exe
.
Note
Each commands that takes a package name as a parameter can also take the unique package_uuid of the package as a parameter (wapt-get install, wapt-get forget, etc.). Using a GUID allows to specify a unique package without ambiguity on its architecture or version. The package_uuid is listed in the output of wapt-get list and wapt-get search. For example:
Using the more common functions in WAPT with the command line¶
wapt-get install¶
The wapt-get install command launches the installation of a WAPT package.
To install Mozilla Firefox, the command is wapt-get install tis-firefox.
It is possible to install several packages at once:
wapt-get install package1 package2
If the package has not been downloaded to cache, wapt-get install will first download the package to cache, then the WAPT Agent will install the package.
Attention
Installing a WAPT package with wapt-get install does not add the package as a dependency to the host.
The package is installed on the host, but if the computer is re-imaged, the package will not be reinstalled automatically.
The command wapt-get install tis-firefox returns:
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 wapt-get update command allows to update the list of available packages.
The local WAPT Agent will download 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 titles have been added on the repository, they become available for download by the WAPT Agent.
Note
The wapt-get update command does not download packages, it only updates the local database of packages.
The command wapt-get update returns:
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 wapt-get upgrade launches the installation of WAPT packages waiting to be upgraded or waiting to be installed.
The local WAPT Agent first downloads its WAPT packages to the local cache, then the WAPT Agent installs them.
Hint
It is strongly advised to launch a wapt-get update command before launching a wapt-get upgrade
command.
Without previously launching a wapt-get update, the WAPT Agent will install nothing.
The command wapt-get upgrade returns:
Installing tis-mumble
Shutting down Mumble
installing Mumble 1.2.3
=== install packages ===
tis-mumble
wapt-get remove¶
The wapt-get remove <package name> command removes the listed WAPT packages from the host.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
To remove Mozilla Firefox, the command is wapt-get remove <prefix>-firefox.
Attention
Removing a WAPT package with wapt-get remove does not remove the package dependency on the host.
The package will effectively be uninstalled from the host, but it will automatically be reinstalled on the next upgrade.
To completely remove a package from a host, do a wapt-get remove for the targeted package, then edit the host configuration via the WAPT Console to remove the package dependency on the host.
The command wapt-get remove tis-firefox returns:
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 wapt-get uninstall [<package name>] command uninstalls the listed packages from the host if a def uninstall()
function exists in the setup.py
files of the listed packages.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
Attention
Running the uninstall package function does not delete the cached package on the host.
The command wapt-get uninstall tis-adwcleaner returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Uninstalling tis-adwcleaner ...
None
Uninstallation done
wapt-get forget¶
The wapt-get forget <package name> command removes the package from the local database so that the lifecycle of the software title or the configuration is no longer managed by WAPT.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
Attention
Forgetting the WAPT package does not uninstall the software title or the configuration associated with the WAPT package.
The command wapt-get forget tis-adwcleaner returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
=== Packages removed from status ===
tis-adwcleaner
wapt-get audit¶
The wapt-get audit [<package name>] command runs the audit function for the listed packages if a def audit()
function exists in the setup.py
files of the listed packages.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
Also, the wapt-get audit ALL command runs the audit function for all packages installed on the host.
The command wapt-get audit tis-firefox returns:
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 wapt-get show <package name> command displays informations stored in the Packages
index file.
If several versions of a WAPT package are available on the WAPT repository, each version of the package will be displayed.
The command wapt-get show tis-7zip returns:
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 pour archiver des 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
WARNING: control data signature can not be validated with certificates [<SSLCertificate cn='documentation' fingerprint=3f2c0a issuer='documentation' validity=2021-11-19 - 2031-11-17 Code-Signing=True CA=True>]
If this message appears, it is because the certificate is not trusted.
If you want to check the package, download it to cache and run the wapt-get show on the local package.
For example:
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 wapt-get show-params <package name> command returns a list of parameters that would be passed on to the wapt-get install <package name> --params=PARAMS command.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
The command wapt-get show-params tis-7zip
returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
tis-7zip : {True, 'documentation': True}
wapt-get show-log¶
The wapt-get show-log <package name> command return the latest audit logs stored in the local sqlite database of the WAPT Agent.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
The command wapt-get show tis-7zip returns:
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¶
The wapt-get search command allows to search for one or more package in the repositories.
Warning
This command returns only WAPT packages available for the host executing the command, according to the locale, operating system, architecture or maturity of the host.
If a WAPT package with another locale, operating system, architecture or maturity exists in the repository, it will not be listed.
The search command takes one keyword argument.
The command wapt-get search "Firefox" returns (for example):
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
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 WAPT Server |
Note
The value of status defines the installation status as follows:
-
for not installed.
I
for installed.
wapt-get download¶
The wapt-get download <package name> command downloads the WAPT package to the local cache.
The command wapt-get download tis-7zip returns:
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 wapt-get download-upgrade command downloads packages to be upgraded to the local WAPT cache.
The command wapt-get download-upgrade returns:
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 wapt-get list command lists WAPT packages that are installed on the computer.
The command wapt-get list returns:
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
package |
version |
install status |
install_date |
description |
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 wapt-get list-upgrade command lists WAPT packages that need to be upgraded on the host.
The command wapt-get list-upgrade returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
=== upgrade packages ===
tis-notepadplusplus(=8.2-10)
wapt-get -S tasks¶
The wapt-get -S tasks command checks whether some tasks are running or are pending in queue.
The command wapt-get -S tasks returns:
About to speak to waptservice...
Running task 14: Uninstall of tis-vlc (task #14), status:
Using special Command Lines with WAPT¶
wapt-get restart-waptservice¶
The wapt-get restart-waptservice restarts the waptservice on Windows, Linux and macOS.
wapt-get add-config-from-url¶
The wapt-get add-config-from-url <filelink> <sha256hashfile> command fetches a json dynamic configuration file from the specified url and places the file into the conf.d
directory under the wapt installation folder.
The <sha256hashfile>
parameter is optional.
C:\Users\administrator>wapt-get add-config-from-url https://srvwapt.mydomain.lan/wapt/conf.d/default_config_55863a6b54a47255097b6403731b36de716fc7ee9ec824bffad36d5fdc49b6b5.json
New config installed as C:\Program Files (x86)\wapt\conf.d\default.json
wapt-get add-config-from-file¶
The wapt-get add-config-from-file <filepath> command adds a json dynamic configuration file into the directory conf.d
under the wapt installation folder.
The path to the json dynamic configuration file is defined by <filepath>
.
wapt-get add-config-from-base64¶
The wapt-get add-config-from-file <base64 file> command adds a json dynamic configuration file into the directory conf.d
under the wapt installation folder.
The path to the json dynamic configuration file is defined by <base64 file>
.
wapt-get remove-config¶
The wapt-get remove-config <config-name> command removes the specified json dynamic configuration files from the conf.d
folder under the wapt installation folder.
wapt-get list-config¶
The wapt-get list-config command lists installed json dynamic configuration files that are present in the conf.d
folder under the wapt installation folder.
C:\Users\administrator>wapt-get list-config
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
config files are located in C:\Program Files (x86)\wapt\conf.d
* config_base
wapt-get list-available-config¶
The wapt-get list-available-config command lists all available json dynamic configuration files that are present on the WAPT Server and will show the command to install them.
Listing the available configurations requires that the user be authenticated.
C:\Users\administrator>wapt-get list-available-config
Server: https://srvwapt.mydomain.lan
Server UUID: 32464dd6-c261-11e8-87be-cee799b43a00
Server CABundle: 0
Waptserver https://srvwapt.mydomain.lan Admin User () :admin
Waptserver Password: *************
default_config : wapt-get add-config-from-url https://srvwapt.mydomain.lan/wapt/conf.d/default_config_55863a6b54a47255097b6403731b36de716fc7ee9ec824bffad36d5fdc49b6b5.json
Server: https://srvwapt.mydomain.lan
Repo: https://srvwapt.mydomain.lan/wapt
default : wapt-get add-config-from-url https://srvwapt.mydomain.lan/wapt/conf.d/default_91ab2cd1901b5e36214224229c3461e49e65f7b065ea6b0eb16bd83c7fcdda57.json
Server: https://srvwapt.mydomain.lan
Repo: https://srvwapt.mydomain.lan/wapt
mac_config : wapt-get add-config-from-url https://srvwapt.mydomain.lan/wapt/conf.d/mac_config_2720657c276cbc0ee14734e68fbd0fadc4dea3171625406e10cd9828631e5c72.json
Server: https://srvwapt.mydomain.lan
Repo: https://srvwapt.mydomain.lan/wapt
wapt-get clean¶
The wapt-get clean command removes packages from the cache folder.
The command is launched after each wapt-get upgrade to save disk space.
The command wapt-get clean returns:
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 wapt-get upgradedb command upgrades the local WAPT database schema if necessary.
The command wapt-get upgradedb returns:
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 the file C:\Windows\System32\GroupPolicy\Machine\Scripts\scripts.ini
on Windows devices.
The wapt-get add-upgrade-shutdown command adds a waptexit local security policy object, enabling the execution of waptexit at system shutdown.
The command wapt-get add-upgrade-shutdown returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
0
The scripts.ini
contains:
[Shutdown]
0CmdLine = C:\Program Files (x86)\wapt\waptexit.exe
0Parameters =
The wapt-get remove-upgrade-shutdown command removes the waptexit local security policy object, disabling the execution of waptexit during system shutdown.
The command wapt-get add-upgrade-shutdown returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
0
The scripts.ini
contains:
[Shutdown]
wapt-get register¶
The wapt-get register <description> command reports the computer hardware and software inventory to the WAPT Server.
The <description>
parameter is optional.
Hint
A description may be passed as an argument to the wapt-get register command, the description will be displayed in the WAPT Console in the column description.
You may benefit from WAPT to improve your IT management by affecting an inventory tag as a description for your hosts for example.
Note
If the host is already registered, re-registering the host using a description updates the registered information.
The command wapt-get register "John Doe PC" returns:
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 wapt-get unregister
command removes the hardware and software inventory of the host from the WAPT Server.
The command wapt-get unregister
returns:
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 wapt-get inventory command displays the inventory information of the host in json format.
The command wapt-get inventory returns (in part):
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 wapt-get update-status sends the current status of the host to the WAPT Server.
Note
If a hardware component has changed on the computer, wapt-get update-status would not report that information back to the WAPT inventory Server.
To do so, the command to use is wapt-get inventory.
The command wapt-get update-status returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
Updated host status correctly sent to the WAPT 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 wapt-get setlocalpassword command allows to define a local password for installing WAPT packages.
The command wapt-get setlocalpassword returns:
Local password:
Confirm password:
Local auth password set successfully
wapt-get reset-uuid¶
The wapt-get reset-uuid command retrieves the host’s UUID from BIOS and sends it to the WAPT Server.
The command wapt-get reset-uuid returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
New UUID: B0F23D44-86CB-CEFE-A8D6-FB8E3343FE7F
wapt-get generate-uuid¶
The wapt-get generate-uuid command generates a random UUID for the host and sends it back to the WAPT Server.
The wapt-get generate-uuid is useful if there are bios UUID bugs with some hosts in the fleet.
The command wapt-get generate-uuid returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
New UUID: RND-0279A1F4-BBBE-43AE-A591-F82652E0104B
Note
All randomly generated UUID start with RND-.
wapt-get get-server-certificate¶
The wapt-get get-server-certificate command downloads the SSL certificate from the WAPT Server so that the WAPT Agent may establish a secured HTTPS connection with the WAPT Server.
The downloaded certificate is stored in <wapt>\ssl\server
.
The command wapt-get get-server-certificate returns:
Server certificate written to C:\Program Files (x86)\wapt\ssl\server\srvwapt.mydomain.lan.crt
wapt-get enable-check-certificate¶
The wapt-get enable-check-certificate command downloads the SSL certificate from the WAPT Server and enables secured communication with the WAPT Server.
The wapt-get enable-check-certificate command is used for activating the verification of the SSL / TLS certificate.
The command wapt-get enable-check-certificate returns:
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 wapt-get check-upgrades command shows the most recent update / upgrade status for the host.
The command wapt-get check-upgrades returns:
Using config file: C:\Program Files (x86)\wapt\wapt-get.ini
{
"running_tasks": [],
"errors": [],
"date": "2022-01-06T14:09:26.554391",
"upgrades": [
"tis-notepadplusplus(=8.2-10)"
],
"pending": {
"install": [],
"upgrade": [
"tis-notepadplusplus(=8.2-10)"
],
"additional": [],
"remove": [],
"immediate_installs": []
}
}
wapt-get add-licence¶
The wapt-get add-licence command add a WAPT licence onto the WAPT Server.
The command wapt-get add-licence returns:
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 wapt-get check-licences command shows the licences registered on the WAPT Server.
The command wapt-get check-licences returns:
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 wapt-get dnsdebug command shows network configuration data for the host, notably the local DNS data related to WAPT.
The command wapt-get dnsdebug returns:
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 wapt-get session-setup command launches user level customizations of installed WAPT packages.
The wapt-get session-setup command runs the def session_setup() function defined in the setup.py
file of the WAPT package if the function exists.
Note
The argument ALL will launch wapt-get session-setup for all installed WAPT packages.
The command wapt-get session-setup ALL returns:
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
Using the Command Line to create WAPT packages¶
wapt-get list-registry¶
The wapt-get list-registry <keyword> command lookups a keyword in software installed on the computer.
The command can take one case insensitive argument to search for the specified keyword.
The informations returned is:
Information |
Definition |
Available on Windows |
Available on Linux |
Available on macOS |
---|---|---|---|---|
|
Searches the uninstall key identifier in the registry hive. |
|||
|
Searches the name of the software in the registry hive. |
|||
|
Searches the version of the software in the registry hive. |
|||
|
Searches the uninstall string of the software in the registry hive. |
Note
On Windows, WAPT searches in two registry locations:
ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall
.ComputerHKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionUninstall
.
On Linux, WAPT searches using
Applications
.On macOS, WAPT searches in
/var/lib/dpkg/info/
.
The output of wapt-get list-registry is a table listing uninstall keys for each software corresponding to the search term.
The command wapt-get list-registry firefox returns (on Windows):
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 wapt-get sources <package name> command downloads sources from a source code management repository like Git or SVN.
The command wapt-get sources tis-firefox returns nothing;
wapt-get make-template¶
Warning
This method is deprecated, instead use the WAPT Console to create a package template.
The wapt-get make-template <installer-path> [<packagename> [<source directoryname>]] command allows to create a package template from a msi or an exe installer.
The command wapt-get make-template C:\Users\User\Downloads\tightvnc.msi tis-tightvnc returns:
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, PyScripter editor will launch automatically and open the package in development mode.
wapt-get make-host-template¶
Warning
This method is mainly for scripting, usually the host packages are automatically created with the WAPT Console.
The wapt-get make-host-template <hostname> [[<package>,<package>,...] [directory]] command creates an empty WAPT host package from a template.
The command wapt-get make-host-template host01.mydomain.lan returns:
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 can not use the WAPT Console to create a package.
The wapt-get make-group-template <name of group> command creates an empty WAPT group package from a template.
The command wapt-get make-group-template accounting returns:
Template created. You can build the WAPT package by launching
C:\Program Files (x86)\wapt\wapt-get.exe build-package C:\waptdev\accounting-wapt
You can build and upload the WAPT package by launching
C:\Program Files (x86)\wapt\wapt-get.exe build-upload C:\waptdev\accounting-wapt
wapt-get build-package¶
The wapt-get build-package <path to the package> command builds a WAPT package and signs it with the private key of the Administrator.
Note
The path to the private key, the default prefix and the default development path MUST be properly set in the wapt-get.ini
file.
The command wapt-get build-package c:waptdevtis-dropbox returns:
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 <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'>
Personal certificate is SSLCertificate cn=documentation
Private key is <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'>
Building c:\waptdev\tis-dropbox
Signing c:\waptdev\tis-dropbox with key <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'> 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 does not define the name of the package, nor does it define its prefix, these values are defined by the control
file.
wapt-get sign-package¶
The wapt-get sign-package <path to the package> command signs a package with the private key of the Administrator.
Attention
wapt-get sign-package does not rename the WAPT package with the chosen prefix of the Organization.
The command wapt-get sign-package C:\waptdev\smp-7zip_16.4.0.0-1_all.wapt returns:
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 <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'>
Signing c:\waptdev\tis-dropbox
OK: Package c:\waptdev\tis-dropbox signed : signature : b'nJYfYswDWi'...b'v790D7uA='
wapt-get build-upload¶
The wapt-get build-upload <path to the package> command builds and uploads a WAPT package onto the main WAPT repository.
Hint
By passing the -i argument to wapt-get build-upload, the WAPT packaging version number is incremented before the package is uploaded, so to avoid having to modify manually the control
file.
The command wapt-get -i build-upload C:\waptdev\tis-tightvnc-wapt returns:
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 <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'>
Personal certificate is SSLCertificate cn=documentation
Private key is <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'>
Building c:\waptdev\tis-dropbox
Signing c:\waptdev\tis-dropbox with key <SSLPrivateKey 'C:\\Users\\documentation\\private\\documentation.pem'> 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 wapt-get duplicate <source_package> <duplicated_package> command duplicates a package downloaded from the repository and opens it as a project using the IDE that has been specified in the configuration of the WAPT Console.
Warning
Do not use this command to duplicate a host package.
Argument |
Definition |
Required |
---|---|---|
<directory> or <source_package> |
Defines the directory path to the WAPT package or the name of a specific package having a .wapt file extension. |
|
<duplicated_package> |
Defines the name of the new package. |
|
<duplicated_package_version> |
Changes the package version in the |
|
<duplicated_package_target_directory> |
Defines the path to the target directory of the duplicated package. If the target directory is not defined, the duplicated package will be stored in the same directory as the source package. |
The command wapt-get duplicate tis-firefox tis-firefox-custom returns:
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
wapt-get edit¶
Warning
This method is to be used only if you can not use the WAPT Console to create a package.
The wapt-get edit <package name> command downloads and opens the package in an IDE for modification.
The command takes one argument, the name of the WAPT package or a list of WAPT packages with the repository prefix.
The command wapt-get edit tis-firefox returns:
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, PyScripter editor will launch automatically and open the package in development mode.
You can edit a local package by going in the package folder then typing wapt-get edit ..
Another method, you can edit a local package from its directory name or wapt package name, example wapt-get edit tis-vlc.wapt.
wapt-get edit-host¶
Warning
This method is to be used only if you can not use the WAPT Console to create a package.
The wapt-get edit-host <host FQDN> command edits a WAPT host package.
The command wapt-get edit-host RND-0279A1F4-BBBE-43AE-A591-F82652E0104B returns:
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
wapt-get update-package-sources¶
The wapt-get update-package-sources <path to the package> command update run the def update_package()
function in setup.py
file.
The command wapt-get update-package-sources tis-firefox returns:
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
Using the command-lines for WaptWUA management ¶
wapt-get waptwua-scan¶
The wapt-get waptwua-scan scans the status of Windows Updates against current rules and sends the result back to the WAPT Server.
The command wapt-get waptwua-scan returns:
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 wapt-get waptwua-download command scans the status of the Windows Update Agent against current rules, then downloads the missing kb and finally sends the result to the WAPT Server.
The command wapt-get waptwua-download returns:
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 wapt-get waptwua-install command installs pending Windows Updates on the host.
The command wapt-get waptwua-install returns:
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
wapt-get waptwua-status¶
The wapt-get waptwua-status command returns the most recent Windows Update status for the host.
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-line for interacting with users ¶
wapt-get propose-upgrade¶
The wapt-get propose-upgrade command offers logged in users to launch pending upgrades.
The command wapt-get propose-upgrade returns:
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 wapt-get create-keycert [<options>]
command creates a RSA key pair and X509 certificate.
Option |
Description |
Default Value |
---|---|---|
|
Displays the name of the certificate. |
/ |
|
Displays the name of the certificate, encoded in base64 (if accents, spaces etc..). |
/ |
Defines whether the certificate / key pair will be allowed to sign software packages. |
|
|
Defines whether the certificate / key pair can be used to sign other certificates (i.e. to be allowed to behave as a main or an intermediate Certificate Authority). |
|
|
|
Defines a property (use) of the certificate. |
|
|
Defines the password for unlocking the key if |
Randomly generated password |
|
Defines the password for unlocking the key, encoded in base64 (if accents, spaces etc..). |
Randomly generated password |
|
Sets the private key as not being password protected if |
Empty |
|
Forces the overwriting of an existing certificate. |
/ |
|
Defines the name of the certificate holder’s country to register in the certificate. |
/ |
|
Defines the name of the certificate holder’s city to register in the certificate. |
/ |
|
Defines the name of the certificate holder’s Organization to register in the certificate. |
/ |
|
Defines the name of the certificate holder’s Organization Unit (Service) to register in the certificate. |
/ |
|
Defines the email address of the certificate holder to register in the certificate. |
/ |
|
Defines the path to the private key ( |
Parameter |
|
Defines the path to the public certificate ( |
Parameter |
|
Defines the password for unlocking the key of a Certificate Authority. |
/ |
|
Sets the Certificate Authority key as not being password protected. |
/ |
|
Defines the folder where the private key and the public certificate will be stored. |
Directory |
|
Copies the certificate to |
/ |
|
Defines the |
/ |
The command wapt-get create-keycert
returns:
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 default_ca_key_path
and default_ca_cert_path
are defined in waptconsole.ini
, then you must place the CA certificate in the same location otherwise this error appears:
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 wapt-get build-waptagent [</ConfigFilename>] compiles and uploads a waptagent.exe and a waptupgrade.exe packages using the /ConfigFilename
parameter to specify the content of the wapt-get.ini
configuration file of the WAPT Agents.
Note
By default, the command uses configuration elements from the waptconsole.ini
configuration file of the WAPT Console.
The command wapt-get build-waptagent returns:
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\tis-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 wapt-get upload-package <path to the package> command uploads a package onto the main WAPT repository.
The command wapt-get upload-package C:\waptdev\tis-tightvnc.wapt returns:
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 applies to Windows repositories ONLY.
The wapt-get scan-packages <directory> command rebuilds a Packages
file for a WAPT package repository.
The command wapt-get scan-packages C:waptwaptserverrepositorywapt returns:
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 applies to Linux repositories ONLY.
The wapt-scanpackages <directory> command rebuilds a Packages
file for a WAPT package repository.
The command wapt-scanpackages /var/www/wapt/ returns nothing.
Re-signing packages on the WAPT Server using a command line¶
Use this method if re-signing from the WAPT console method does not complete successfully. These commands are ONLY available for WAPT Servers running Linux.
Warning
Before using this method, ensure that your WAPT Server is safe and not under the control of an unauthorized third party entity.
Copy your
.crt
and.pem
to/tmp/
on the WAPT Server using 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.
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/
If the error Access violation appears, the reason is that the WAPT package is too voluminous.
Edit the package and check this procedure to transfert a voluminous package.
Danger
Remove the .crt and .pem from /tmp/
on the WAPT Server or the server will become a sensitive asset.
Using the command-lines with options¶
Option |
Definition |
---|---|
|
Shows the WAPT version number and exits. |
|
Shows this help message and exits. |
|
Defines the path to another file like |
|
Defines the level of log files following this list: debug, warning, info, error, critical (default: warning). |
|
Instructs not to use http service for update / upgrade. |
|
Requests a Waptservice user. |
|
Runs wapt-get update before the specified command. |
|
Forces the command. |
|
Sets up parameters as a JSon Object. |
|
Overrules the URL of the main WAPT repository as defined in the |
|
Hides the WAPT Console during the execution of the command. |
|
Filters the packages based on the current host capabilities (0/1). |
|
Increments the release version number when building a WAPT package. |
|
Sends the updated status of the host (soft, packages, etc..) to the WAPT Server after the action.
|
|
Keeps the current package signature date, and file changetime. Only use with wapt-get sign-package. |
|
Adds a filter section to wapt-get search. Section is the type of package. |
|
Redirects the output to a .ini file whose path is defined by |
|
Switches to json formatted output for the purpose of making automation scripts. |
|
Changes character encoding for the output. |
|
Defines a comma separated list of files or directories to exclude when building a package. |
|
Defines the path to the PEM X509 certificate to sign WAPT packages. Package are not signed if the parameter is not provided. |
|
Defines the path to the file containing the private key password. |
|
Defines an interactive user. |
|
Defines groups of the end-user as a json formatted array for checking installation permissions. |
|
Defines the maximum run time in minutes of the wapt-get process before being killed by any subsequent wapt-get (default: 60 minutes). |
|
Overrides the locale for installing WAPT packages, example: fr (default: en). |
|
Defines the message digest type for wapt-get sign-package. |
|
Returns only the newest version of WAPT packages when using wapt-get search. |
|
Override packages locales filter when using wapt-get search. |
|
Sets / changes the package maturity when building a WAPT package. |
|
Pins the server certificate when registering the WAPT Agent. |
|
Defines the url of the WAPT Server when the parameter |
|
Defines the url of the WAPT repository when the parameter |
|
Defines the user allowed to upload packages to the WAPT Server. |
|
Defines the user password allowed to upload packages to the WAPT Server. |
|
Logs steps to the Windows event log. |
|
Forces the use of GUI Helper even if not in development mode. |
|
Tells WAPT not to launch the IDE when editing a WAPT package. |