public static bool ResetRegistry() { Logger.AddInformation("resetting registry entries", (object)null, (Exception)null, (string)null); SebWindowsServiceHandler.Initialize(); Logger.AddInformation("calling reset on wcf service", (object)null, (Exception)null, (string)null); SebWindowsServiceHandler.ResetInputParameters(); return(SebWindowsServiceHandler._sebWindowsServicePipeProxy.Reset()); }
public static bool SetRegistryAccordingToConfiguration() { return(SebWindowsServiceHandler.SetRegistryAccordingToConfiguration(new Dictionary <RegistryIdentifiers, object>() { { RegistryIdentifiers.DisableLockWorkstation, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableLockThisComputer")["insideSebEnableLockThisComputer"] ? 0 : 1) }, { RegistryIdentifiers.DisableChangePassword, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableChangeAPassword")["insideSebEnableChangeAPassword"] ? 0 : 1) }, { RegistryIdentifiers.DisableTaskMgr, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableStartTaskManager")["insideSebEnableStartTaskManager"] ? 0 : 1) }, { RegistryIdentifiers.HideFastUserSwitching, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableSwitchUser")["insideSebEnableSwitchUser"] ? 0 : 1) }, { RegistryIdentifiers.NoLogoff, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableLogOff")["insideSebEnableLogOff"] ? 0 : 1) }, { RegistryIdentifiers.NoClose, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableShutDown")["insideSebEnableShutDown"] ? 0 : 1) }, { RegistryIdentifiers.EnableShade, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableVmWareClientShade")["insideSebEnableVmWareClientShade"] ? 1 : 0) }, { RegistryIdentifiers.EnableShadeHorizon, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableVmWareClientShade")["insideSebEnableVmWareClientShade"] ? "True" : "False") }, { RegistryIdentifiers.EaseOfAccess, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableEaseOfAccess")["insideSebEnableEaseOfAccess"] ? "" : "SebDummy.exe") }, { RegistryIdentifiers.DontDisplayNetworkSelectionUI, (object)((bool)SEBClientInfo.getSebSetting("insideSebEnableEnableNetworkConnectionSelector")["insideSebEnableEnableNetworkConnectionSelector"] ? 0 : 1) } })); }
private static void Initialize() { if (SebWindowsServiceHandler._initialized) { return; } Logger.AddInformation("initializing wcf service connection", (object)null, (Exception)null, (string)null); SebWindowsServiceHandler._sebWindowsServicePipeProxy = new ChannelFactory <IRegistryServiceContract>((Binding) new NetNamedPipeBinding(NetNamedPipeSecurityMode.Transport), new EndpointAddress("net.pipe://localhost/SebWindowsServiceWCF/service")).CreateChannel(); if (string.IsNullOrEmpty(SebWindowsServiceHandler._username)) { SebWindowsServiceHandler._username = SebWindowsServiceHandler.GetCurrentUsername(); } if (string.IsNullOrEmpty(SebWindowsServiceHandler._sid)) { SebWindowsServiceHandler._sid = SebWindowsServiceHandler.GetCurrentUserSID(); } if (string.IsNullOrEmpty(SebWindowsServiceHandler._sid) && string.IsNullOrEmpty(SebWindowsServiceHandler._username)) { throw new Exception("Unable to get SID & Username"); } SebWindowsServiceHandler._initialized = true; }
public static void Reconnect() { SebWindowsServiceHandler._initialized = false; SebWindowsServiceHandler.Initialize(); }
public static bool SetRegistryAccordingToConfiguration(Dictionary <RegistryIdentifiers, object> valuesToSet) { SebWindowsServiceHandler.Initialize(); SebWindowsServiceHandler.SetInputParameters(); return(SebWindowsServiceHandler._sebWindowsServicePipeProxy.SetRegistryEntries(valuesToSet, SebWindowsServiceHandler._sid, SebWindowsServiceHandler._username)); }