473,550 Members | 2,406 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Command line options

Can I invoke a IE from command line and pass url as an
parameter
Nov 15 '05 #1
3 4501
John,

Yes, you can. The easiest way to do this would be to send the URL to
the static Start method on the Process class. This will open the default
web browser for your machine. However, if you must use IE (say another
browser is set up as the default), then you can send a command line of
"iexplore.e xe <url>" where <url> is the url of the site, and it should open
to that site.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"John" <an*******@disc ussions.microso ft.com> wrote in message
news:0d******** *************** *****@phx.gbl.. .
Can I invoke a IE from command line and pass url as an
parameter

Nov 15 '05 #2

System.Diagnost ics.Process.Sta rt(url);

This will pass the url to Windows and let it decide which program to call
(your default browser) but at least in case of Internet Explorer as the
default browser, it will use an already existing IE window if it finds
one, causing you it to be redirected from whatever page it currently holds.

or

System.Diagnost ics.Process.Sta rt("iexplore", url);

This will not work if the path to iexplore.exe isn't in the path
environment.
It will cause a new IE window to open.

or

System.Diagnost ics.Process.Sta rt(iepath, url);

Where iepath is the path to internet explorer. You should be able to
extract the path from the registry, somewhere.

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #3
I believe the path to Internet Explorer will always be found in

HKEY_LOCAL_MACH INE\SOFTWARE\Mi crosoft\Windows \App Paths\IEXPLORE. EXE

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2769
by: Edvard Majakari | last post by:
Hi, I was wondering what would be the most elegant way for creating a Python class wrapper for a command line utility, which takes three types of arguments: 1. options with values (--foo=bar) 2. boolean options (--squibble) 3. data lines (MUNGE:x:y:z:frob)
2
2648
by: joe | last post by:
Hello, I have the following commands: testb -s <size> testb -s <size> -o <input file> testb -s <size> -o <codes> How do i split the commands so that all three are valid. And how do i check for missing arguments?
4
3165
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the command line. Obviously it is quite easy to make a string that is valid HTML and send it to the printer. The tough part is making look like a web page....
17
1974
by: News | last post by:
Hi everyone, My goal is to pull command switches/options from a file and then assign the values to select variables which would eventually be included in a class object. The data file looks something like this but the switches could be in any order and not all may be used. -m quemanager -s server -p port -k key -o object -c 20 -t...
4
4976
by: Bit byte | last post by:
I have a project that I normally build (without problems) from the DevStudio IDE. However, I have embarked on automating all my builds (this test project being one of several). The project creates a DLL. I am able to build the project without any probs in the IDE, however - when I build the project from the command line (using the same...
8
3495
by: Andrew Robert | last post by:
Hi Everyone. I tried the following to get input into optionparser from either a file or command line. The code below detects the passed file argument and prints the file contents but the individual swithces do not get passed to option parser.
3
10307
by: jlw16 | last post by:
Hello, I’m trying to use my vbs script to get a command line argument for a file which will need to be opened through QuickTestPro. Below are the commands I’m using: Dim qt_file 'As String -> If I don’t comment out the As String, I get an “Expected end of statement” error – is this correct?? qt_file = Command -> This doesn’t appear...
4
23378
by: no_spam_for_gman | last post by:
Hi, I can turn off autocommit within the command window but I cannot figure out how to turn it off when you are in the IBM DB2 Command Line Processor. Does anybody knows how? By the way I mean when you are logged on and the prompt is: db2 => Here's an example how I do it from Command Window (option is c):
8
8607
by: 4.spam | last post by:
Hello. WinXP, db2 v8.2.7 When I use UPDATE COMMAND OPTION USING <any_switchON(or OFF) it seems that this command has absolutely no effect on these switches since command LIST COMMAND OPTIONS issued after that shows the same values as before issuing UPDATE
51
4105
by: Ojas | last post by:
Hi!, I just out of curiosity want to know how top detect the client side application under which the script is getting run. I mean to ask the how to know whether the script is running under Command Prompt or Browser or some other application? Ojas.
0
7490
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8001
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7520
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7846
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6104
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5129
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1096
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
802
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.