0

I am trying to use a if command to change language. But all I am getting is "Syntax error"
I really can not find the real syntax.
CMD file

@echo off
echo "1 =Brazilian Portugese"
echo:
set /p %language%="What language would you like? "
if "%language%"==1(

REGEDIT.EXE -s Change Language to Brazilian Portuguese.reg
echo "Language set to Brazilian Portugese"
goto :PAUSE
)
:PAUSE
echo "pausing script"
@pause

Change language to Brazilian Portugese.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Maxis\The Sims 4] "Locale"="pt_BR"

1

try REGEDIT.EXE -s "Change Language to Brazilian Portuguese.reg"

or use underscores in your file

REGEDIT.EXE -s Change_Language_to_Brazilian_Portuguese.reg

For the second part:

if "%language%" == "PT" goto PT
PT:
  REGEDIT.EXE -s Change_Language_to_Brazilian_Portuguese.reg
  • Thanks! that fixes all issues with REGEDIT. But I think I have a problem with my if statements too. – 0x3D Sep 5 '14 at 18:30
  • i'lll add in the answer – Remus Rigo Sep 5 '14 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.