Udostępnij za pośrednictwem


rundll32 printui.dll,PrintUIEntry

Automatyzuje wiele zadań konfiguracji drukarki. printui.dll to plik wykonywalny zawierający funkcje używane przez okna dialogowe konfiguracji drukarki. Te funkcje mogą być również wywoływane z poziomu skryptu lub pliku wsadowego wiersza polecenia lub mogą być uruchamiane interaktywnie z poziomu wiersza polecenia.

Syntax

rundll32 printui.dll PrintUIEntry [baseparameter] [modificationparameter1] [modificationparameter2] [modificationparameterN]

Można również użyć następujących alternatywnych składni, chociaż przykłady w tym temacie używają poprzedniej składni:

rundll32 printui.dll,PrintUIEntry [baseparameter] [modificationparameter1] [modificationparameter2] [ModificationParameterN]
rundll32 printui PrintUIEntry [baseparameter] [modificationparameter1] [modificationparameter2] [modificationparameterN]
rundll32 printui,PrintUIEntry [baseparameter] [modificationparameter1] [modificationparameter2] [modificationparameterN]

Parameters

Istnieją dwa typy parametrów: parametry podstawowe i parametry modyfikacji. Parametry podstawowe określają funkcję, którą ma wykonać polecenie. W danym wierszu polecenia może pojawić się tylko jeden z tych parametrów. Następnie można zmodyfikować parametr podstawowy przy użyciu co najmniej jednego parametru modyfikacji, jeśli mają zastosowanie do parametru podstawowego (nie wszystkie parametry modyfikacji są obsługiwane przez wszystkie parametry podstawowe).

Base Parameters Description
/dl Usuwa drukarkę lokalną.
/dn Usuwa połączenie drukarki sieciowej.
/dd Usuwa sterownik drukarki.
/e Wyświetla preferencje drukowania dla danej drukarki.
/ga dodaje połączenie drukarki na komputer (połączenie jest dostępne dla każdego użytkownika na tym komputerze podczas logowania).
/ge Wyświetla połączenia drukarki komputera na komputerze.
/gd Usuwa połączenie na drukarkę komputera (połączenie zostanie usunięte przy następnym zalogowaniu użytkownika).
/ia Instaluje sterownik drukarki przy użyciu pliku inf.
/id Instaluje sterownik drukarki za pomocą Kreatora dodawania sterownika drukarki.
/if Instaluje drukarkę przy użyciu pliku inf.
/ii Instaluje drukarkę przy użyciu kreatora dodawania drukarki z plikiem inf.
/il Instaluje drukarkę przy użyciu kreatora dodawania drukarki.
/in Łączy się z zdalną drukarką sieciową.
/ip Instaluje drukarkę przy użyciu Kreatora instalacji drukarki sieciowej (dostępnej z poziomu interfejsu użytkownika z zarządzania drukowaniem).
/k drukuje stronę testową na drukarce.
/o Wyświetla kolejkę drukarki.
/p Wyświetla właściwości drukarki. When you use this parameter, you must also specify a value for the modification parameter /n[name].
/s Wyświetla właściwości serwera wydruku. Jeśli chcesz wyświetlić lokalny serwer wydruku, nie musisz używać parametru modyfikacji. However, if you want to view a remote print server, you must specify the /c[name] modification parameter.
/Ss Określa, jakiego typu informacje będą przechowywane dla drukarki. If none of the values for /Ss are specified, the default behavior is as if all of them were specified. Użyj tego parametru podstawowego z następującymi wartościami umieszczonymi na końcu wiersza polecenia:
  • 2: Stores the information contained in the printer s printER_INFO_2 structure. Ta struktura zawiera podstawowe informacje o drukarce, takie jak jego nazwa, nazwa serwera, nazwa portu i nazwa udziału.
  • 7: Used to store the directory service information contained in the printER_INFO_7 structure.
  • c: Stores the color profile information for a printer.
  • d: Stores printer specific data such as the printer s hardware ID.
  • s: Stores the printer s security descriptor.
  • g: Stores the information in the printer s global DEVmode structure.
  • m: Stores the minimal settings for the printer. This is equivalent to specifying 2d, and g.
  • u: Stores the information in the printer s per user DEVmode structure.
/Sr Określa, jakie informacje o drukarce są przywracane i jak są obsługiwane konflikty w ustawieniach. Użyj z następującymi wartościami umieszczonymi na końcu wiersza polecenia:
  • 2: Restores the information contained in the printer s printER_INFO_2 structure. Ta struktura zawiera podstawowe informacje o drukarce, takie jak jego nazwa, nazwa serwera, nazwa portu i nazwa udziału.
  • 7: Restores the directory service information contained in the printER_INFO_7 structure.
  • c: Restores the color profile information for a printer.
  • d: Restores printer specific data, such as the printer s hardware ID.
  • s: Restores the printer s security descriptor.
  • g: Restores the information in the printer s global DEVmode structure.
  • m: Restores the minimal settings for the printer. This is equivalent to specifying 2, d, and g.
  • u Restores the information in the printe s per user DEVmode structure.
  • r: If the printer name stored in the file is different from the name of the printer being restored to, then use the current printer name. This cannot be specified with f. If neither r nor f is specified and the names do not match, restoration of the settings fails.
  • f: If the printer name stored in the file is different from the name of the printer being restored to, then use the printer name in the file. This cannot be specified with r. If neither f nor r is specified and the names do not match, restoration of the settings fails.
  • p: If the port name in the file being restored from does not match the current port name of the printer being restored to, the printer s current port name is used.
  • h: If the printer being restored to could not be shared using the resource share name in the saved settings file, then attempt to share the printer with either the current share name or a new generated share name if neither H nor h is specified and the printer being restored to cannot be shared with the saved share name, then restoration fails.
  • h: If the printer being restored to cannot be shared with the saved share name, then do not share the printer. If neither H nor h is specified and the printer being restored to cannot be shared with the saved share name, then restoration fails.
  • i: If the driver in the saved settings file does not match the driver for the printer being restored to, then the restoration fails.
