DB909
Posts: 2
Joined: Wed Feb 07, 2024 2:43 pm

Problems creating virtual directory in selected website

hi - we have the Enterprise edition but I am struggling to get something to work

I have seen some similar examples from quite some time ago and wondered if some older issues may have been resolved with this.

Essentially our requirements are quite simple:

1) browse IIS and select a website (this website will already exist)
2) create a new virtual directory within that website
3) copy a bunch of files and folders into a physical directory within the structure of the selected website

Point 3 is where I'm struggling. The closest I have managed to get is an installer where the user needs to select the website in one iisbrowse, but use a second folder browse to set the physical path of target website

Eg we have WebsiteA, located at C:\Inetpub\WebsiteA

I want to select that website via an iisbrowse, create a virtual directory (application) at WebsiteA\AppA and copy files into its corresponding physical folder at C:\Inetpub\WebsiteA\AppA

If someone can help with this it would be much appreciated, thanks!
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems creating virtual directory in selected website

Hello David and welcome to our forums,

This is indeed an interesting scenario.

What I'm thinking we can do is perhaps two different custom dialogs, the first where the customer selects the Website and then another one where he selects the Physical path.

The only issue I see here is how the files will be moved there.

One approach would have been through the property based folder support.

However, this would mean we need a custom action that let's the user select the website + physical path and that is schedule before the "Paths Resolution" action group in the "Custom Actions" page.

What I'm thinking would be a better approach is adding all your files as temporary files and use a custom action to copy the files from the %temp% folder in your designated folder after the user inputs the details.

For example, if the physical path is saved into an EditBox control, we can retrieve the property assigned to the EditBox control and use that to copy the files.

Additionally, at the end of the setup, the temporary files are removed automatically (from the %temp% folder, not the ones copied by you).

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
DB909
Posts: 2
Joined: Wed Feb 07, 2024 2:43 pm

Re: Problems creating virtual directory in selected website

Thanks for getting back to me Catalin!

I might be over simplifying it but I thought I could just add the files & folders (a compiled angular & .net application) to the "Files and folders" part of the aip, and select which physical path on the webserver I want to drop them into (ideally by selecting the website and getting its physical path automatically)

If I had to do two browses to get there it wouldn't be the worst thing, but one browse would be perfect
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Problems creating virtual directory in selected website

Hello,

You are indeed right about that, it looks like I overcomplicated it on my end. Apologies for that.

What you can do is indeed:

- have two browse operations

- have a "Set property" custom action that will set APPDIR to the desired value

Note: the "Application Folder" value is stored in the APPDIR property and by setting the APPDIR property you will have the files installed in the desired location.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”