Support Request: Sitekiosk Chrome download issue/self-deletion

Description

Hello,
we have an ongoing issue with downloads via SK's Chrome on multiple machines.
Attaching screens and config.
The thing is, after we reinstall a machine and install Sitekiosk client and apply config/autologin with domain account, after some time, the Windows profile on the machine becomes "corrupted".
All works fine for days, weeks, sometimes months, but then suddenly all downloaded files from the SK Chrome browser immediately disappears (they get downloaded, but not visible in File manager, also not in the folder when checking with Windows's file explorer/remote powershell). [1_download.png]
If we create and save a Word file to the download location, it is there, so long we have the file opened. If we close it, it disappears (I think it's because the is a delete-lock on the file when opened). [2_word_open.png] [3_word_closed.png]
No info regarding the issue in full SK logging.
If we uncheck the "Delete downloaded files" in Logout section [5_cleanup.png]. All starts to work normally, downloaded files stay in the download folder and nothing is deleted.
My theory is that the "logout" or the "delete" function is in constant loop for some reason and deletes the contents of the folders several times per second.
We tried reinstallation and repair of the Sitekiosk client, explicitly setting full folder permissions, making the domain account admin... but nothing worked.
The only workaround we have in place now is recreating Windows profile (signing as different user, deleting the domain profile SK uses and enabling autologin for that account again, so it gets recreated). This again works only for a while, until it gets "corrupted" again.

Is there anything that could be done to prevent this, yet still be able to delete the contents of folders specified (due GDPR)?

Answer: (3)

Re: Sitekiosk Chrome download issue/self-deletion 2/2/2021 9:59 AM
Hello,

This can happen when you activated the option to delete downloaded files (or even if you have added more folders that SiteKiosk should empty on logout) but there is a file / are files that cannot be deleted.
E.g. because there are note enough access rights or if the file is kept open by another Windows process.
(As it happens after a while and SiteKiosk doesn’t change during runtime there may were any Windows Domain policy changes or and Anti-Virus application holds any file?)

In SiteKiosk versions prior to 9.8.5547, SiteKiosk tried to delete the file(s) over and over again in this case (to be sure all files will be deleted), which also deleted all other files and folders (over and over again during runtime after the logout process itself has finished).

The solutions would be
- (Advised) Update SiteKiosk to 9.85547 or later. These versions have a 5 minute time out for deleting the files after logout.

Actual version:
https://www.provisio.com/en-GB/Downloads/Download.aspx?ItemId=1
Note that you may need to purchase a license update (if the purchase was more than 12 month ago and you don’t have purchased any maintenance update) but you can also test it without valid license.


- Check which folder cannot be emptied e.g. by adding them step by step.
First begin with default settings (Download folder = C:\Users\Public\Documents\SiteKiosk") & test.

Then change it to "C:\Downloads" test
Note: You don’t need to additionally add "C:\Downloads" to "Files & Downloads" and "Logout" as it already displays in the File Manager because it is the download folder you configured (and will be emptied with the logout option "Delete downloaded files")

Finally add "C:\Users\KC\AppData\Local\Microsoft\Office\UnsavedFiles"& test,
You may also check the access rights of the user KC to these folders when the problem has occurred.


- Deleting the files with an external script instead. In an external script (JS or VBS) that you add to SiteKiosk (Start Page & Browser>Advanced>On startup of SiteKiosk, execute the following script file) you can use WSH (e.g. the FileSystemObject) to delete files.
6. Execute script file: https://www.provisio.com/helpconsole/SiteKiosk%20Help/en-US/default.htm?advanced_settings.htm


Here a code example (usage at your own risk, without further free support):

//SK Object Model Event that fires SiteKiosk will be reset – like e.g. on logout
SiteKiosk.OnReset = waitBeforeDelete;

function waitBeforeDelete()
{
      //Give SiteKiosk some time to run through its default session end/screensaver activation methods
      evtid = SiteKiosk.Scheduler.AddDelayedEvent(3000, deleteFolders);
}

function deleteFolders(eventID)
{  
      try
      {     
            //Deleting the folders with the help of the FileSystemObject
            var fso = new ActiveXObject("Scripting.FileSystemObject");
            fso.DeleteFile("C:\\Users\\SiteKiosk\\Documents\\*", true);
           fso.DeleteFile("C:\\Users\\SiteKiosk\\Downloads\\*", true);
            fso.DeleteFile("C:\\Users\\SiteKiosk\\Pictures\\*", true);
           SiteKiosk.Logfile.Notification("Deleting folder content was successful");
            
     }
      catch (e)
      {
            //Create a SiteKiosk logfile entry in case something goes wrong
            SiteKiosk.Logfile.Notification("There was an error deleting the folder content: " + e.description);
      }
}


Regards,
Michael Olbrich
Re: Sitekiosk Chrome download issue/self-deletion 4/16/2021 8:20 AM
Hello,
no script we tested was actually working - so we went with the upgrade of SK client to "SiteKiosk Client 9.8.572".

However, we have deployed two machines with these and both still have the same issues. Files does not show up in file explorer after downloaded.
Same workaround as before worked. Deletion of windows profile, but this is just a workaround and the issue will come back later.

Any other suggestions to solve this?
Re: Sitekiosk Chrome download issue/self-deletion 4/16/2021 9:17 AM
Hello,

The script was just a basic example but worked in other test scenarios. Note that you need uncheck the option "Delete downloaded files" in Logout section when using a script to delete the files. With the script you also need to make sure that the Windows user account you start SiteKiosk in has the required access rights to the folder you delete the files in (for SiteKiosk user you can check with using the System-Security-manager >Customized>Folder access).
But also the script can only delete files that are not opened (Windows restriction)

When using the newer SiteKiosk version make sure that you wait 5 minutes before you check.
>>(Advised) Update SiteKiosk to 9.85547 or later. These versions have a 5 minute time out for deleting the files after logout.<<<
The most current version now is 9.8.5779 https://www.provisio.com/en-GB/Downloads/Download.aspx?ItemId=1
You may also update to this (currently supported) version first.

>>>Any other suggestions to solve this?<<<
Note: this kind of problem only occurs when the file that SiteKiosk tries to delete is blocked by Windows so it cannot be deleted e.g. because it is still in use.
When using any external application that opens a file you want to delete also make sure that you added that application to the SiteKiosk configuration that also the application will be closed by SiteKiosk on logout.

Otherwise check which files are affected and by which program or Windows service this file is kept open (e.g. with Task Manager).
If necessary, first in the one-time start mode.
To allow the task manager in run once mode temporary disable the option "Block system critical windows & dialog boxes" at >Access/Security.

Regards,
Michael Olbrich
My Account
Login
Language (Tickets):