Set Alwayes show all icons and notifications on taskbar PROGRAMMATIC
Tested x86/x64
Code: Select all
Global GetHandle.l ,hKey.l ,lType.l ,lpcbData.l ,lpData.s ,lReturnCode.l ,lhRemoteRegistry.l ,lpDataDWORD.l
Procedure.l GetValue(topKey, sKeyName.s, sValueName.s, ComputerName.s)
Shared GetValue.s
lReturnCode = RegConnectRegistry_(ComputerName, topKey, @lhRemoteRegistry)
GetHandle = RegOpenKeyEx_(lhRemoteRegistry, sKeyName, 0, #KEY_READ, @hKey)
If GetHandle = #ERROR_SUCCESS
lpcbData = 255
lpData = Space(255)
GetHandle = RegQueryValueEx_(hKey, sValueName, 0, @lType, @lpData, @lpcbData)
If GetHandle = 0
GetValue = Left(lpData, lpcbData - 1)
Else
GetValue = ""
EndIf
EndIf
RegCloseKey_(hKey)
ProcedureReturn GetHandle
EndProcedure
Procedure.l SetValue(topKey.l, sKeyName.s, sValueName.s, vValue.s, lType.l, ComputerName.s)
If ComputerName = ""
GetHandle = RegOpenKeyEx_(topKey, sKeyName, 0, #KEY_ALL_ACCESS, @hKey)
Else
lReturnCode = RegConnectRegistry_(ComputerName, topKey, @lhRemoteRegistry)
GetHandle = RegOpenKeyEx_(lhRemoteRegistry, sKeyName, 0, #KEY_ALL_ACCESS, @hKey)
EndIf
If GetHandle = #ERROR_SUCCESS
lpcbData = 255
lpData = Space(255)
GetHandle = RegSetValueEx_(hkey, sValueName, 0, #REG_SZ, @vValue, Len(vValue) + 1)
RegCloseKey_(hkey)
Error = 1
ProcedureReturn Error
Else
MessageRequester("Error", "An Error occured, Return value = " + Str(lRetVal), 0)
RegCloseKey_(hKey)
Error = 0
ProcedureReturn Error
EndIf
EndProcedure
GetValue(#HKEY_LOCAL_MACHINE,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","ProductName", "")
Result = FindString(GetValue, "7", 1)
If Result = 0
MessageRequester("Error","This is not WINDOWS 7 bye", #MB_ICONERROR)
End
Else
SetValue(#HKEY_CURRENT_USER , "Software\Microsoft\Windows\CurrentVersion\Explorer", "EnableAutoTray", "0", #REG_SZ, "")
Result = MessageRequester("Information","Going to LogOff LogOn Proceed?", #PB_MessageRequester_YesNo)
If Result = #PB_MessageRequester_Yes
RunProgram("Shutdown.exe"," -l","",#PB_Program_Hide|#PB_Program_Wait)
EndIf
EndIf
End
But it is the start
RASHAD