+ Reply to Thread
Results 1 to 6 of 6

Thread: Reference previous installdir, lock down installdir

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Reference previous installdir, lock down installdir

    Hello,

    After looking at some example projects including Lock Directory, reading up some topics like Detect Previous Version, and reading a few related threads including this one, I still haven't been able to figure out how to get the installer to do one of two things.

    Either:
    1) Refer to the registry value "InstallPath" (%_SB_INSTALLDIR%) that I have the installer create in "HKEY_LOCAL_MACHINE\SOFTWARE\*My product*", which would then replace (or skip) the "Select Install Folder" dialog since an install directory has already been determined during a previous installation. This is my preferred choice.
    or
    2) Prevent users from picking a custom installation path themselves, thereby being forced to install to the path I've specified.

    I may have not figured this out yet, despite the resources, because I'm quite new to this stuff and the answers didn't make enough sense to me to pull it off. I'm not a developer myself (quality assurance), I was merely handed the installer task by my company, so you may have to be gentle and be very specific. Hopefully someone can help me.

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Reference previous installdir, lock down installdir

    Hello,

    We'll develop a demo for you and upload it later today.

    Friedrich

  3. #3

    Default Re: Reference previous installdir, lock down installdir

    Quote Originally Posted by linder View Post
    Hello,

    We'll develop a demo for you and upload it later today.

    Friedrich
    Sounds good! Thank you, Friedrich.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Reference previous installdir, lock down installdir

    Okay, here we go. We have uploaded a demo for you:

    http://www.lindersoft.com/projects/LockedFolder.zip

    Please use your own Product GUID in Line 37. This will read the installation folder from a previously installed product. If the installer detects the installation, it sets the runtime variable %VAR_ALREADY_INSTALLED% to "1". In Line 58, we set the Dialog Label to DLG_SELECTFOLDER.

    In Lines 62-64, if %VAR_ALREADY_INSTALLED% equals "1" (means: the product is already there), skip (hide) the Select Installation Folder dialog.

    There are quite a few more ways to handle this. But does this one work for you?

    Friedrich
    Attached Images Attached Images  

  5. #5

    Default Re: Reference previous installdir, lock down installdir

    Yes, thank you! That was very helpful and worked like a charm after I figured out that I had to define the DLG_SELECTFOLDER var in the Dialog section. Thanks again!

  6. #6
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: Reference previous installdir, lock down installdir

    You are very welcome

    Friedrich

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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