Ticket ID: 26284
|
Creation Date: 6/21/2022 2:05 PM
|
Product: SiteKiosk Classic Windows
|
Attachment: -
|
TicketType: Support Request
|
Version: 9.9.6191
|
Language: English
|
Views: 5081
|
Last Modification Date: -
|
Platform:
|
|
Level: Closed
|
Modified By: -
|
|
|
Support Request: 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