Run Program Not Working

Got a problem you cannot solve? Try here.
vaibhavopkey
Posts: 28
Joined: Wed Feb 05, 2025 6:13 am

Run Program Not Working

Postby vaibhavopkey » Thu Apr 24, 2025 8:44 am

I'm using InstallAware Multi-Platform Version 2025 (2.1) [Windows x86].
The Run Program command always returns -1. I'm using commands that work fine in CMD, but they still return -1 when run through Run Program.

Code:

Code: Select all

Run Program cmd.exe echo Hello, World! (WAIT, get result into variable _appsOpen)
if Variable _appsOpen Equals -1
  MessageBox: , $_appsOpen$ apppppppp
  Terminate with Exit Code -1
end


Code: Select all

~InstallAware Multi Platform Clipboard Data~
~End~
~{900F6C01-C5F3-4FB0-94E1-7CBBC988E474}~
~Terminate with Exit Code~
~{4C7C165D-9E70-49E1-96FC-FA7261DAA405}~
~-1~
~MessageBox~
~{036B6704-CE73-49B8-BD48-3CF98F48CE90}~
~~
~$_appsOpen$ apppppppp~
~0~
~1~
~~
~If~
~{DACED6AC-6586-423F-8CC4-EF00C0ABB87B}~
~_appsOpen~
~0~
~-1~
~FALSE~
~Run Program~
~{BD823625-34B1-445A-8929-AC8D2E9B50AE}~
~cmd.exe~
~FALSE~
~echo Hello, World!~
~TRUE~
~_appsOpen~


JohnGaver
Posts: 197
Joined: Mon Feb 05, 2024 6:15 pm

Re: Run Program Not Working

Postby JohnGaver » Thu Apr 24, 2025 11:06 am

Have you tried specifying the full path to the program you're trying to invoke?
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

vaibhavopkey
Posts: 28
Joined: Wed Feb 05, 2025 6:13 am

Re: Run Program Not Working

Postby vaibhavopkey » Thu Apr 24, 2025 11:56 am

I give the full path to cmd.exe (i.e., C:\Windows\System32\cmd.exe), it opens the command line, but my program does not run.

Code: Select all

Run Program C:\Windows\System32\cmd.exe /c start "" "$TARGETDIR$\Opkey Execution Agent\ExecutionAgent_Web_NetCore.exe" (WAIT, get result into variable _appsOpen)


Using this code, I want to launch my program's .exe.
Can you provide me with a sample code showing how to launch my application’s executable?

JohnGaver
Posts: 197
Joined: Mon Feb 05, 2024 6:15 pm

Re: Run Program Not Working

Postby JohnGaver » Thu Apr 24, 2025 12:44 pm

Yes, launch your program directly and don't use cmd.exe as an intermediary.

You can do the latter if you're interested in running a batch file or similar.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

vaibhavopkey
Posts: 28
Joined: Wed Feb 05, 2025 6:13 am

Re: Run Program Not Working

Postby vaibhavopkey » Thu Apr 24, 2025 1:16 pm

The program launches without using CMD, but if I want to quit my running app and then install, how can I do that without using CMD?

JohnGaver
Posts: 197
Joined: Mon Feb 05, 2024 6:15 pm

Re: Run Program Not Working

Postby JohnGaver » Thu Apr 24, 2025 1:40 pm

I don't understand the second part of your question - how does cmd help you here?

Can you describe your scenario in a little more detail?
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm

vaibhavopkey
Posts: 28
Joined: Wed Feb 05, 2025 6:13 am

Re: Run Program Not Working

Postby vaibhavopkey » Thu Apr 24, 2025 2:44 pm

How can I close a running application during installation in installaware? The application should be closed first, and then the installation process should start.

JohnGaver
Posts: 197
Joined: Mon Feb 05, 2024 6:15 pm

Re: Run Program Not Working

Postby JohnGaver » Thu Apr 24, 2025 4:16 pm

Using the Restart Manager is the best (and official) way to do this on Windows, but since it is not a platform agnostic solution, it is not supported in InstallAware Multi Platform.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 79 guests