|
-
Jan 13th, 2003, 05:11 PM
#1
Thread Starter
Addicted Member
Open default browser with parameter
Hey,
I know nothing about C# (VB guy here), so I need a little direction or help. I need to make an executable that opens the user's default browser to a certain page (specfied by a command line parameter). I have to do it this way, because I am working with another old, but very expensive system that allows you to run executables with parameters (driven from the database) but doesn't support much else like linking to web pages.
I need it to be C# because the users run the executables from the server (no client install) and I can't have any runtimes or any other required installs (like .NET framework).
In a perfect situation, it would work like this:
thanks for any pointers or directions,
-
Jan 13th, 2003, 06:33 PM
#2
Frenzied Member
PHP Code:
using System;
namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
try
{
System.Diagnostics.Process.Start(args[0]);
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
-
Jan 15th, 2003, 10:29 AM
#3
C# always requires the .Net framework. Ask in the C++ forum.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|