By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,205 Members | 933 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,205 IT Pros & Developers. It's quick & easy.

Windows Service - spaces in path causes problem?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.