Re: Process.Start("http://somesite") throwing a file not found win32 ex.
From: Justin Rogers (Justin_at_games4dotnet.com)
Date: 07/18/04
- Next message: Xavi Sam: "native assemblies"
- Previous message: David zhu: "assembly loading question"
- In reply to: Sriram Krishnan: "Re: Process.Start("http://somesite") throwing a file not found win32 ex."
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 17 Jul 2004 18:43:17 -0700
You need to use the "start" command from the command line. This same process
had to be used as part of the GDN Workspaces component to ensure that file
associations and protocol associations resolved correctly.
The command you would use would involve running the %COMSPEC% which
is generally cmd.exe, with the /c option, followed by a command line of:
start "" "http://somesite"
Putting that information together with the Process.Start should get you up and
going.
-- Justin Rogers DigiTec Web Consultants, LLC. Blog: http://weblogs.asp.net/justin_rogers "Sriram Krishnan" <ksriram@NOSPAMgmx.net> wrote in message news:einBttAbEHA.644@tk2msftngp13.phx.gbl... > You say that you're facing this issue only on one computer.Now, see whether > Start->Run (some url) works on that machine. Since both access the same > function (ShellExecute), this should give us more clues about where the > problem lies > > -- > Sriram Krishnan > Microsoft Student Ambassador > http://www.,dotnetjunkies.com/weblog/sriram > "Tim Mackey" <tim@scootasp.net> wrote in message > news:2l7a1cF9mou8U1@uni-berlin.de... > hi Manoj, > thanks for the reply. > i asked the user to test it and they do have a default browser. Start > Run > > www.somesite.com loads it up in IE. it's a standard dell XP pro > installation also, so its odd that it works on other machines. > any other suggestions are much appreciated. > > thanks > tim > > > \\ email: tim at mackey dot ie // > \\ blog: http://tim.mackey.ie // > 67d0ebfec70e8db3 > "Manoj G [MVP]" <manuthegreat@hotmail.com> wrote in message > news:%23LKcL2CZEHA.3512@TK2MSFTNGP12.phx.gbl... > Hi, > > Check if you have a default browser configured by actually typing the URL > in the Run command window and seeing if a browser launches from there. For > Win2k Sp3 onwards you can configure this using the "Set program access and > defaults" tab of the Add-Remove programs snapin. > > -- > HTH, > Manoj G > [MVP , Visual Developer - Visual Basic ] > http://msmvps.com/manoj/ > "Tim Mackey" <tim@scootasp.net> wrote in message > news:2l0511F77d2rU1@uni-berlin.de... > hi, > i'm opening a web browser from my winforms app, via the > System.diagnostics.process.start(theURL) method. it has been working fine, > although on one client, i am getting the following exception: > > Win32Exception The system cannot find the file specified > System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo > startInfo) at > System.Diagnostics.Process.Start() at > System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at > System.Diagnostics.Process.Start(String fileName) > > obviously, its a url and not a filename that i'm passing, so i can see > where its getting the exception, but it works on 99% of computers and i > gather this approach is the same as clicking Start > Run > someUrl in > Windows, so thats why i use this method. also its good because it uses the > default browser which is nice to the user. the OS is windows XP pro. > > any ideas? > thanks > tim > > \\ email: tim at mackey dot ie // > \\ blog: http://tim.mackey.ie // > 67d0ebfec70e8db3 > >
- Next message: Xavi Sam: "native assemblies"
- Previous message: David zhu: "assembly loading question"
- In reply to: Sriram Krishnan: "Re: Process.Start("http://somesite") throwing a file not found win32 ex."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|