I am using SETX from Microsoft's Support Tools to set Environment Variables during logon. Another process I have needs the information from those Environment Variables I have set.
AFAIK SETX does not do the SendMessage function to notify applications that there is an update to Environment Variables, and I've been looking for ways to do this since browsing the internet does not yield simple applications that just invoke this function and then end.
I've found a C# sample on how to import the user32.dll which has this function, but not what code I need to use to invoke the SendMessage function.
Hints or samples of what I need to enclose this to a working program would be awsome ;)
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam);