InstallAware for Windows Installer Header Image Windows Installer without Rocket Science

  InstallAware Blog


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

74 Responses to “How to run a third party EXE using InstallAware”

  1. Lex Y. Li Says:

    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. Panagiotis Says:

    Doesn’t NSIS support /q or /quiet or a flag like that for silent uninstallation? I’m not quite familiar with NSIS technology.

  3. Panagiotis Says:

    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.

  4. Lex Y. Li Says:

    Thanks for your tip, Panagiotis. However, now I get rid of that NSIS installer because it is no longer needed.

  5. Isporuka Cveca Says:

    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.

  6. verification of email address Says:

    That is very attention-grabbing, You’re an overly professional
    blogger. I have joined your feed and sit up for looking for extra
    of your wonderful post. Additionally, I have shared your website in my social

  7. Cheap Private Proxies Says: – 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

  8. USA Private Proxies Says: — 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

  9. USA Elite Proxies Says: — 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

  10. USA Private Proxies Says: — 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

  11. Says: : 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

  12. Says: : 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

  13. half x oakley Says:

    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.

  14. do my assignment Says:

    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’

  15. Super Freak Says:

    great post

  16. USA Private Proxies Says: — 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

  17. Buy Proxies Says: : 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

  18. click here Says:

    I am regular reader, how are you everybody? This paragraph posted at
    this website is genuinely nice.

  19. Казино найдж фортуна Says:

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

  20. Contractor Says:

    Good info..thanks

  21. read more Says:

    Very interesting info!Perfect just what I was looking for!

  22. click here Says:

    I am always browsing online for posts that can facilitate me.

  23. dapat menggadai emas Says:

    Great post.Never knew this, thanks for letting me know.

  24. read more Says:

    This article will assist the internet users for setting up new webpage or even a
    blog from start to end.

  25. Mobil MPV Says:

    I enjoy examining and I think this website got some truly
    useful stuff on it!

  26. Mobil MPV Murah Says:

    thank you for this marvelous post, I am glad I found this site on yahoo.

  27. click here Says:

    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.

  28. click here Says:

    Helpful info. Fortunate me I discovered your site by chance, and I’m shocked why this
    coincidence did not happened earlier! I bookmarked it.

  29. click here Says:

    Hello there, You have done a great job. I’ll definitely digg it and in my view suggest to my friends.
    I’m confident they’ll be benefited from this
    web site.

  30. visit here Says:

    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.

  31. click here Says:

    What’s up it’s me, I am also visiting this web page regularly, this site is actually good and the users are really sharing fastidious thoughts.

  32. visit here Says:

    It’s wonderful that you are getting thoughts from this piece of writing as well as from
    our discussion made at this time.

  33. soal Cbt eps topik korea Says:

    I like this website because so much useful material on here :

  34. click Says:

    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.

  35. read more Says:

    Keep up the great work, I read few posts on this internet site and I believe that your web
    blog is real interesting and has sets of great information.

  36. visit here Says:

    Thanks for the good writeup. It in fact was once
    a enjoyment account it. Glance advanced to more added agreeable from you!
    However, how can we communicate?

  37. read more Says:

    Keep up the good work, I read few content on this web site and I conceive
    that your website is really interesting and has got circles of superb information.

  38. visit here Says:

    Hi colleagues, how is all, and what you want to say about
    this piece of writing, in my view its actually remarkable for me.

  39. visit here Says:

    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.

  40. visit here Says:

    You made several good points there. I did a search on the
    issue and found a good number of persons will consent with your blog.

  41. click here Says:

    It?s hard to find knowledgeable people in this particular topic, however, you seem like you know what you?re talking about!

  42. click here Says:

    I like this weblog very much so much great information.

  43. visit here Says:

    Wow! After all I got a blog from where I be able to in fact take
    valuable facts regarding my study and knowledge.

  44. click here Says:

    I went over this site and I believe you have a lot of wonderful information, saved to fav (:.

  45. proxies for senuke Says:

    I go to see everyday some blogs and information sites to read articles, except this weblog provides quality based articles.

  46. visit here Says:

    Wow! In the end I got a web site from where I can really obtain helpful facts
    concerning my study and knowledge.

  47. click here Says:

    Why people still use to read news papers when in this technological globe the whole thing is accessible on web?

  48. click here Says:

    Hurrah! Finally I got a blog from where I know how to truly take valuable information regarding my study and knowledge.

  49. visit here Says:

    Hello.This article was really interesting, especially because I was searching
    for thoughts on this matter last week.

  50. visit here Says:

    Wow! After all I got a website from where I can genuinely obtain valuable facts
    concerning my study and knowledge.

  51. visit here Says:

    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

  52. click here Says:

    I enjoy your writing style genuinely enjoying this web site.

  53. visit here Says:

    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

  54. visit here Says:

    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

  55. click here Says:

    Why users still make use of to read news papers
    when in this technological globe everything is existing on web?

  56. click here Says:

    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

  57. click here Says:

    Wow! Thank you! I continually needed to write on my website something like that.
    Can I take a fragment of your post to my blog?

  58. visit here Says:

    I got this web site from my friend who shared with me regarding
    this site and now this time I am visiting this web site and reading very informative articles here.

  59. visit here Says:

    Hurrah! Finally I got a blog from where I know how to genuinely get
    helpful facts regarding my study and knowledge.

  60. click here Says:

    What’s up to every , as I am truly eager of reading this weblog’s post to be updated
    on a regular basis. It includes nice material.

  61. играть в автоматы Says:

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

  62. click here Says:

    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.

  63. visit here Says:

    I have recently started a blog, the info you offer on this
    web site has helped me greatly. Thanks for all of your time & work.

  64. Visit Here Says:

    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.

  65. my singing monsters Says:

    GPS is really a heaven sent gadget, you can always pinpoint your exact location wherever you are~

  66. toon blast hack Says:

    Use this awesome online toon blast cheats tool to get unlimited free resources in the game

  67. Myung Aline Says:

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

  68. pengeluaran hk Says:

    Baru sempet baca postingan ini hari ini, dan ternyata kontennya menarik banget. Kayaknya aku akan sering mampir di mari, semangat update terus kontennya ya min.

  69. helpful resources Says:

    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!

  70. Dong Coryea Says:

    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.

  71. Elliot Redford Says:

    intitle:*You should take part in a contest for one of the best blogs on the web. I will recommend this site!

  72. Says:

    Thanks for the update and helpful information.

  73. Says:

    I agree with the comment above

  74. çeviri çözümleri Says:

    çeviri çözümleri

Leave a Reply