[SOLVED] Starting an application after installation

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
mart03
Messages: 47
Registration: December 26, 2017 - 11:03

March 28, 2018 - 3:43 PM

Hello,

I'm creating a package and I'd like my application to launch automatically after installation.
How can I do this?

I tried using `run(r...)` but I realized it closes the application afterward.

Thank you for your help.

Martin
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

March 28, 2018 - 4:00 PM

The installation is done in the system account, so the application you launch will also launch in that context.
Is that what you want? Or do you want to launch the application in the user session?

One solution could be to launch your process via the Windows Task Scheduler.
Tranquil IT
mart03
Messages: 47
Registration: December 26, 2017 - 11:03

March 28, 2018 - 4:54 PM

Thank you for your reply.

The application installs normally, so there's no problem there. I would then like a command to simply start the program (for your information, the program is called Stickies). So, I want to launch it within the user session.

Thank you.

Martin
User avatar
dcardon
WAPT Expert
Messages: 1932
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

March 30, 2018 - 8:04 PM

Good evening Martin,
mart03 wrote: March 28, 2018 - 4:54 PM Thank you for your reply.

The application installs normally, so there's no problem there. I would then like a command to simply start the program (for your information, the program is Stickies). So, to launch it within the user session.
As Hubert mentioned, the installation is done using the LOCAL SYSTEM account, and there's no generic way to perform an action within the user's session from the SYSTEM account. In fact, it's not even certain that a session will be open when the installation runs (e.g., the installation at the time of waptexit).

If you absolutely must do it, you could look into creating a scheduled task with permission to interact with the desktop and having it run directly. But that's more of a Windows issue than a WAPT issue.

Happy Easter weekend!

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
mart03
Messages: 47
Registration: December 26, 2017 - 11:03

April 3, 2018 - 2:46 PM

Okay, I see, thank you for your solution!
Locked