FireBR Posted July 2, 2009 Posted July 2, 2009 I have a quite bizarre problem to solve.I've developed a Installer using Java to deploy my application easily and quickly.One of the things the Installer does is use the command schtasks via Runtime to schedule PostgreSQL backup jobs. I can schedule jobs in any day of the week, except for saturday.Why? Well, I'm from Brasil, and believe it or not, Microsoft have translated ALL parameters in all command line capacle apps.In english based OS, the command schtasks /create /ru SYSTEM /tn "Backup" /tr "c:\Backup\PGBackup.bat SatA" /sc WEEKLY /d SAT /st 13:00:00 works like a charmIn pt-br based OS, I have to use schtasks /create /ru SYSTEM /tn "Backup" /tr "c:\Backup\PGBackup.bat SatA" /sc SEMANALMENTE /d SÁB /st 13:00:00 If I type this command directly in the command prompt, it works, because it's possible to type Á, but if I use a .bat or .cmd file with all my schedule options or directly via Java Runtime, it doesn't work.The Á comes out as a beta-like symbol. I've tried a lot of things, and none of them worked. Even using a schktasks.exe from an english based WinXP doens't work.Does anyone have a clue what is needed and if it's possible to do this automatically?
jaclaz Posted July 2, 2009 Posted July 2, 2009 Does anyone have a clue what is needed and if it's possible to do this automatically?What are you using to actually write/edit the .bat/.cmd?Maybe it's a problem with character sets. try doing the following:ECHO SÁB>c:\test.txtOpen c:\test.txt with your ediitor.Can you see the Á or has it become a Beta?jaclaz
FireBR Posted July 2, 2009 Author Posted July 2, 2009 (edited) Thanks for the fast replies.@iamthekey - Using charmap doens't work.@jaclaz - the resulting txt contains this string: SµBNow it returned a µ instead of a beta.Oh, I forgot to answer the other question.jaclaz, it really doens't matter if I use a Java IDE, notepad or edit to create a .bat/.cmd. It always comes out with this error.OK, now it worked. I was trying to add SµB without " ".Thanks a lot jaclaz. Edited July 2, 2009 by FireBR
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now