Muilti-language batch files

G

Guest

I have a GUI program that runs on Java. To start the program, I execute a
batch file. The batch file has set statement:mad:set FP2HOME="C:\Program
Files\Transition\FocalPoint2"

The problem is that the batch file does not work on PC's that have Win XP
installed using a non-english language. Apparently, the directory name
'Program Files' is translated to a different name on the other languages.
How do I make a batch file to work on all Win XP language versions?

I would appreciate any help

Thanks
 
M

Mike Williams

wlattery said:
I have a GUI program that runs on Java. To start the program, I execute a
batch file. The batch file has set statement:mad:set FP2HOME="C:\Program
Files\Transition\FocalPoint2"

The problem is that the batch file does not work on PC's that have Win XP
installed using a non-english language. Apparently, the directory name
'Program Files' is translated to a different name on the other languages.
How do I make a batch file to work on all Win XP language versions?

I would appreciate any help

Thanks

To access standard Windows folders reliably you should use Win32 API
calls or wrappers for such.

As an example, here are some .NET doc references that came up on Google:
http://www.codeproject.com/dotnet/netdiagnostics4.asp

MSDN Library should help you with the rest.
 
P

Pegasus \(MVP\)

wlattery said:
I have a GUI program that runs on Java. To start the program, I execute a
batch file. The batch file has set statement:mad:set FP2HOME="C:\Program
Files\Transition\FocalPoint2"

The problem is that the batch file does not work on PC's that have Win XP
installed using a non-english language. Apparently, the directory name
'Program Files' is translated to a different name on the other languages.
How do I make a batch file to work on all Win XP language versions?

I would appreciate any help

Thanks

You code your batch file like so:

@set FP2HOME="%Program Files%\Transition\FocalPoint2"

This will work under Win2000 & WinXP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top