How to run a third party EXE using InstallAware

In my last post, we covered using InstallAware to install or un-install a third party MSI package. In this post we’ll cover a related task, running a third party EXE setup package, using the Run Program As command.

What does Run Program As do? As the name suggests, it runs a program (an EXE file) or pretty much any other kind of document/file that is recognized by the system and has a registered viewer/editor. The Run Program As command is very similar to the Run Program command – it has a few extra bells and whistles, so we’ll cover that one instead of the simpler Run Program command here. But remember that you are free to use either one that suits your needs…


As we did for the MSI setup, we’re going to place our Run Program As command just before the Apply Install command. Before moving further, also find out what command line parameters your EXE setup takes. Most EXE setups have fairly standard switches, such as “/s” or “/q” to indicate (without the quotes, of course) a silent installation. Other optional command line switches may also be available/necessary. Since this is different for each EXE setup, you’ll have to research this one on your own. Try running the setup file with a “/?” or a “/h” command line switch and see if it provides documentation on its proper usage. It’s also always a good idea to check the website of either the software vendor or the maker of the setup authoring toolkit, as one of the two is very likely to have their command line switches documented somewhere.

Let’s assume that the EXE setup we’re running today takes a parameter named “/install” to indicate an installation and uses “/uninstall” to indicate removal. So configure the Run Program As command window as in the screenshot below. If you want to run the EXE setup silently – probably a good idea – also add its silent installation parameter to the command line. I’ll also to catch the result of execution inside a variable called “RUN_ERROR“. If you haven’t defined this variable before, Run Program As will automatically define it for you. Of course, you’ll again need to check with your vendor documentation to find out what the return values for this EXE setup program are. Most EXE based setups return 0 to indicate success and 3010 to request a reboot (notably, Microsoft’s EXE setups). Your own experience may vary, based on the kinds of EXE files you’re trying this out with.

You probably want InstallAware to wait for your EXE setup to finish installing before moving on to the main installation. Running two setups on the target system simultaneously may not be that great of an idea after all 🙂 Check the “Wait for Program to Finish” check-box to enable this option. Also note that unless you wait, the RUN_ERROR variable will not hold the actual value returned by your EXE setup, and it will only be useful in determining if the EXE setup was actually successfully launched.

As for the uninstall, the process is very similar. We again call Run Program As, but this time with the “/uninstall” parameter. Place the command right before Apply Uninstall to make sure it’s being run at the right time in our MSIcode script, which in this case becomes right before the un-installation of our own product.

And yet again, I use the RUN_ERROR variable to catch any errors. A simple If command can later test the value of RUN_ERROR for me and determine if everything is kosher.

Well, that’s about it for running programs! While we’re at it though, another useful bit of information: You may also use Run Program As to execute your own main program file after your own setup finishes installing. By default, all InstallAware themes have a “Run Program Now” kind of checkbox in the setup finished wizard step, but even if your end-user checks it, that won’t do anything unless you let InstallAware know what to run here:

Replace the “Comment: TO-DO: Insert command that starts your application here” line with your own Run Program As command, specifying a target path like “$TARGETDIR$\yourexenamehere.exe“. Please note that most .NET applications today DO NEED their working directory field set to “$TARGETDIR$“, otherwise they will silently exit or raise strange startup errors. A well-authored application should never make assumptions about its startup folder, but some of us still do 😉

The Run Program command, by the way, automatically sets the startup folder to the same folder as the program being run – so no need to manually enter a directory in there, if you used that command instead.

And for that matter, the Run Programs visual designer in the InstallAware IDE lets you do everything we did above graphically – even choosing the scheduling of the program being run:
a) Before Install
b) After Install
c) Before Uninstall
d) After Uninstall
e) Finish Dialog

 
Completely visually. But hey – it was fun to learn how to do it in script too, wasn’t it 😉 And if I had told you that at the beginning, you might not have read this far 😉 At least now you know what MSIcode script the Run Programs visual designer emits in the background for you 🙂

Well have a great month and talk to you soon!

Panagiotis Kefalidis
Software Design Team Lead
InstallAware Software Corporation

