Hi Bogdan,
Thank you very much for all your support. I have played some more with these custom actions and for all those which will need the same thing in the future here is one more explanation about how this could be done.
Very important points:
You can/need to call the BrowseIIS Custom-Action more than one time.
After each call the property “IISBrowseOutput” will be modified and will contain a string which you can parse in your own Custom-Action. This string (“IISBrowseOutput”) looks like a serialized-dictionary which uses as a key the website-name and which contains a value like this: “your_website1_name?website1_property_value, your_website2_name?website2_property_value, …”.
The only one question is which website-property will be listed?
And very important, this is something you can choose by setting the [IISBrowseOutputMode] – Property (according to the documentation) just before calling the BrowseIIS Custom-Action.
Example:
SET IISBrowseOutputMode=2
CALL BrowseIIS
SHOW IISBrowseOutput -> will show a value like “your_website1_name? your_website1_ID, your_website2_name? your_website2_ID”.
At this point you can store this value in your own property and you can use it later.
And go on:
SET IISBrowseOutputMode=1
CALL BrowseIIS
SHOW IISBrowseOutput -> will show a value like “your_website1_name? your_website1_physical_path, your_website2_name? your_website2_physical_path”.
So this way you can find out all information you need grouped by website_name.
Some more helpful points:
- The IISBrowseSelectedValue Property is ONLY SET AFTER YOU CALL the “IISDecodeBrowserResult” CustomAction.
- The value of the property “IISBrowseShowExtInfo” doesn’t influence at all what I wrote above.
- The “IISBrowseComboBox” (if used in your dialog) will contain doesn’t matter what you set in the “IISBrowseOutputMode” always the selected website-name. (The key of the grouped information I’ve described above).
- It seems for me that “IISDecodeBrowserResult” is using the value stored in this “IISBrowseComboBox” and using this value is parsing the “IISBrowseOutput” – String to get its associated value,which will be stored in “IISBrowseSelectedValue”.
This way a chain of custom-action calls like this:
SET IISBrowseOutputMode=1
CALL BrowseIIS
SET IISBrowseComboBox=”my_website_name”
CALL IISDecodeBrowserResult
SHOW IISBrowseSelectedValue
will show you the physical path of “my_website_name”.
By only changing SET IISBrowseOutputMode=7 and repeating the calls you could get the URL and so on.
This seems to work at least in my test project

.
Please correct me if I wrote something wrong but it was never 100% clear for me how all these properties are linked together.
Thank you very much,
Razvan
FOLLOW US
Get the latest news in Application Packaging