Results 1 to 5 of 5

Thread: Does Installer Class have access to File System?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2003
    Posts
    74

    Does Installer Class have access to File System?

    Ok, I have a project, which has an Installer Class. I made this project a primary output for my VS.NET setup program, so it can run the code in my Installer class during the "Install" phase.

    From the Installer Class code, can I access the files I've put in the "File System"? If so, how?

    Thanks!

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    I think that you need to use a custom action - but yes, you can do things like add files to the client system.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2003
    Posts
    74
    How can I use the CustomActionData and Condition Property in Custom Actions? I really don't understand any of the samples out there by Microsoft or people that have posted solutions. I need a detailed solution.

    This is what I have so far. Under Custom Actions, I have added a custom action under the install phase for an .exe to execute. But, the Installer class is the one that has the code behind whether or not this .exe needs to execute. How do I get a boolean variable in my Installer Class code to work with CustomActionData and Condition Property in my Custom Action?

    The Installer Class is already a primary output for my setup program, so that code gets executed durint my setup. In there, I need to pass *something* to my custom action properties. How and what do I pass?

  4. #4
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Dublin (Ireland)
    Posts
    304
    Go and read up on the documentation again, Custom actions can occur at any stage during the installation process, so they can occur after the files have been added to the target directory. Admittedly the documentation does not cover it well, but the previous reply did strongly point you in the right direction

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2003
    Posts
    74
    There has to be someone who has done custom actions...

    This is what I have so far now:

    In my Installer Class, I figure out some conditions with code. Then, I set a CustomActionData item like so:

    Me.Context.Parameters.Item("speech") = "1"

    In the custom action, I want to use this "speech" variable/item as my condition to run an .exe (which I have placed under custom actions). In the condition property for my .exe custom action, I put

    speech = "1"

    But, it still doesn't run my .exe, even though this item is set to "1" (I tested it by displaying a msgbox with the contents of Me.Context.Parameters.Item("speech"), and it shows "1")

    Any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width