This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- another question
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
09:26 AM
UI similar to WI Web Setup Project
I am looking to build a UI very similar to the UI that comes automatically with the Windows Installer Web Setup project. I need a UI that gives drop-downs of the available IIS websites, virtual directories, and application pools.
I see that you can run an IISScan.exe to import into your IS project, yet that doesn't help me at run-time.
Any help/direction would be greatly appreciated.
I see that you can run an IISScan.exe to import into your IS project, yet that doesn't help me at run-time.
Any help/direction would be greatly appreciated.
(12) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
12:52 PM
pmatlock,
I just did something like that. I ended up creating a .net dll that loads the list websites on the machine, and used that to set the target website. For the virtual directory name, I just have an edit text box with a value pre-filled with what I want, but that allows the end user to change it if they want.
If you want to give that a shot, I can post my code for the .net dll and my installscript script that sets everything.
I just did something like that. I ended up creating a .net dll that loads the list websites on the machine, and used that to set the target website. For the virtual directory name, I just have an edit text box with a value pre-filled with what I want, but that allows the end user to change it if they want.
If you want to give that a shot, I can post my code for the .net dll and my installscript script that sets everything.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
12:56 PM
If you could post post that code, that would be wonderful!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
01:12 PM
Here is the installscript (it is part of the OnFirstUIBefore method):
I have attached the custom dialog and .net project I used. In installshield, I setup a new website under the Server Configuration->Internet Information Services. The name of it is the property [VIRTUALDIRECTORY] (see attached screenshot).
Let me know if I didn't explain something correctly.
Dlg_SdSelectWebSite:
if (nSetupType = CUSTOM) then
szSelectWebSiteDialog = "sdSelectWebSite2";
szDllName = SUPPORTDIR ^ "ExistingWebSites.dll";
szTemp = "ExistingWebSites.WebSites";
nvSize = MAX_PATH;
set myDllObject = DotNetCoCreateObject(szDllName, szTemp, "");
webSitesList = myDllObject.ListSites();
listId = ListCreate(STRINGLIST);
StrGetTokens(listId, webSitesList, "~");
MsiGetProperty(ISMSI_HANDLE, "VIRTUALDIRECTORY", svVirtualDirectory, nvSize);
EzDefineDialog(szSelectWebSiteDialog, ISUSER, szSelectWebSiteDialog, 0);
bDone = FALSE;
while(!bDone)
nControl = WaitOnDialog(szSelectWebSiteDialog);
switch(nControl)
case DLG_INIT:
CtrlSetText(szSelectWebSiteDialog, 1304, svVirtualDirectory);
CtrlSetList(szSelectWebSiteDialog, 1306, listId);
CtrlSetCurSel(szSelectWebSiteDialog, 1306, "Default");
case 12: // back
nResult = BACK;
bDone = TRUE;
case 1: // next
CtrlGetText(szSelectWebSiteDialog, 1304, svVirtualDirectory);
CtrlGetCurSel(szSelectWebSiteDialog, 1306, szTemp);
nvWebSiteNumber = myDllObject.FindWebSiteNumber(szTemp);
NumToStr(szTemp, nvWebSiteNumber);
MsiSetProperty(ISMSI_HANDLE, "TARGETVDIR", szTemp);
MsiSetProperty(ISMSI_HANDLE, "VIRTUALDIRECTORY", svVirtualDirectory);
bDone = TRUE;
case 9:
nResult = CANCEL;
bDone = TRUE;
endswitch;
endwhile;
EndDialog(szSelectWebSiteDialog);
ReleaseDialog(szSelectWebSiteDialog);
ListDestroy(listId);
if (nResult = BACK) goto Dlg_SdFeatureTree;
if (nResult = CANCEL) then abort endif;
endif;
nResult = 0;
I have attached the custom dialog and .net project I used. In installshield, I setup a new website under the Server Configuration->Internet Information Services. The name of it is the property [VIRTUALDIRECTORY] (see attached screenshot).
Let me know if I didn't explain something correctly.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
01:53 PM
Thanks very much. I will give this a try 🙂
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
04:35 PM
wierdling,
Thanks again for this awesome example!!
I did have one question regarding the InstallScript and incorporating the .dll methods.
I noticed you utlilized the DotNetCoCreateOjbect(), versus the InstallShield's UseDLL() functionality...was there any particular reason or pros/cons to that?
I've not used either one, so just asking out of curiosity.
Thanks again for this awesome example!!
I did have one question regarding the InstallScript and incorporating the .dll methods.
I noticed you utlilized the DotNetCoCreateOjbect(), versus the InstallShield's UseDLL() functionality...was there any particular reason or pros/cons to that?
I've not used either one, so just asking out of curiosity.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 27, 2010
05:04 PM
I used the DotNetCoCreateObject so I could make calls directly to it without having to prototype anything (I am lazy 🙂 )
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
01:33 PM
Did you encounter any problems using the DotNetCoCreateObject function?
My call to the dll.method crashes...
My call to the dll.method crashes...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
01:53 PM
Never mind 🙂 I figured out I had to make my .dll COM Visible
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
02:54 PM
Posting this for anyone else who reads this thread:
Make the .net dll 2.0 (not 3.5).
Make the .net dll 2.0 (not 3.5).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
02:58 PM
I was successful with my dll created under the .NET Framework 3.5...just had to change the ComVisible(true) in the AssemblyInfo.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 28, 2010
03:24 PM
Taking this one more step...did you create new website or new webapplication via C#(dll) code or did you do this via InstallScript code?
I'm just investigating the best way to handle working with IIS functions.
Thanks for the great info on this.
I'm just investigating the best way to handle working with IIS functions.
Thanks for the great info on this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 06, 2011
04:35 AM
Hi,
We are using installshield 12 for creating web setup. As you uploaded custom dialog file and Dotnet dll for select website to install web site. We are unable to add the same in our web project. Can you plz guilde us,How to add this files in the web project.
We are using installshield 12 for creating web setup. As you uploaded custom dialog file and Dotnet dll for select website to install web site. We are unable to add the same in our web project. Can you plz guilde us,How to add this files in the web project.