Page 1 of 3 123 LastLast
Results 1 to 5 of 15

Thread: Changing the install dir of a feature

  1. #1
    Join Date
    Feb 2002
    Posts
    202

    Changing the install dir of a feature

    Hi

    I have 2 features in my software. I would like to be able to change the install dir of one of the feature before installing the component without letting the user know.

    Is it possible to do this on the fly? As i will take the install path for this feature out of the registry

    Thanks

    Sarah

  2. #2
    G-Hell Guest
    Hi Sarah !

    In the case of a Basic MSI project, I think you can use a System Search to get your path in the registry and put it into a property, then use this property as destination for your feature (instead of default value [INSTALLDIR]).

    In case of a Standard project, you can use the FeatureSetTarget function in your script to set the Feature's destination.

    Hope this will help,
    Jean-Luc

  3. #3
    Join Date
    Feb 2002
    Posts
    202
    The problem is that both features at the start point to the install directory as default. However if one of these features is installed to a different location from a different product installation, i would like to change this before the user sees.

    Only for one of the features not both so it may go from the installdir to e:\test\test harness for example.

    is this possible??

    i would get e:\test\testharness from the registry

    thanks

  4. #4
    G-Hell Guest
    Never tested it but I think it is possible :

    Create a property (lets say MYFEATUREPATH) which default value should be the same as [INSTALLDIR]. You can handle this with the Direct Editor. Use this property as your Feature Destination.

    You can get the path from registry using a System Search on a registry key that should contain a potential alternate path (ie e:\test\testharness) and put it in MYFEATUREPATH.

    As the AppSearch is one of the first action in the Installation Execute Sequence, your feature will be installed in INSTALLDIR if nothing was found in the registry, or in the path found in the registry if it existed.

    I think this should work for a basic MSI project.

    Cheers,
    JL

  5. #5
    Join Date
    Feb 2002
    Posts
    202
    Hi

    Ok i created a property and then set a system search to find the value. Then if not default back to [InstallDir]

    I then try to go to the deature properties and change the destination property to the new property i created in the system search.

    However when i try and type this value in i get the error:

    "The data entered is invalid"

    Anyone have any ideas how i can assign a property from the property manager to a feature?

    Thanks for being patient so far

    Sarah

Page 1 of 3 123 LastLast

Posting Permissions

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