Is there a way to have psexec wait for installer to finish before exiting?

Got a problem you cannot solve? Try here.
sol952
Posts: 24
Joined: Thu Apr 21, 2016 9:20 am

Is there a way to have psexec wait for installer to finish before exiting?

Postby sol952 » Thu Jan 05, 2017 11:44 am

When I install using something like this:
psexec -s msiexec /i MyMsi.msi /qn

it gives me:

msiexec exited on "PCNAME" with error code 0.

it then starts to install and installs correctly as the error code would suggest. Is there a way have it wait until the install is finished before returning?

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Is there a way to have psexec wait for installer to finish before exiting?

Postby FrancescoT » Thu Jan 05, 2017 1:41 pm

Dear sol952,

honestly I don't recall if "psexec" Waits for process completion but for sure, the MSI file just returns after it's execution.

if it doesn't make any difference, you may try to execute an EXE package in place of a MSI file. If the problem is due the MSI file, the psexec process should wait as expected.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

sol952
Posts: 24
Joined: Thu Apr 21, 2016 9:20 am

Re: Is there a way to have psexec wait for installer to finish before exiting?

Postby sol952 » Fri Jan 06, 2017 1:46 pm

When I use "psexec program.exe" it waits until the install is done to exit
When I use the psexec line in the first comment without the /qn I can see it exits as the welcome dialog shows up
When I use psexec on a microsoft msi it waits until the end to exit (I tried it with XNA framework 4.0)

Is there a way that I can get my MSI to exit from psexec at the same time as the exe and the microsoft msi

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Is there a way to have psexec wait for installer to finish before exiting?

Postby FrancescoT » Mon Jan 09, 2017 3:29 pm

Dear sol952,

as I said previously, the MSI layout just returns after it's execution.

Unfortunately what you reported is a know issue and currently, it doesn't exist a possible workaround that can be used in these cases. I am very sorry, but for now the only possible alternative is to call an EXE version of the package.

This is not because "InstallAware installers *do NOT* observe standard MSI behavior", but it's instead due a limitation of the MSI engine. A MSI must be generated observing the official MSI layout format, otherwise it will not work at all.

Differently from what happens with other MSI deployment tools, InstallAware offers features which are not available by default with the standard MSI API. To make this possible, InstallAware integrates different approaches and among these, there is the use of more than one MSI database for each single MSI package layout generated by IA. This approach offers more advantages respect the "standard" MSI functionality.

By the way, even Microsoft uses an EXE layout when needs to combine nested MSI. This mainly consist in a "exe" wrapper used to embed some nested MSI packages. In fact if you look at the current Microsoft distribution, you will find that are very few (...currently these are very rare in reality) those packages which are available as a direct MSI layout format.

This solution is essentially due the fact that the MSI engine is not able to wait for the completion of a MSI package and when this gets executed from another MSI database (nested MSI execution).

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

sol952
Posts: 24
Joined: Thu Apr 21, 2016 9:20 am

Re: Is there a way to have psexec wait for installer to finish before exiting?

Postby sol952 » Tue Jan 10, 2017 8:38 am

Thanks! I will use a different method to wait for the install to finish then.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 42 guests