Dear All:
In VS2005 WebSetup installer InstallAddress dialog, there is field to
let user to select which website to install the webapp (if there are
more than one WebSite in the IIS).
I want to know how can I get the WebStie info in the customAction.
I can use "/VDIR=[TARGETVDIR]" in customActiondata to get the installed
VirtualDirectory.
However, I cannot find any info how to receive the "WebSite" info.
There is a old example, http://msdn.microsoft.com/library/de...deployment.asp
to use "/PORT=[TARGETPORT]" to find out the Site, but it does not work
in VS2005 websetup installer.
I need to website info to explicitly set the webapp to use ASPNET2.0 in
case of the machine to have multiple different version Dotnet runtime to
be installed.
The function to set the ASPNET runtime , http://www.asp.net/faq/SideBySide.as...ndex=0&tabid=1
,need to use such format ,
aspnet_regiis -s w3svc/1/ROOT/VirtualDirectoy
for different website the "w3svc/[1]/ROOT/..." is different , e.g.
"w3svc/2/ROOT/..."
I need a method to get the information.
Thank you very much
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk 8 6352
Hi Jacky,
Thank for posting!
For the current issue, my understanding is that you want to get the web
info via using ASDI for IIS. If I have misunderstood anything, please let
me know.
Based on my experience, the article you mentioned in the previous thread is
specified for IIS 5.0. So I want to know the current version of the IIS in
your machine. In another word, could you please tell my about the version
of the current OS?
BTW, I'll perform the test to figure out how to get the information for
IIS. It will take me some period to approach this. So, I appreciate your
understanding and patience. I'll reply you ASAP when I get some
information. If you have any concerns, please feel you free to let me know.
Regards,
Yuan Ren [MSFT]
Microsoft Online Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
updated on February 14, 2006. Please complete a re-registration process
by entering the secure code mmpng06 when prompted. Once you have
entered the secure code mmpng06, you will be able to update your profile
and access the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
Yuan Ren[MSFT] wrote: Hi Jacky,
Thank for posting!
For the current issue, my understanding is that you want to get the web info via using ASDI for IIS. If I have misunderstood anything, please let me know.
Based on my experience, the article you mentioned in the previous thread is specified for IIS 5.0. So I want to know the current version of the IIS in your machine. In another word, could you please tell my about the version of the current OS?
BTW, I'll perform the test to figure out how to get the information for IIS. It will take me some period to approach this. So, I appreciate your understanding and patience. I'll reply you ASAP when I get some information. If you have any concerns, please feel you free to let me know.
Regards,
Yuan Ren [MSFT] Microsoft Online Support ================================================== ==== PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were updated on February 14, 2006. Please complete a re-registration process by entering the secure code mmpng06 when prompted. Once you have entered the secure code mmpng06, you will be able to update your profile and access the partner newsgroups. ================================================== ==== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from this issue. ================================================== ==== This posting is provided "AS IS" with no warranties, and confers no rights. ================================================== ====
Thank you very much.
In my case, I do not care what is the IIS version.
My question is I need to make the WebSetup installer which can set the
web application to suitable dotnet version in case of the machine has
multiple framweork installed.
The target machine may be XP or 2003, IIS may be 5 or 6.
In fact, I know how to queue how many websites in the IIS.
In VS2005 Websetup installer, user can select which website to install
the application in the Windows to input VirtualDirectory.
My main question is that how can I know my webapp has been installed in
which website? (in the customAction of the websetup installer)
i.e. "w3svc/1/ROOT/..." or "w3svc/2/ROOT/..." ...
Then my installer can set the suitable framework version by call script
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.xxxx\aspn et_regiis -s
w3svc/N/ROOT/..."
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Hi Jacky,
Thanks for your patience!
After my research, the example from the old MSDN article works well. You
can add the installer class in your current website project or create a new
project. Actually, the template of the installer class is supplied by the
windows form project and the class library project. However, we still can
use the installer class in our web project although there is no template.
So could you please give me more details about "but it does not work in
VS2005 websetup installer" you mentioned before?
BTW, if you don't want to use the managed class in the custom action of the
websetup project, I suggest you write a script to do this. The same ADSI
schema is appropriate for any kinds of custom actions such as script,
managed class, unmanaged class etc.
Hope this will be helpful!
Regards,
Yuan Ren [MSFT]
Microsoft Online Support
Yuan Ren[MSFT] wrote: Hi Jacky,
Thanks for your patience!
After my research, the example from the old MSDN article works well. You can add the installer class in your current website project or create a new project. Actually, the template of the installer class is supplied by the windows form project and the class library project. However, we still can use the installer class in our web project although there is no template. So could you please give me more details about "but it does not work in VS2005 websetup installer" you mentioned before?
BTW, if you don't want to use the managed class in the custom action of the websetup project, I suggest you write a script to do this. The same ADSI schema is appropriate for any kinds of custom actions such as script, managed class, unmanaged class etc.
Hope this will be helpful!
Regards,
Yuan Ren [MSFT] Microsoft Online Support
I cannot understand how the "the example from the old MSDN article works
well".
I need to know which WebSite my Webapp installed in.
The old example did not mention anything about website.
The old example just use the "PORT" in customAction by adding the
"/PORT=[TARGETPORT]" in customActionData.
However, when I run the example code in the VS2005 WebSetup and
customAction,
"Context.Parameters.Item("Port")" always return empty.
I think it is because there no "port" can be selected in VS2005 web
installer.
("port" can be set in VS.NET 2002 web setup installer only).
In fact, in current time, I use a work around to solve my problem.
In customAction code, I can get the installing "VirtualDirectory".
I will loop through all the existing websites to check the
"VirtualDirectory" existing.
if the "VirtualDirectory" exists, set it to use ASPNET2.0.
then, I will loop through all
"w3svc/1/ROOT/VirtualDirectoy",
"w3svc/2/ROOT/VirtualDirectoy",
...
However, this method may be wrong if there is another webapp in some
other website using the same VirtualDirecory Name.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Hi Jacky,
Sorry for misunderstanding!
My understanding is that you want to get the server number under the
"W3SVC" via the installation of the web site. If I have misunderstood
anything, please let me know.
During the installation, the site should be indicated. Actually, the site
here is the server comment of the current web server such as "Default Web
Site", "My Web Site" etc. As far as I know, we can use this name to get the
number which I mentioned before. The following script which I wrote is a
simple dome to demonstrate how to get the number:
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:{authenticationLevel=pktPrivacy}\\" _
& strComputer & "\root\microsoftiisv2")
Dim servercomment
servercomment = "Default Web Site"
Set colItems = objWMIService.ExecQuery("Select * from IIsWebServerSetting
where ServerComment = """ & servercomment & """")
For Each objItem in colItems
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "Name: " & Right(objItem.Name, 1)
Next
The script works fine on my side. If you don't want to use the script as
the custom action in the setup project, you also can use it as managed
class which as the old document from MSDN does.
Hope this will be helpful!
Regards,
Yuan Ren [MSFT]
Microsoft Online Support
Hi Yuan Ren:
Thank you very much.
Your answer should a part of my question.
Following your code, I should get the website number from the website
name (I still do not test the code yet).
However, my problem does still exist.
The first problem I asked was "How can I know what is the website, which
the webapp installed in, in the websetup customAction".
In my case, the IIS server may have multiple websites. User can select
one which is not default one.
The problem is that I cannot ask the user to run another script to input
which website they have selected.
The websetup installer must be able to know the "website" in the
customAction program code automatically. The customAction code should
not prompt any UI to ask the user again.
I believe that there should be a name whish is something like the
"/VDIR=[TARGETVDIR]" which can be used to pass the isntalled
"VirtualDirectory" into the CustomAction.
I will imagine there is a , for example, "/SITE=[TARGETSITE]" which I
can input the CustomActionData field, then the installer will pass the
user selected "WebSite" to the customAction program code. Then, the
customAction code can get the "WebSite" by 'Context.Parameters["SITEV"]'.
However, I cannot find out how to do so.
Yuan Ren[MSFT] wrote: Hi Jacky,
Sorry for misunderstanding!
My understanding is that you want to get the server number under the "W3SVC" via the installation of the web site. If I have misunderstood anything, please let me know.
During the installation, the site should be indicated. Actually, the site here is the server comment of the current web server such as "Default Web Site", "My Web Site" etc. As far as I know, we can use this name to get the number which I mentioned before. The following script which I wrote is a simple dome to demonstrate how to get the number: strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & strComputer & "\root\microsoftiisv2") Dim servercomment servercomment = "Default Web Site"
Set colItems = objWMIService.ExecQuery("Select * from IIsWebServerSetting where ServerComment = """ & servercomment & """")
For Each objItem in colItems Wscript.Echo "Name: " & objItem.Name Wscript.Echo "Name: " & Right(objItem.Name, 1) Next
The script works fine on my side. If you don't want to use the script as the custom action in the setup project, you also can use it as managed class which as the old document from MSDN does.
Hope this will be helpful!
Regards,
Yuan Ren [MSFT] Microsoft Online Support
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
Dear All:
I just find out that
I actually can use the "/SITE=[TARGETSITE]" in the customActionData to
let the Installer to pass the "site" to the customAction code.
In past, I do not know how to find out the [name] of the site and I just
imagine there should be a [name] can be used.
However, I just thought that if the Installer can pass the "WebSite" to
the customAction, there should be some information have been put in the
installer itself.
Then, I tried to use "Orca" tool (a tool in the platform sdk) to examine
the websetup installer file "*.msi".
I just found that there was a key [TARGETSITE] in the "AdminUISequence"
table.
Then, I tried to use the "/SITE=[TARGETSITE]" in the customActionData.
I was very happy I could get the
'Context.Parameters["SITE"]=/LM/W3SVC/1'
It is more than just the site name. I can directly use the path in my case.
Anyway, thanks everyone who had given me comment to solve the problem.
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk
jacky kwok wrote: Hi Yuan Ren:
Thank you very much.
Your answer should a part of my question.
Following your code, I should get the website number from the website name (I still do not test the code yet).
However, my problem does still exist. The first problem I asked was "How can I know what is the website, which the webapp installed in, in the websetup customAction". In my case, the IIS server may have multiple websites. User can select one which is not default one.
The problem is that I cannot ask the user to run another script to input which website they have selected. The websetup installer must be able to know the "website" in the customAction program code automatically. The customAction code should not prompt any UI to ask the user again.
I believe that there should be a name whish is something like the "/VDIR=[TARGETVDIR]" which can be used to pass the isntalled "VirtualDirectory" into the CustomAction.
I will imagine there is a , for example, "/SITE=[TARGETSITE]" which I can input the CustomActionData field, then the installer will pass the user selected "WebSite" to the customAction program code. Then, the customAction code can get the "WebSite" by 'Context.Parameters["SITEV"]'.
However, I cannot find out how to do so.
Yuan Ren[MSFT] wrote: Hi Jacky,
Sorry for misunderstanding!
My understanding is that you want to get the server number under the "W3SVC" via the installation of the web site. If I have misunderstood anything, please let me know.
During the installation, the site should be indicated. Actually, the site here is the server comment of the current web server such as "Default Web Site", "My Web Site" etc. As far as I know, we can use this name to get the number which I mentioned before. The following script which I wrote is a simple dome to demonstrate how to get the number: strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & strComputer & "\root\microsoftiisv2") Dim servercomment servercomment = "Default Web Site"
Set colItems = objWMIService.ExecQuery("Select * from IIsWebServerSetting where ServerComment = """ & servercomment & """")
For Each objItem in colItems Wscript.Echo "Name: " & objItem.Name Wscript.Echo "Name: " & Right(objItem.Name, 1) Next
The script works fine on my side. If you don't want to use the script as the custom action in the setup project, you also can use it as managed class which as the old document from MSDN does.
Hope this will be helpful!
Regards,
Yuan Ren [MSFT] Microsoft Online Support
Hi Jacky,
I'm glad to hear the issue has been resolved:)
Regards,
Yuan Ren [MSFT]
Microsoft Online Support This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: MENTAT |
last post by:
Hi,
I am trying to create an installer for my web application. So I added a
web setup project to my solution (I am using VS.NET 2003). Been playing
around with it since then and it basically...
|
by: mike.brydon |
last post by:
I'm creating a WebSetup Deployment Solution using VS.Net 2003 to
install my web application. I've created several installer classes to
go with it. My problem is, I want the installer classes to...
|
by: mdawid |
last post by:
Hi,
The problem is the WebSetup never removes the assembly
MyCustomAction.dll from the virtual directory. Is there any
switch/property telling installer to remove custom action assembly
after...
|
by: musosdev |
last post by:
Hi guys
I'm trying to migrate to VS2005... I've managed to do that, but realised I'd
opened my web projects as file projects, and I'm getting the error about
network BIOS command limit.
...
|
by: Steve |
last post by:
I've tried to find out how to do this on MSDN and other sites, but I can't
find an example or even a mention of this. I need to install some printer
drivers with my application, anyone know how to...
|
by: cit42 |
last post by:
Hallo,
i have a msi that installs an ASP.NET website to IIS.
The MSI is produced by VS2005, using "Web setup project" and the "Web
deployment project".
The installation works fine, but after...
|
by: Borat |
last post by:
Hi all!
I have a website that includes different applications and I want to
create a setup-project for this, but it seems to me that this is not
possible with the VS-WebSetup-project. There is...
|
by: MimiMi |
last post by:
I have a deployment project that was originally created in VS2003.
Since I don't have VS2003, I now open it in VS2005, but then of course VS2005 has to convert it.
Everything seems to work fine. I...
|
by: DocVu |
last post by:
Dear everybody,
I'm very sad now. I have problem with making the Setup package. Could you share with me a light.Our problem as followings:
1. I expect the deployment package contains the...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: DJRhino1175 |
last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this -
If...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |