We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

mariusz.pala
Posts: 5
Joined: Wed Apr 09, 2014 9:15 pm

How to escape folder path with spaces in it

Hi,

I have an installer where user selects a folder path that it used then in a Java service. The problem is when a user selects some folder with a space in it, e.g. "C:\Program Files (x86)\App".
When this path is used in a Java service as parameter,e.g. MY_DIR*.jar it doesn't work even if I put it in quotes. It works only if I translate that path to C:\Progra~1\App\*.jar
Is there any way that I can automatically transform that path to the old style format without spaces inside?

Thanks in advance for any help,
Mariusz
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to escape folder path with spaces in it

Hello Mariusz,

I'm afraid there is no predefined support for this. However, in order to achieve what you want you can try to create your own custom action which will convert the related path to the desired format.

Also, you should also try to debug your Java service in order to find out why it doesn't work properly when the path is passed enclosed between quotes.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mariusz.pala
Posts: 5
Joined: Wed Apr 09, 2014 9:15 pm

Re: How to escape folder path with spaces in it

Any chance you can help me writing a custom action? I'm new to that tool and I don't know VBS so it seems quite complicated to me:)

Thanks in advance,
Mariusz
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: How to escape folder path with spaces in it

Hello Mariusz,

Unfortunately we don't have any sample example of such a custom action. However, in order to implement such functionality into a custom action you can perform a quick search over the Internet. For example you can search for "convert Windows path to DOS path" into an Internet searches engine.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”