Ticket ID: 26284
|
Erstellungsdatum: 21.06.2022 14:05
|
Produkt: SiteKiosk Classic Windows
|
Anhang: -
|
Tickettyp: Support Anfrage
|
Version: 9.9.6191
|
Sprache: Englisch
|
Aufrufe: 5036
|
Letzte Änderung: -
|
Plattform:
|
|
Level: Geschlossen
|
Geändert von: -
|
|
|
Support Anfrage: Issue on print jobs in error deletion
Hello,
We have noticed Sitekiosk does not delete print jobs in error after a reset.
So we try to manipulate these jobs with SiteKiosk Model Object, without succes :(
function OnReset(){
SiteKiosk.Logfile.Notification("RESET SK DETECTED >>> Clearing spooler ! ");
//SiteKiosk.Logfile.Notification("DEFAULT PRINTER >>> " + SiteKiosk.Printer.DefaultPrinter);
dPrinterName = SiteKiosk.Printer.DefaultPrinter;
dPrinter = SiteKiosk.Printer.FindPrinter(dPrinterName);
dJobCount = dPrinter.Jobs.Count;
//SiteKiosk.Logfile.Notification("JOB COUNT >>> " + dJobCount);
if(dJobCount > 0){
for (i = 1; i <= dJobCount; i++) {
MyJob = dPrinter.Jobs.Item(i);
res = MyJob.Delete();
SiteKiosk.Logfile.Notification("Delete Job >>> " + MyJob.Info + " was delete >>> " + res);
}
}else{
SiteKiosk.Logfile.Notification("No job to delete ! ");
}
}
We understand that this method could works because jobs are waiting (IsWaiting = true).
So we try to clearing spooler with MS-DOS command directly in SiteKiosk Model Object (for security reasons we could not launch à .bat) ; but it does not work to.
We have errors on path, probably an issue with the launched parameters.
function OnReset(){
SiteKiosk.Logfile.Notification("RESET SK DETECTED >>> Clearing spooler ! ");
SiteKiosk.ExternalApps.RunElevated("c:/windows/system32/cmd.exe net stop spooler");
SiteKiosk.ExternalApps.RunElevated("c:/windows/system32/cmd.exe del c:\WINDOWS\System32\spool\PRINTERS\*.* /q /f");
SiteKiosk.ExternalApps.RunElevated("c:/windows/system32/cmd.exe net start spooler");
}
Do you know a way to delete jobs in errors ?
Thanks