2
1

I wish to deselect (and in future remove) some components from the component page if my web server says that the user has no access. I'm trying to do this deslection before the components page pops up (actually after my installdir page). I seem to be able to change the edit status ok, but I cannot chage the selection staus, either with a component selection action or by setting the selection variable directly.

<project>
<shortName>Test</shortName>
<fullName>Test</fullName>
<version>2012.1</version>
<debugLevel>4</debugLevel>
<componentList>
    <componentGroup>
        <name>Products</name>
        <description>Products</description>
        <canBeEdited>1</canBeEdited>
        <selected>1</selected>
        <show>1</show>
        <componentList>
            <component>
                <name>MY_PROG</name>
                <description>MY_PROG</description>
                <canBeEdited>1</canBeEdited>
                <requiredSize>37</requiredSize>
                <selected>1</selected>
                <show>1</show>
                <folderList>
                    <folder>
                        <description>MyProg</description>
                        <destination>${installdir}/${product_version}/Products/MY_PROG</destination>
                        <name>newfolder</name>
                        <platforms>all</platforms>
                        <distributionFileList>
                            <distributionFile>
                                <origin></origin>
                            </distributionFile>
                        </distributionFileList>
                    </folder>
                </folderList>
            </component>
        </componentList>
    </componentGroup>
</componentList>
<showPostInstallationScriptResult>1</showPostInstallationScriptResult>
<allowAddRemoveComponents>1</allowAddRemoveComponents>
<allowComponentSelection>1</allowComponentSelection>
<cdromDirectory>${product_shortname}-${product_version}-dvdrom</cdromDirectory>
<cdromDiskSize>40000</cdromDiskSize>
<cdromFirstDiskSize>40000</cdromFirstDiskSize>
<componentsDirectory>${project.version}-components</componentsDirectory>
<componentsDownloadDirectory>${components_download_directory}</componentsDownloadDirectory>
<componentsUrl>${components_download_url}</componentsUrl>
<defaultUnixFilePermissions>744</defaultUnixFilePermissions>
<disableSplashScreen>1</disableSplashScreen>
<enableRollback>1</enableRollback>
<enableTimestamp>1</enableTimestamp>
<productDisplayName></productDisplayName>
<replaceLockedFilesOnReboot>1</replaceLockedFilesOnReboot>
<requirePasswordOnStartup>0</requirePasswordOnStartup>
<saveRelativePaths>1</saveRelativePaths>
<singleInstanceCheck>1</singleInstanceCheck>
<startMenuGroupName>${product_fullname}/${product_version}</startMenuGroupName>
<uninstallerDirectory>${installdir}/${product_version}</uninstallerDirectory>
<vendor></vendor>
<windows64bitMode>1</windows64bitMode>
<windowsARPRegistryPrefix>${product_name} ${product_version}</windowsARPRegistryPrefix>
<windowsResourceFileDescription>Installer for ${product_fullname}</windowsResourceFileDescription>
<windowsResourceFileVersion>${product_version}</windowsResourceFileVersion>
<windowsSoftwareRegistryPrefix>${product_fullname}</windowsSoftwareRegistryPrefix>
<parameterList>
    <directoryParameter>
        <name>installdir</name>
        <description>Installer.Parameter.installdir.description</description>
        <explanation>Installer.Parameter.installdir.explanation</explanation>
        <value></value>
        <default>${platform_install_prefix}/${product_shortname}</default>
        <allowEmptyValue>0</allowEmptyValue>
        <cliOptionName>path</cliOptionName>
        <mustBeWritable>1</mustBeWritable>
        <mustExist>0</mustExist>
        <width>40</width>
        <postShowPageActionList>
            <if>
                <actionList>
                    <setInstallerVariable>
                        <name>project.component(Products).component(MY_PROG).canBeEdited</name>
                        <value>0</value>
                    </setInstallerVariable>
                    <setInstallerVariable>
                        <name>project.component(Products).component(MY_PROG).selected</name>
                        <value>0</value>
                    </setInstallerVariable>
                </actionList>
            </if>
        </postShowPageActionList>
    </directoryParameter>
</parameterList>
</project>

asked 11 Jun '12, 08:15

hulahoopian's gravatar image

hulahoopian
356710
accept rate: 0%


The project above seems to work fine and disable the MY_PROG component as well as disable editing it.

Your project has <allowAddRemoveComponents> option enabled. Is it possible that you are selecting directory that already has the application installed?

In this case, if the MY_PROG component was already installed, it will always be shown as selected - as the status of current installation forces the component to be selected and non-editable since the installer is not able to remove already existing components - this has to be done using the uninstaller.

Can you verify if the project above works properly when selecting an empty or non-existant directory?

link

answered 11 Jun '12, 10:43

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

1

No, it doesn't work. I changed the path to D:test1 (doesn't exist) and the MY_PROG checkbox is still ticked, though the MY_PROG label is greyed out.

I'm on Windows 7 Professional SP1 64 bit if that makes any difference.

(11 Jun '12, 10:55) hulahoopian

Just to make sure it is not a bug in the detection of the previous installation directory still picking the existing one, could you remove <allowAddRemoveComponents> from your project?

(11 Jun '12, 11:04) juanjo ♦♦

Yes, that works! However, I want the allowAddRemoveComponents on , I think (not got as far as looking at updates, etc).

(11 Jun '12, 11:11) hulahoopian

Could you write us to support@bitrock.com so we can continue investigating why the allowAddRemoveComponents setting is affecting the installation even if the installation directory has changed?

(11 Jun '12, 12:44) juanjo ♦♦

I noticed the same or similar problem. I tried to hide and unselect a component before the component selection page. The "hide" part works but not the "unselect" part if I have the component "install by default". I ended up needing to do the unselect in the "readyToInstall" action. Is this a bug?

(11 Jun '12, 21:34) gt8967884

Were you also using <allowaddremovecomponents>?

(12 Jun '12, 04:59) juanjo ♦♦

Yes, I'm using allowaddremovecomponents, and installing to a new directory.

(12 Jun '12, 15:29) gt8967884

gt8967884: We have sent you a test fix for the problem via email. Please let us know if it worked by responding to that email. Thank you.

(13 Jun '12, 05:51) wojciechka ♦♦

It is probably the same issue. If you write us to support@bitrock.com we will create a fixed build for you.

(14 Jun '12, 04:07) juanjo ♦♦
showing 5 of 9 show all
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×49
×1

Asked: 11 Jun '12, 08:15

Seen: 1,549 times

Last updated: 14 Jun '12, 04:07