Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Cannot read query string parameters from application file's URL after installing prerequisites
 

Cannot read query string parameters from application file's URL after installing prerequisites

MyClickOnce application accepts a query string parameter. This is fine when users click on the Launch link on the publish.htm to run the application file.

The problem arises when users click on the Install link on the publish.htm to run thesetup.exeand install prerequisites. After checking for/installingprerequisites, it callsmy application filedirectly with no query string parameters.

The -url command line parameter forsetup.exe onlyspecifies the url leading up to the name of my application file. It will notread what comes after the file name, which is where the query string parameters go.

I have also tried the Bootstrapper Manifest Generatortool. It onlyincludes a query string parameter as part of the setup.exe.And my application file still does not read the query string parameter.

What I would like to do is after installing prerequisites, my application file can read its query string parameter.


Can someone help me?
wd818  Monday, March 23, 2009 9:50 PM

Sorry, but the setup.exe is never going to call the application with the query string parameters. That's not how it works.

Is there something you can use other than query string parameters? Could you include a file with some info in it that you can read instead, or something like that?

RobinS.
GoldMail.com


Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Tuesday, March 24, 2009 3:40 AM
Is there a way to pass the query string parameter from setup.exe to my application file?
wd818  Tuesday, March 24, 2009 6:24 PM
Not that I know of. About the only thing I can think of is to deploy a small application via ClickOnce that runs the ClickOnce installation of the application you actually want installed by triggering the application file with the query parameters that you want. I think that would work, although it's not as clean a solution as you might want.

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Tuesday, March 24, 2009 6:58 PM
Could you give me more details on your approach to solve this problem? The query string parameter is a user email that we use for license control of our product. This parameter isinsertedafter the publish.htm is generated.
wd818  Tuesday, March 24, 2009 7:16 PM
So the user gets an e-mail with a link to your publish.htm page? Or he gets a link to the setup.exe that includes the license info? I'm not understanding where the data is getting passed.

RobinS.
GoldMail.com
Ts'i mahnu uterna ot twan ot geifur hingts uto.
RobinDotNet  Wednesday, March 25, 2009 5:55 PM
This is our current implementation.
The user gets an email with a link to our publish.htm page. Inside this publish.htm page, there is a launch link to run the application file.At the end ofthis launch link, an email address is attached as a query string parameter so that the application file can read. But when the user clicks on the install link on the same publish.htm page to run setup.exe and the application file, the query string parameter attached at the end of the launch link is ignored. Is there a workaround to this issue?
wd818  Wednesday, March 25, 2009 6:04 PM

You can use google to search for other answers

Custom Search

More Threads

• Protect Uninstall with password?
• Setup and Deployment projects limited to 3 part version numbers?
• How to Run an Application from Command Line / .bat file
• How to install a file without showing it
• Newbie questions
• How to install an application in an machine?
• prevent replace file during reinstall
• Clickonce application prerequisites
• Problem with registering msxml6.dll as a dependency of SQLServer.ManagedDTS.dll
• Can't publish using August CTP