Einzelnen Beitrag anzeigen

Mario

Registriert seit: 7. Apr 2003
567 Beiträge
 
Delphi 2006 Enterprise
 
#1

Aufruf Rundll zur Druckerinstallation

  Alt 18. Mai 2005, 19:10
Hallo,

ich kann an der Kommandozeile folgenden Befehl problemlos ausführen:
Code:
rundll32.exe printui.dll,PrintUIEntry /if /b "PS Printer" /f %windir%\inf\ntprint.inf /r "FILE:" /m "Apple Color LW 12/660 PS"
Es wird unter 2k/XP ein Druckertreiber installiert.

Nun habe ich versucht, dass von meinem Delphi Programm aus zu starten, ohne Erfolg: Der Vorgang konnte nicht abgeschlossen werden

V1:
Delphi-Quellcode:
JCL:
ShellExecEx('rundll32.exe', 'printui.dll,PrintUIEntry /if /b "PS Printer" /f %windir%\inf\ntprint.inf /r "FILE:" /m "Apple Color LW 12/660 PS"','', SW_SHOWNORMAL);
V2:
Delphi-Quellcode:
Delphi WinApi:
ShellExecute(0, 'open', 'rundll32.exe', 'printui.dll,PrintUIEntry /if /b "PS Printer" /f %windir%\inf\ntprint.inf /r "FILE:" /m "Apple Color LW 12/660 PS"', nil, 0);
V3: Mit RunProcess, basierend auf CreateProcess

Was könnte ich falsch machen?
Schöne Grüße,
Mario Noack
  Mit Zitat antworten Zitat