C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Start IE from Windows Service? Posted by RFickling on 24 Apr 2005 at 8:25 AM
Hi,

I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. I don't know why my code (shown below) doesn't work. I know that IExplore.exe starts as I can see it in my task manager, but it is not visible. Can anyone explain what is happening?

My code:
Process p = Process.Start("IExplore.exe", m_strURL);

Thanks,
Royce

Report
Re: Start IE from Windows Service? Posted by non-monotonic on 30 Apr 2005 at 6:26 AM
Im not 100% sure about this so dont quote me on this unless of course im right :) I think the problem lies in the fact that windows services dont have access to the GUI thats why you cant display forms and such like from services. So maybe what is happening is because you are starting IE from your service context IE is also blocked from using the GUI.
A slave to the code

Report
Re: Start IE from Windows Service? Posted by ctran on 11 Dec 2006 at 2:09 PM
: Hi,
:
: I have a Windows service from which I want to start Internet Explorer with a particular URL as an argument. I don't know why my code (shown below) doesn't work. I know that IExplore.exe starts as I can see it in my task manager, but it is not visible. Can anyone explain what is happening?
:
: My code:
: Process p = Process.Start("IExplore.exe", m_strURL);
:
: Thanks,
: Royce
:
:
That's because your service does not have handle to desktop winstation. Search msdn for winstat0 for detail. You can also check "allow interactive with desktop" through SCM, but it is not recommented from Microsoft.
Report
Re: Start IE from Windows Service? Posted by open_source_ir on 1 Jan 2007 at 11:31 AM
hi pal , just paste this code into ur button sub :

System.Diagnostics.Process.Start("ur url for example textBox1.Text");

when ur run this line automaticly internet explorer pops up n opens ur requested page , u can communicate me in learning c#, opensource-iranian@yahoo.com , my name is Pedram , i ll be glad to help u n ask u my problems ,all the bests bye



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.