Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi.

I have developed a windows service in VB .NET VS2005, .NET2.0. I created a very simple setup project to make the installation easier. But the installation fails because I have spaces in the installation path!!??

e.g. "C:\Program Files (x86)\blabla\blabla"

If I remove change the path to e.g. "C:\DATA\Service" all is ok. But I do not want to be exposed to my customer's frustration. Therefore I need to solve this issue.

Has anyone had the same problem and also managed to solve it?


To be clearer: This is a setup project created from the "wizard" (or what you want to call it when it is just a few clicks away to get a project up and running) in VS2005. There is no custom code related to the setup project.
Posted
Updated 2-Dec-10 12:21pm
v3

You sure it's a problem due to the space and not a permission issue ("Program Files (x86)" probably has some permissions set on it)? Try installing to "C:\Data With Space\Service". If it works, then it's a permission issue.
 
Share this answer
 
Comments
Dalek Dave 2-Dec-10 18:23pm    
Good Call.
It does not seem to be an issue with permissions. I can't install to a path like "C:\Data With Space\Service" either?!?!
 
Share this answer
 
Make Sure , your Program complied under x86 or AnyCPU,
may be the problem because of your program compiled with x32 bit processor..
 
Share this answer
 
I discovered the problem. I tried to load the service name from a config file and set it dynamically in the installer class. Why isn't this possible?!
 
Share this answer
 
Comments
Rajesh Anuhya 3-Dec-10 5:55am    
what is service, you mean web service address, which is using in your application??, anyway that is not a problem.
No, im trying to install a windows service. I want to load the service name from a config file. For example:

Dim serializer As New XMLSerializeHelper(Of ServiceConfig)(My.Settings.LocalConfigFile)
Dim svcCfg As New ServiceConfig
svcCfg = serializer.DeserializeFromFile()
Me.ServiceInstaller.DisplayName = svcCfg.DisplayName
Me.ServiceInstaller.ServiceName = svcCfg.DisplayName


If I do this, the installer crasches.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900