Used main functions:
_GUICtrlMenu_GetSystemMenu
_GUICtrlMenu_InsertMenu
_GUICtrlMenu_AppendMenu
#include <GuiMenu.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Global $hGUI, $hSysMenu, $iCount
Global Enum $idOptions = 1000, $idAbout
$hGUI = GUICreate("System Menu", 400, 300)
$hSysMenu = _GUICtrlMenu_GetSystemMenu($hGUI)
$iCount = _GUICtrlMenu_GetItemCount($hSysMenu)
; insert items before end
_GUICtrlMenu_InsertMenu ($hSysMenu, $iCount - 1, BitOr($