I need help to get my service to update the GPO. I can do it manually by going to a cmd prompt and running 'gpupdate /force' and it works fine but when I try to run the same cmd via vb.net script it doesn't update the GPO like it should.
When i look in the event log it shows this for the description...
The Group Policy settings for the computer were processed successfully. New settings from 2 Group Policy objects were detected and applied.
If run it manually it shows up correctly in the registry and the event log shows this additional entry as it should...
The Group Policy settings for the user were processed successfully. New settings from 2 Group Policy objects were detected and applied.
Here is the vb.net code I am running in my Windows Service...
Dim serviceProcess As New ProcessStartInfo
serviceProcess.WindowStyle = ProcessWindowStyle.Hidden
serviceProcess.FileName = "gpupdate.exe"
serviceProcess.Arguments = "/Force"
Dim servForceGPO As Process = Process.Start(serviceProcess)
Dim strCommandLine As String = "gpupdate.exe /Force"
Your assistance would be appreciated.