Website-Icon Alex Haack

Windows Eigenschaften von Druckserver

Da es scheinbar in den neueren Veröffentlichung von zum Beispiel Windows 10 der Aufruf nicht mehr ohne weiteres möglich ist, habe ich ein kleines Programm gebastelt.

Download

[wpdm_package id=’5295′]

[wpdm_package id=’5293′]
(Immer als Administrator ausführen)

Programmcode

Program.cs

using System;
using System.Diagnostics;

namespace PrinterServerProperties
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                string FileName = "RUNDLL32.EXE";
                string Arguments = "PRINTUI.DLL,PrintUIEntry /s";

                ProcessStartInfo startInfo = new ProcessStartInfo
                {
                    WindowStyle = ProcessWindowStyle.Hidden,
                    RedirectStandardOutput = true,
                    RedirectStandardError = true,
                    UseShellExecute = false,
                    CreateNoWindow = true,
                    FileName = FileName,
                    Arguments = Arguments
                };

                Process processTemp = new Process
                {
                    StartInfo = startInfo,
                    EnableRaisingEvents = true
                };
                try
                {
                    processTemp.Start();
                }
                catch (Exception)
                {
                    throw;
                }
            }
            catch
            {
                Console.WriteLine("Error...");
            }
        }
    }
}

app.manifest (Admin)

<!--?xml version="1.0" encoding="utf-8"?-->
<assembly manifestversion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyidentity version="1.0.0.0" name="PrinterServerPropertiesAdmin.app">
  <trustinfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedprivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedexecutionlevel level="requireAdministrator" uiaccess="false">
      </requestedexecutionlevel></requestedprivileges>
    </security>
  </trustinfo>
</assemblyidentity></assembly>
Die mobile Version verlassen