Registerapplicationrestart

[DllImport("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)][return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RegisterApplicationRestart(string pwzCommandline,
   RestartFlags dwFlags
);

Microsoft documentation: Link

Last updated