Declare Integer ExitWindowsEx in "user32.dll" Integer uFlags, Integer dwReserved Values to variable uFlags: 0 = Shutdown windows 1 = Stand By. 2 = Restart windows. second column is value: 0 Ex: ExitWindowsEx(1,0)