deajan / smartmontools-win

smartmontools for windows package providing automated / mass installation and email alert support out of the box for hard drive SMART functionality. Scriptable for unattended or GUI end user install.
GNU General Public License v2.0
51 stars 15 forks source link

Reconfigure SMART Alert settings: Cannot read in config file, erroraction_config.cmd #16

Closed c72578 closed 6 years ago

c72578 commented 7 years ago

When starting "Reconfigure SMART Alert settings" I get the following error message: "Cannot read in config file [C:\Program Files\smartmontools for Windows\bin\erroraction_config.cmd].

This happens every time. There is no difference if "Reconfigure SMART Alert settings" is started from the program menu entry, from the command line or as admin. It was also tried to save and use "erroraction_config.cmd" in a different location, e.g. "e:\erroraction_config.cmd" with full permissions - no effect.

This occurs with the following versions: smartmontools-win-6.5-1.exe smartmontools-win-6.5-2-dev.exe

OS: Windows 7 SP1, 64 bit

smartmontools-win_cannot_read_in_config_file

deajan commented 7 years ago

I cannot reproduce this bug unless erroraction_config.exe is run without administrative privileges. Does the erroraction_config.cmd file exist in the described path ? Also, what does it contain please ?

c72578 commented 7 years ago

Yes, the erroraction_config.cmd exists in the described path. Otherwise the message "Wrong configuration file path provided." appears immediately. The content of the erroraction_config.cmd is the default content, which is installed:

:: erroraction_config.cmd file for smartmontools for Windows v6.5+

:: Valid values are: yes, no set MAIL_ALERT=yes

set SOURCE_MAIL= set DESTINATION_MAIL= set SMTP_SERVER= set SMTP_PORT=25 set SMTP_USER=

:: SMTP Password must be encoded in base64 (example via https://www.base64encode.org) set SMTP_PASSWORD=

:: Security may be: none, ssl or tls set SECURITY=none

:: Valid values are: yes, no set LOCAL_ALERT=no

:: You may change this to a customized warning message or leave it to the default set WARNING_MESSAGE=WARNUNG: Eine Ihrer Festplatten hat SMART-Fehler. Bitte schreiben Sie diese Nachricht auf und kontaktieren Sie Ihren technischen Support so schnell wie möglich.

:: Valid values are: yes, no set COMPRESS_LOGS=yes

deajan commented 7 years ago

Okay, getting a bit short of ideas. Any antivirus / antimalware software that could block access to .cmd files maybe ? Does this behavior happen on multiple machines ? And well... double checked that you run erroraction_config.exe with UAC elevated ?

c72578 commented 7 years ago

I could find the reason for the problem in the meantime. It is caused by a special character in the German message. The message is set automatically during installation. When I change "möglich" to "moeglich" inside the file erroraction_config.cmd, then there is no error.

The erroraction_config.cmd file with the German message is attached. The charset of the file seems to be ANSI. You should be able to reproduce the issue with it.

OS: Windows 7 SP1, 64 bit, German

erroraction_config.zip

deajan commented 7 years ago

Thanks for your help, I'll investigate :)

deajan commented 6 years ago

Resolved in latest version. Sorry for the really long time.