Retreive msi path during custom action setup

Posted on 2007-07-30
Last Modified: 2013-11-26
I have a project with a setup

After the setup is done i need to copy a file from the location of the setup file to the installed directory.
Does anyone know how to retreive the path from where the setup was run.

setup.msi in on d:\myprogram\setup.msi and installs to c:\program files\mycompany\myproduct\

At the end of the setup i need to run a custom action (I already have this) and the custom action needs to copy a txt file from d:\ to c:\program files\mycompany\myproduct\ where d:\ i variable (It depends where the user has the setup.msi file on his computer

I need the code in if possible (I could translate from C# to, but is preffered)
Question by:Sanderk
    1 Comment
    LVL 53

    Accepted Solution

    You can add the file in your deployment project.

    Example: readme.txt

    Add a Readme.txt file to install folder.

    To do this, you first have to have a Readme.txt file.
    I created a simple one and saved it. Then we start with the same options as changing the install folder. Select the Application Folder object. Then right-click, and select Add > File .... Select the Readme.txt file to include and click "Open".


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (…
    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now