467,926 Members | 1,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,926 developers. It's quick & easy.

Windows Service - spaces in path causes problem?

bob
I have created a simple Windows service in VB.Net which installs fine
using InstallUtil.exe to install it to, for example "c:\test", or
"c:\Windows\YellowBanana", but if I install it to "c:\Program
Files\Test" it installs ok but will not start (no useful error message
is given other than the usual annoying suggestion about having
sufficient privileges).

The problem only seems to happen with spaces, not long filenames.

I have found a couple of references on the web to people having found
the same problem but not enough to suggest to me that this is a
definite "feature". Anybody else found that they can/cannot install
services with spaces in the path?

Thanks,
John.
Jul 21 '05 #1
  • viewed: 2721
Share:
1 Reply
Bob,
Which version of the OS? Which version of .NET?

Using both Windows XP & Windows Server 2003 along with .NET 1.1 (with &
without SP1) I have Windows Services that run with spaces in the path name,
such as "\Program Files\My Company\My.Service.exe". However! I've been using
a setup project instead of calling InstallUtil directly.

Do you have the same problem if you use a setup project?

Do you have the same problem if you chdir to the folder where the service
is?

Do you have the same problem if you specify the full path to the service
when calling InstallUtil?

Do you have something in your code that is choking on the space in the path?
(In other words, do you have the same problem with a minimalist Windows
Service?)

Hope this helps
Jay
"bob" <bo********@yahoo.com> wrote in message
news:4c**************************@posting.google.c om...
I have created a simple Windows service in VB.Net which installs fine
using InstallUtil.exe to install it to, for example "c:\test", or
"c:\Windows\YellowBanana", but if I install it to "c:\Program
Files\Test" it installs ok but will not start (no useful error message
is given other than the usual annoying suggestion about having
sufficient privileges).

The problem only seems to happen with spaces, not long filenames.

I have found a couple of references on the web to people having found
the same problem but not enough to suggest to me that this is a
definite "feature". Anybody else found that they can/cannot install
services with spaces in the path?

Thanks,
John.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Russell E. Owen | last post: by
6 posts views Thread by Laszlo Zsolt Nagy | last post: by
10 posts views Thread by Ger | last post: by
1 post views Thread by =?Utf-8?B?cm9zczYxMw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.