ProgName.s=ProgramFilename()
Name.s=GetFilePart(ProgName)
Handle = RegOpenKeyEx_(#HKEY_CURRENT_USER, "SoftwareMicrosoftWindowsCurrentVersionRun", 0, #KEY_ALL_ACCESS, @hKey)
If Handle = #ERROR_SUCCESS
RegSetValueEx_(hKey, @Name, 0, #REG_SZ, @ProgName, Len(ProgName))
RegCloseKey_(hKey)
EndIf