DriverInstall.MainWindow.sdshow_service(string)

Here are the examples of the csharp api class DriverInstall.MainWindow.sdshow_service(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: Touchmote
Source File: MainWindow.xaml.cs
private void give_service_permissions(string service_name)
        {

            //LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList RegistryKey
            string keyName = "LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList";
            RegistryKey profileList = Registry.LocalMachine.OpenSubKey(keyName);
            WindowsIdentity user = WindowsIdentity.GetCurrent();
            SecurityIdentifier sid = user.User;
            consoleLine(sid.Value);

            string service_permissions = sdshow_service(service_name);
            string permission_string = "(A;;RPWPCR;;;" + sid.Value + ")";
            consoleLine(permission_string);
            service_permissions = service_permissions.Replace(Environment.NewLine, "");
            service_permissions = service_permissions.Replace(permission_string,"");
            service_permissions = service_permissions.Replace("S:", permission_string + "S:");

            sdset_service(service_name, service_permissions);
        }