93 Replies to “How to run a third party EXE using InstallAware”

  1. Panagiotis, as a user of InstallAware Studio, I have a question to ask. What about uninstalling a NSIS powered installer? I found it hard because after locating the uninstaller from registry and “Run Program” with it, “Run Program” returns immediately before any other uninstallation operations because NSIS uninstaller is just a wrapper. It is an annoying issue with NSIS installer but one of my project runtime is powered by NSIS which is out of my control. So do your InstallAware guys know any workaround?

  2. You can upgrade to Studio Admin though and use PackageAware to capture the process of NSIS and create an InstallAware package, exactly the same as NSIS. This project can be then fully customized as it’s a native InstallAware .mpr file. You can edit whatever you want through the IDE.

  3. Amazing goods from you, man. I’ve comprehend your stuff previous to and you are just too great. I truly like what you’ve acquired here, surely like what that you are saying and the way in which you say it. You make it entertaining and you nonetheless care for to maintain it wise. I can’t wait to read far much more from you. This is really a terrific web site.

  4. DreamProxies.com – lowest priced elite private proxies with 50% low cost! Elite quality, Unlimited proxies, Very speed along with Least expensive price ranges – just $0.25 every proxy! Best personal proxies only on DreamProxies.com

  5. DreamProxies.com — cheapest high level private proxies with 50% discounted! Top-notch quality, Unlimited proxies, Very speed and also Least expensive prices – only $0.25 per proxy! Finest individual proxies only from DreamProxies.com

  6. DreamProxies.com — least expensive top-notch private proxies with 50% lower price! High level quality, Limitless proxies, Very speed and Cheapest charges – only $0.25 every proxy! Greatest non-public proxies simply from DreamProxies.com

  7. DreamProxies.com — least expensive high level private proxies with 50% price cut! Top-notch quality, Limitless proxies, Very speed and also Cheapest price ranges : just $0.25 each proxy! Ideal personal proxies only from DreamProxies.com

  8. DreamProxies.com : least expensive high level private proxies with 50% discount! Top notch quality, Unrestricted proxies, Super speed as well as Cheapest rates : simply $0.25 per proxy! Best personal proxies only from DreamProxies.com

  9. DreamProxies.com : most affordable professional private proxies with 50% discounted! Top notch quality, Unlimited proxies, Excellent speed and Least expensive prices — simply $0.25 per proxy! Best non-public proxies only on DreamProxies.com

  10. View Content articles Video clips By CategoryCareers WorkComputersCulture SocietyFood DrinkHobbies, Games ToysHome GardenLegalParties EntertainingPetsSports FitnessHi, i am Donald using Skilled Community and I’m planning to teach you how you can alter spectacles. Today we’ll talk about the particular realignment associated with sun shades. Any time planning to alter your own sun shades you have to see whether it’s actually a metal framework or possibly a plastic-type framework. The particular adjustments of many support frames are similar, the particular adjustments can be made at the temples or wats, the particular bridge, the particular nostril sleeping pad on the metal, nonetheless on the plastic-type framework there is absolutely no nostril sleeping pad, there aren’t any nostril parts to get altered. If the spectacles, in case your sun shades can be a total metal framework selection they can be altered consequently using the very same options for adjusting the full metal framework. If the sun shades are of the particular plastic-type selection they can be altered using the very same techniques like a total plastic-type framework. Which is the method that you make the adjustments upon sun shades.

  11. If you do that, chances are you won’t experience information overload.
    Any time a blog is added it is vital to develop a plan for producing content on a regular basis.
    In a toddy bar, or in a ‘thattukkada (small eat out joint),’ men with bare chests can be heard debating communism and politics over a steaming up of milky tea and ‘puttu and kadala’
    curry.

  12. DreamProxies.com — lowest priced elite private proxies with 50% lower price! Top notch quality, Limitless proxies, Super speed as well as Least expensive price ranges — only $0.25 each proxy! Greatest private proxies only by DreamProxies.com

  13. DreamProxies.com : cheapest top-notch private proxies with 50% price cut! Top notch quality, Unrestricted proxies, Super speed and also Least expensive prices : simply $0.25 every proxy! Very best exclusive proxies only by DreamProxies.com

  14. Прекрасный обзор! Я частенько захожу
    на этот онлайн ресурс,
    и поистине удивлен:) Здесь размещена действительно необходимая информация в
    каждом разделе, и такого материала крайне много!
    Именно его мне не хватало, чтобы закончить последний раздел моего труда) Прежде я долгое
    время искал именно эту информацию.
    Огромное спасибо, удачи:)

  15. I have been exploring for a little bit for any high-quality articles or blog posts in this sort of area
    . Exploring in Yahoo I ultimately stumbled upon this web site.
    Reading this information So i’m satisfied to convey that I’ve an incredibly excellent uncanny feeling I found out just what I needed.

    I such a lot for sure will make sure to do not put
    out of your mind this web site and provides it a look regularly.

  16. I don’t even know the way I finished up here, however I assumed this
    publish used to be good. I do not understand who you might be but certainly you’re going to a well-known blogger for those who aren’t already.
    Cheers!

  17. Attractive section of content. I just stumbled upon your
    web site and in accession capital to assert that I
    acquire actually enjoyed account your blog posts.
    Anyway I’ll be subscribing to your augment and even I achievement you access consistently rapidly.

  18. Hiya, I’m really glad I have found this info.
    Today bloggers publish only about gossips and internet and this is really frustrating.
    A good website with exciting content, that is what I need.
    Thank you for keeping this web-site, I will be visiting it.
    Do you do newsletters? Can’t find it.

  19. Definitely imagine that which you said. Your favorite reason appeared to be at the web
    the easiest factor to take into accout of. I say to you,
    I certainly get irked even as other people think about
    worries that they plainly do not recognise about.
    You controlled to hit the nail upon the top and outlined
    out the entire thing without having side-effects , other folks can take
    a signal. Will likely be back to get more. Thanks

  20. Undeniably imagine that that you said. Your favourite reason seemed to be on the net the simplest thing to be
    aware of. I say to you, I certainly get irked even as people consider concerns that they plainly do not recognize about.
    You managed to hit the nail upon the top as well as defined
    out the whole thing with no need side effect , folks could take a signal.

    Will likely be again to get more. Thanks

  21. Definitely imagine that which you said. Your favorite reason seemed to be at the web the easiest thing to remember
    of. I say to you, I definitely get irked at the same time as other folks think about issues
    that they just don’t understand about. You controlled to hit the nail
    upon the top and defined out the entire
    thing without having side effect , people could take a signal.

    Will likely be again to get more. Thanks

  22. Undeniably imagine that that you stated. Your favorite
    justification seemed to be at the internet the easiest factor to take note of.
    I say to you, I certainly get annoyed even as people consider issues that they plainly do not recognise about.

    You managed to hit the nail upon the top and also defined
    out the entire thing with no need side-effects , people could take a signal.
    Will probably be again to get more. Thanks

  23. Я был очень счастлив найти этот веб-сайт:) Просто
    хотел выразить признательность за создание этого
    невероятного
    поста. Я оценил каждое слово из
    статьи, и сохранил
    ресурс у
    себя в избранном, чтобы всегда быть в курсе появления новой
    информации;)

  24. Nice post. I used to be checking constantly this weblog and I’m
    impressed! Very helpful info specially the remaining phase 🙂 I
    take care of such information a lot. I was seeking this certain info for
    a very lengthy time. Thanks and best of luck.

  25. I actually wanted to compose a simple note to appreciate you for these stunning information you are showing here.
    My long internet investigation has now been recognized
    with really good content to exchange with my friends and family.
    I ‘d state that that most of us website visitors are truly lucky
    to live in a wonderful website with so many
    special people with valuable points. I feel very much blessed to
    have come across the webpages and look forward to tons
    of more awesome times reading here. Thanks again for everything.

  26. I’m pleased by the manner in which installaware.com covers this sort of issue. Usually on point, sometimes controversial, without fail well-researched and more often than not quite thought-provoking.

  27. I used to be suggested this web site by my cousin. I am no longer positive whether this submit is written by him as no one else realize such targeted about my difficulty. You’re amazing! Thank you!

  28. Do you have a spam issue on this site; I also am a blogger, and I was wanting to know your situation; many of us have developed some nice methods and we are looking to trade methods with others, be sure to shoot me an e-mail if interested.

  29. Привет, я думаю, что это прекрасный блог.

    Я перехожу сюда очень часто.
    Надо сохранить этот адрес в “Избранное”.
    Деньги и свобода лучший способ изменить жизнь, – может вы разбогатеете и продолжите обучать других
    людей

  30. A este respecto me remito ala página de precios de km 77 en la que aparecen decuentos de 10, 11 y 12000 €. Esto que si bien es perfectamente legítimo no dice mucho de la confianza que tienen en su producto. Ejemplos miles: alimentos de supermercados, electrodomésticos de centros comerciales (y no comerciales), …. Todos aplican descuentos porque es una forma de vender stock en un momento concreto, porque es un gancho para atraer al público. Si en esta entrada sólo hubiera comentarios de quienes han visto-probado un c seria onanismo por tu parte.

  31. Llevado a la seccion de Telefonia de dicho Corte Ingles,ya que mi mujer lo habia comprado alli, se hacen cargo del telefono,mandandolo al servicio tecnico de Samsung….esto lo hacen cuatro veces, viniendo el telefono NUNCA arreglado, es mas,la ultima vez que llego,fue delante justo del comercial y jefe de la seccion, que mostro su problema de reinicio…Dio la impresion que no me creian hasta que lo vieron ellos.

  32. In times past, old Greeks believed that the herb
    thyme gave them guts. Today, thyme fallen leaves are made use of for
    cooking as well as are commonly discovered in a selection of mouthwatering dishes
    that are easy to prepare.

    For a basic side dish, a variety of different mushrooms can be sliced
    and sauteed with garlic and also thyme herbs. When making baked meats, at the end
    of cooking the roast, you can remove it and then make use of a little wine
    to deglaze, or unloosen the bits that adhere to all-time low of the frying
    pan, and afterwards take those juices, include
    the herb thyme to it, and prepare it down to a reduction that is very concentrated in taste.
    Chicken may also be roasted with a couple of tbsps of
    lemon juice, some minced garlic as well as a dropping of thyme leaves to give fantastic flavor.
    Garlic bread can be prepared with shredded melting cheese, such as
    mozzarella, on the top, combined with some dried thyme.

    This type of cheese salute is terrific with a selection of hearty soups for a simple yet pleasing supper.
    The acquainted home cooking macaroni as well as cheese can be enhanced with the addition of dried thyme, diced
    tomatoes and also sauteed mushroom.

  33. Доброго денька! вы пишете о
    той новой статье, полезной для саморазвития?
    Я собиралась завести свой собственный блог в ближайшем будущем, но пока сложно сделать определиться между BlogEngine/WordPress/b2evolution и Drupal.
    Почему я спрашиваю – потому что этот дизайн и
    стиль, кажется, отличается от большей части блогов,
    а я ищу нечто совершенно уникальное.
    П.С. Приношу извинения за вопросы не по теме,
    но я должен был спросить!

  34. идеальное, чтобы составить парочку
    планов на долгосрочную перспективу.
    Я читал этот блог и, если необходимо, могу просто порекомендовать вам несколько цепляющих материалов или советов.
    Может быть, вы могли бы написать следующие статьи как продолжение этой.

    Я намереваюсь читать еще материалов об этом!

  35. Добрый день! Кто-то из подписчиков
    моей страницы в ВКонтакте подписан на автора этого сайта
    и может перейти туда, чтобы
    посмотреть отличные материалы? Я оставил
    закладку и обязательно поделюсь с моими подписчиками!
    Прекрасный блог, замечательный дизайн и стиль.

  36. Добрый день! Кто-то из подписчиков моей страницы
    в ВКонтакте подписан на автора этого веб-сайта и
    может перейти туда, чтобы оценить
    увлекательные материалы? Я оставил закладку
    и обязательно поделюсь с моими подписчиками!
    Замечательный блог, отличный стиль и
    дизайн.

  37. Have you ever thought about writing an e-book or guest authoring on other websites?
    I have a blog centered on the same topics you discuss and would love to have you share
    some stories/information. I know my audience would value your work.
    If you are even remotely interested, feel free to shoot me an e-mail.

  38. “Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.

  39. “Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.

Leave a Reply to Google Ads Experts HCM Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.