Reply to Thread

Post a reply to the thread: Reference previous installdir, lock down installdir

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 06-07-2018, 04:48 AM
    linder

    Re: Reference previous installdir, lock down installdir

    You are very welcome

    Friedrich
  • 06-06-2018, 04:52 PM
    naters

    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!
  • 06-06-2018, 06:17 AM
    linder

    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
  • 06-05-2018, 01:34 PM
    naters

    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.
  • 06-05-2018, 04:16 AM
    linder

    Re: Reference previous installdir, lock down installdir

    Hello,

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

    Friedrich
  • 06-04-2018, 07:42 PM
    naters

    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.

Posting Permissions

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