Hi all. I'm trying to convert this function to AutoIt. I don't see any error, but it always return 87 (Invalid parameter in winerror.h) when I test. Any ideas? Thanks. Fred Global Const $DACL_SECURITY_INFORMATION = 4 Global Const $OWNER_SECURITY_INFORMATION = 1 Global Const $GROUP_SECURITY_INFORMATION = 2 Global Const $SACL_SECURITY_INFORMATION = 8 Global Const $SE_SACL_PROTECTED = 8192 Global Const $SE_DACL_PROTECTED = 4096 Local $File = @ScriptDir&'\ND.txt' Local $R = _WINAPI_SetNa