Waptagent and wapt-get.ini

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
eduret
Messages: 4
Registration: Apr 20, 2016 - 2:59 p.m.

April 20, 2016 - 3:19 PM

Hello,
I'm trying to configure the console settings (co-located with the server) so that the "generated" waptagent installs a custom wapt-get.ini file (the multi-repository settings) on the target workstation.
Do you have any tips on how to achieve this without using a meta-executable?
Thank you for your replies.
ED

PS: wapt server 1.3.5.0.1495 on Windows 2008R2.
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 20, 2016 - 4:27 PM

You should be able to modify this in:

Code: Select all

c:\wapt\waptsetup\waptsetup.iss
I'm not very familiar with Inno Setup, but at first glance it's in the [ini] section of the file

You can then restart agent creation

Simon
Floflobel
Messages: 135
Registration: Oct 15, 2015 - 5:32 p.m.

April 20, 2016 - 7:55 PM

Code: Select all

def install():
    print('Disable the skip button in waptexit')
waptget = open("c:\wapt\wapt-get.ini", "w")
waptget.write("[global]\nwapt_server=http://wapt\nrepo_url=http://wapt/wapt\nuse_hostpackages=1\nwaptupdate_task_period=1\nwaptupdate_task_maxruntime=360\nallow_cancel_upgrade=0")
waptget.close()
Here is an example of how to edit the wapt-get.ini file
User avatar
sfonteneau
WAPT Expert
Messages: 2318
Registered: July 10, 2014 - 11:52 PM
Contact :

April 20, 2016 - 11:34 PM

For multi-repo:
https://dev.tranquil.it/wiki/WAPT_-_Mul ... A9p%C3%B4t

To return to the example presented here of the multi-repo (if you are indeed referring to the multi-repo):
https://wiki.lesfourmisduweb.org/index. ... -Repo_Wapt

In this example, we'll add the tranquilit repository and the fourmisduweb

To modify the parameters entered by waptagent.exe, you must therefore modify the file c:\wapt\waptsetup\waptsetup.iss and modify the ini section as follows:

Code: Select all

[INI]
Filename: {app}\wapt-get.ini; Section: global; Key: wapt_server; String: {code:GetWaptServerURL};
Filename: {app}\wapt-get.ini; Section: global; Key: repo_url; String: {code:GetRepoURL};
Filename: {app}\wapt-get.ini; Section: global; Key: use_hostpackages; String: "1";
Filename: {app}\wapt-get.ini; Section: global; Key: repositories; String: "lesfourmisduweb,tranquilit";
Filename: {app}\wapt-get.ini; Section: lesfourmisduweb; Key: repo_url; String: "https://wapt.lesfourmisduweb.org/wapt";
Filename: {app}\wapt-get.ini; Section: tranquilit; Key: repo_url; String: "https://wapt.tranquil.it/wapt";
Then restart the creation of a Wapt agent from the console

You can also do it with Floflobel's method by creating a package that will modify the file's parameters.

Code: Select all

def install():
    inifile_writestring(WAPT.config_filename,'global','repositories','lesfourmisduweb,tranquilit')
    inifile_writestring(WAPT.config_filename,'lesfourmisduweb','repo_url','https://wapt.lesfourmisduweb.org/wapt')
    inifile_writestring(WAPT.config_filename,'tranquilit','repo_url','https://wapt.tranquil.it/wapt')
eduret
Messages: 4
Registration: Apr 20, 2016 - 2:59 p.m.

April 21, 2016 - 9:31 AM

Thanks for the replies, I'll test modifying the .iss file and regenerate the client.
ED
eduret
Messages: 4
Registration: Apr 20, 2016 - 2:59 p.m.

April 25, 2016 - 10:13

Hello,
the modification to waptsetup.iss works perfectly!
Thank you.
ED
Locked