/Xg Pobiera ustawienia drukarki.
/Xs Ustawia ustawienia drukarki.
/y Ustawia drukarkę instalowaną jako drukarka domyślna.
/? Wyświetla pomoc produktu dla polecenia i skojarzonych z nim parametrów.
@[file] Określa plik argumentu wiersza polecenia i bezpośrednio wstawia tekst w tym pliku do wiersza polecenia.
Modification Parameters Description
/a[file] Określa nazwę pliku binarnego.
/b[name] Określa nazwę drukarki podstawowej.
/c[name] Określa nazwę komputera, jeśli akcja do wykonania jest na komputerze zdalnym.
/f[file] Określa ścieżkę Universal Naming Convention (UNC) i nazwę pliku inf lub nazwę pliku wyjściowego, w zależności od wykonywanego zadania. Use /F[file] to specify a dependent .inf file.
/F[file] Specifies the UNC path and name of a .inf file that the .inf file specified with /f[file] depends on.
/h[architecture] Określa architekturę sterownika. Use one of the following: x86, x64, or Itanium.
/j[provider] Określa nazwę dostawcy wydruku.
/l[path] Określa ścieżkę UNC, w której znajdują się pliki sterownika drukarki, które są używane.
/m[model] Określa nazwę modelu sterownika. (Tę wartość można określić w pliku inf).
/n[name] Określa nazwę drukarki.
/q Uruchamia polecenie bez powiadomień dla użytkownika.
/r[port] Określa nazwę portu.
/u Określa, aby użyć istniejącego sterownika drukarki, jeśli jest już zainstalowany.
/t[#] Określa stronę indeksu opartą na zerach, na których ma się rozpocząć.
/v[version] Określa wersję sterownika. If you do not also specify a value for /K, you must specify one of the following values: type 2 - Kernel mode or type 3 - User mode.
/w prompts the user for a driver if the driver is not found in the .inf file that is specified by /f.
/Y Określa, że nazwy drukarek nie powinny być generowane automatycznie.
/z Określa, aby nie udostępniać automatycznie instalowanej drukarki.
/K changes the meaning of the parameter /h[architecture] to accept 2 in place of x86, 3 in place of x64, or 4 in place of Itanium. It also changes the value of the parameter /v[version] to accept 2 in the place of type 2 - Kernel mode and 3 in place of type 3 - User mode.
/Z Udostępnia instalowaną drukarkę. Only use with the /if parameter.
/Mw[message] Wyświetla użytkownikowi komunikat ostrzegawczy przed zatwierdzeniem zmian określonych w wierszu polecenia.
/Mq[message] Wyświetla użytkownikowi komunikat potwierdzający przed zatwierdzeniem zmian określonych w wierszu polecenia.
/W[flags] Określa wszelkie parametry lub opcje kreatora dodawania drukarki, Kreatora dodawania sterowników drukarki i Kreatora instalacji drukarki sieciowej.

r: Enables the wizards to be restarted from the last page.

/G[flags] Określa parametry globalne i opcje, których chcesz użyć.

w: Suppresses setup driver warnings to the user.

Remarks

  • The PrintUIEntry keyword is case sensitive, and you must enter the syntax for this command with the exact capitalization shown in the examples in this topic.

  • Aby uzyskać więcej przykładów, w wierszu polecenia wpisz: rundll32 printui.dll,PrintUIEntry /?

Examples

Aby dodać nową drukarkę zdalną, drukarkę1, dla komputera Client1, który jest widoczny dla konta użytkownika, na którym jest uruchamiane to polecenie, wpisz:

rundll32 printui.dll PrintUIEntry /in /n\\client1\printer1

Aby dodać drukarkę przy użyciu kreatora dodawania drukarki i używając pliku inf, InfFile.inf, znajdującego się na dysku c: w infpath, wpisz:

rundll32 printui.dll PrintUIEntry /ii /f c:\Infpath\InfFile.inf

Aby usunąć istniejącą drukarkę, drukarkę1, na komputerze, Client1, wpisz:

rundll32 printui.dll PrintUIEntry /dn /n\\client1\printer1

Aby dodać połączenie drukarki komputera, drukarka2, dla wszystkich użytkowników komputera, Client2, typ (połączenie zostanie zastosowane, gdy użytkownik zaloguje się):

rundll32 printui.dll PrintUIEntry /ga /n\\client2\printer2

Aby usunąć połączenie drukarki komputera, drukarka2, dla wszystkich użytkowników komputera, Client2, typ (połączenie zostanie usunięte, gdy użytkownik zaloguje się):

rundll32 printui.dll PrintUIEntry /gd /n\\client2\printer2

Aby wyświetlić właściwości serwera wydruku, printServer1, wpisz:

rundll32 printui.dll PrintUIEntry /s /t1 /c\\printserver1

Aby wyświetlić właściwości drukarki, printer3, wpisz:

rundll32 printui.dll PrintUIEntry /p /n\\printer3