Using Click Once for a Console Application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
We need to have two interfaces into our web services layer - a GUI and a
command line scriptable client. I know Click Once can be used for both GUI
and CUI apps... but can the Console App be called via a batch file? So far
I've found one place that says this isn't possible, but i wanted to confirm
that their is absolutely no work around.

thanks,
Orlando
 
Hi Orlando,

Thanks for your post!

Batch file is a collection of shell command. .Net ClickOnce uses rundll32
with dfshim.dll to lauch the *.application file, so we can place this shell
command in a batch file. Then it will invoke the ClickOnce application
without any problem.

Try placing the following in the test.bat file:
rundll32.exe dfshim.dll,ShOpenVerbApplication
http://machinename/appname/appname.application

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thanks for your response.. Can you pass arguments in this method such that
the console app will get them? For example,

ConsoleApp -f c:\MyFileToRead.txt

Or are you limited to passing things via querystring?

Orlando
 
Hi Orlando,

Yes, we cannot use commandLine to pass parameters into the ClickOnce
application at run time. We can only access query string parameters for a
ClickOnce deployment from the application's AppDomain. For more
information, please refer to the article below:
"How to: Retrieve Query String Information in a ClickOnce Application "
http://msdn2.microsoft.com/en-us/library/ms172242(VS.80).aspx

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top