We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

nottoc
Posts: 1
Joined: Fri Feb 27, 2015 8:41 pm

getting a config directory

I have a custom action that edits my config file based on on an input from a custom dialog. For this install I need to expand the dialog to also get a download path which will also be updated in the config file. Below is the WXS I have at the moment. Whenever I click on the Browse button I get an error concerning the property ZIPDIRECTORY, I first tried setting the value to a <Directory ID="dirname" ...
I tried placing the directory reference in various places. Then I got rid that <directory entry entirely and I tried setting the property directly, I've tried the following:
<Property Id="ZIPDIRECTORY" Value="." />
<Property Id="ZIPDIRECTORY" />
<Property Id="ZIPDIRECTORY">C:\</property>
<Property Id="ZIPDIRECTORY" Value="C:\" />
<Property Id="ZIPDIRECTORY" Value="APPLICATIONROOTDIRECTORY" />

I'm not having very much luck finding an answer via Google. The errors I've gotten include:
Error 2343: Specified path is empty.
Error 2819: Control Folder on dialog InstallDlg needs a property linked to it
Error 2343: Specified path is empty.

There may have been others. The previous value is sent to my custom action via Session.CustomActionData

Thanks for your help. The only thing I edited out was my list of files to include.

Code: Select all

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Product Id="55a8b9ce-803b-4455-b600-aff9cbc70709"
Name="Something"
Language="1033"
Version="!(bind.FileVersion.Something.exe)"
Manufacturer="EMSI"
UpgradeCode="f339527d-68d6-47f0-8ab7-fd25a38d23ad">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Binary Id="Something.Install.CustomAction.CA.dll" SourceFile="..\Something.Install.CustomAction\obj\$(var.Platform)\$(var.Configuration)\Something.Install.CustomAction.CA.dll" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />

<Directory Id="TARGETDIR" Name="SourceDir">
	<Directory Id="ProgramFilesFolder">
		<Directory Id="EMSIFolder" Name="EMSI">
			<Directory Id="APPLICATIONROOTDIRECTORY" Name="Something">
				<Component Id="APPLICATIONROOTDIRECTORY" Guid="{a6cf2817-7027-4ac4-bc51-69253582599a}">
					<CreateFolder />
					<RemoveFile Id="PurgeAppFolder" Name="*.*" On="uninstall" />
				</Component>
			</Directory>
		</Directory>
	</Directory>
</Directory>
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONROOTDIRECTORY" />
<Property Id="ZIPDIRECTORY" Value="C:\" />
<UIRef Id="WixUI_InstallDir" />

<DirectoryRef Id="APPLICATIONROOTDIRECTORY">

</DirectoryRef>

<Feature Id="MainApplication" Title="Main Application" Level="1">

</Feature>

<CustomAction Id="SetupCustomActionData" Property="BuildConfigurations" Value="ENVIRONMENTSELECTION=[ENVIRONMENTSELECTION];APPLICATIONROOTDIRECTORY=[APPLICATIONROOTDIRECTORY];ZIPDIRECTORY=[ZIPDIRECTORY]" />
<CustomAction Id="BuildConfigurations"
BinaryKey="Something.Install.CustomAction.CA.dll"
DllEntry="BuildConfigurations"
Execute="deferred"
Return="check" />
	
<InstallExecuteSequence>
<Custom Action="SetupCustomActionData" After="InstallFiles">Not Installed</Custom>
<Custom Action="BuildConfigurations" After="SetupCustomActionData">Not Installed</Custom>
</InstallExecuteSequence>

<UI>
	<TextStyle Id="DefaultFont" FaceName="Tahoma" Size="8" />

	<Dialog Id="InstallDlg" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
		<Control Id="Title" Type="Text" X="5" Y="20" Width="360" Height="25" Transparent="yes" NoPrefix="yes">
			<Text>{\DlgFont8}Choose which environment the application is being installed in:</Text>
		</Control>
		<Control Id="Buttons" Type="RadioButtonGroup" X="30" Y="50" Width="104" Height="56" Property="ENVIRONMENTSELECTION" />
		<Control Id="ZipPrompt" Type="Text" X="5" Y="115" Width="360" Height="25" Transparent="yes" NoPrefix="yes">
			<Text>{\DlgFont8}Enter destination path for downloaded zip:</Text>
		</Control>
		<Control Type="PathEdit" Id="Folder" Width="280" Height="15" X="11" Y="135" Property="ZIPDIRECTORY" Indirect="yes" />
		<Control Type="PushButton" Id="Browse" Width="56" Height="17" X="296" Y="131" Text="Browse...">
			<Publish Property="_BrowseProperty" Value="ZIPDIRECTORY" Order="1">1</Publish>
			<Publish Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
		</Control>
		<Control Type="Line" Id="line" Width="362" Height="2" X="4" Y="229" />
		<Control Id="Install" Type="PushButton" X="304" Y="243" Width="56" Height="17" Default="yes" Text="Next">
			<Publish Property="ENVIRONMENTSELECTION" Value="[ENVIRONMENTSELECTION]" />
			<Publish Property="ZIPDIRECTORY" Value="[ZIPDIRECTORY]" />
			<Publish Event="EndDialog" Value="Return" />
		</Control>
	</Dialog>

	<RadioButtonGroup Property="ENVIRONMENTSELECTION">
		<RadioButton Text="Dev" Value="1" X="5" Y="0" Width="95" Height="13" />
		<RadioButton Text="Developer" Value="2" X="5" Y="14" Width="95" Height="13" />
		<RadioButton Text="Test" Value="3" X="5" Y="28" Width="95" Height="13" />
		<RadioButton Text="Production" Value="4" X="5" Y="41" Width="95" Height="13" />
	</RadioButtonGroup>
	<TextStyle Id="DlgFont8" FaceName="Tahoma" Size="12" />
	<InstallUISequence>
		<Show Dialog="InstallDlg" After="CostFinalize" />
	</InstallUISequence>
	<Property Id="ENVIRONMENTSELECTION">3</Property>
</UI>

</Product>

</Wix>
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: getting a config directory

Hi and welcome to Advanced Installer forums.

I apologize for the delayed reply.

I'm not sure why you encounter this problem. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them? Also can you also describe a step by step test case scenario that we can follow to reproduce the error?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”