473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to open an application from a windows service

Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a
timer or something else I want to open Windows Calculator!
I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

Jul 21 '05 #1
4 2155
If you're using the SYSTEM account to run the service and/or the service is
not configured to be able to interact with the desktop then you won't have
much luck.

Services are not supposed to launch applications.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in message
news:00****************************@phx.gbl...
Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a
timer or something else I want to open Windows Calculator!
I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

Jul 21 '05 #2
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try
open an application like Calculator it works fine but if
I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't

Thanks for any help

Ricardo Correia
-----Original Message-----
If you're using the SYSTEM account to run the service and/or the service isnot configured to be able to interact with the desktop then you won't havemuch luck.

Services are not supposed to launch applications.

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in messagenews:00****************************@phx.gbl...
Hello,

Does anyone know how to open an application from a
windows service??
For example, I have a windows service running and using a timer or something else I want to open Windows Calculator! I used:
Shell("calc", AppWinStyle.NormalFocus)
and
Process.Start("calc")
but nothing seems to work!

Thanks for any help,
Ricardo Correia

.

Jul 21 '05 #3

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in message
news:08****************************@phx.gbl...
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try
open an application like Calculator it works fine but if
I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't


Ok... is "alertas.exe" in the path? Or does it work if you provide a fully
qualified path?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

Jul 21 '05 #4
Yes, Alertas.exe is in "c:\windows\system32" path, and is
a VB.NET aplication.
-----Original Message-----

"Ricardo Correia" <ri*************@rcsoft.pt> wrote in messagenews:08****************************@phx.gbl...
I'm using the SYSTEM account and I've enabled the
option "Allow service to interact with desktop". If I try open an application like Calculator it works fine but if I try to open an application that I've made it doesn't.

Shell("calc", AppWinStyle.NormalFocus) ---> this works

Shell("alertas", AppWinStyle.NormalFocus) ---> this
doesn't
Ok... is "alertas.exe" in the path? Or does it work if

you provide a fullyqualified path?
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

.

Jul 21 '05 #5

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

Similar topics

0
by: Dougie | last post by:
Hi All, I am trying to create a windows service that will open my lotus notes email inbox and transfer the message body text to MS SQL. I can get the code working in a windows application (via...
2
by: WJ | last post by:
My system is an XP Pro. with the lattest patches & Service pack applied. 1. I have IIS installed with XP first. 2. I have .NetFW 1.1 installed next via Windows Update. 3. I have VS.Net 2003 EA...
10
by: PeterW | last post by:
I find in the last 3/4 days that I can't open web applications using VS.net 1.1 for enterprise architiect. The project I am currently working on just refuses to open and hangs. I try using IIS...
4
by: jaredea | last post by:
I have the following setup: SBS 2003 Server Windows 2003 Enterprise Server (setup as an Application Server) Windows XP Pro Desktop Both the Application server and desktop have Visual Studio...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
4
by: Ricardo Correia | last post by:
Hello, Does anyone know how to open an application from a windows service?? For example, I have a windows service running and using a timer or something else I want to open Windows Calculator!...
0
sivisr
by: sivisr | last post by:
Hi Everybody, I need some help on web service.I want to open pdf file from database to my windows application using web service.Every thing was completed running correctly, but i could...
22
by: robertgregson | last post by:
Using C#, .NET3.5, Visual Studio 2008 and WCF on Windows VISTA SP1, I have written a service, service host (as a C# console application) and a client. The service uses...
5
by: Stefano Tonello | last post by:
Hi all, I need to call windows' "open with" dialog from my C# windows form application. After the user selects application, control must return to me (I have to launch directly the process). I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.