Unloading persistent log-on RAM disks at log-off

Started by David

David

Unloading persistent log-on RAM disks at log-off   02 October 2020, 11:22

A quick question (I hope, being respectful of your time): do I need to execute a script to automatically unload a persistent disk (associated with an image)?
I see the option to load on log-on, but nothing about unloading image-associated RAM disks.

The volatile log-on RAM disks that I tried appear to unload at user log-off, as expected. However, log-on disks associated with an image and usually remain. They can be seen when another user logs into a shared PC. Save to image option is enabled, non-admin user account.

On the good side, I note that the image saving IS triggered consistently at user log-off (at least the time stamp on the file matches their log-off time). But I would have expected that having been loaded at log-on, the disk would be unloaded at log-off as well.

Stay healthy,
David
SoftPerfect Support forum - Ann avatar image
Ann

Re: Unloading persistent log-on RAM disks at log-off   02 October 2020, 11:46

Normally, if you have a logon-time RAM disk with an associated image, it is populated from that image when a user logs on. If the 'Save Contents to Image' option is enabled in the disk's properties, any changes are written back to the image file when the user logs off, and then the RAM disk is destroyed.

It seems however that in some cases Windows may kill the RAM Disk application upon logoff before the clean up had a chance to complete. We have just reviewed that code, and now the application tells Windows to wait if it needs more time to clean up on log off. It should now better handle logon-time disks when a user session is terminated.

You can download and try the new build.
I downloaded the new file; and noticed that the other user disk data is still present.
These are my steps:
  1. Software was Installed under local admin account with default settings.
  2. Volume images - created but not mounted under the local admin account.
  3. Local Admin - logged out.
  4. Logged into local user account (Account permissions: User & HomeUser only).
  5. Mounted the volume for this user with Save, also Advanced - Save - every 360.
  6. Moved around some data on the RAMdisk, then logged off.
  7. Logged into the local admin account again.
  8. Previous users RAMdisk is still present, review of the image file shows a modification timestamp at recent log off (assuming this was the complete save/update).
  9. Mounted a RAMdisk image with same Save settings above, added some data, then logged off local admin.
  10. Logged into the previous user account.
  11. Users RAMdisk and data is still present, so is the volume and data for the Local Admin.
  12. Review of the timestamp on the local admin's saved image shows modification at logoff time.
SoftPerfect Support forum - Ann avatar image
Ann

Re: Unloading persistent log-on RAM disks at log-off   07 October 2020, 09:30

What you describe sounds like normal behaviour if I understood your steps correctly:
  1. You created an image-based RAM disk as user A, then logged off.
  2. You logged on as user B and found that user's A RAM disk was there.

The disk is not specific to any user, i.e. a logon-time disk will be mounted for any user that logs on. So what has happened is this:
  1. User A logged off, all data saved to the image file, RAM disk destroyed upon logoff.
  2. User B logs on, a new RAM disk is created and the data written by user A is loaded from the image file.
In other words, any defined RAM disk will be created no matter who logs on.

If I may ask, what are you trying to achieve with this, i.e. what are your requirements? There may be a better way of doing it.
I was hoping to have the RAM disk for a specific user ID auto-load at log-on (with image save flag), and auto-unload/dismount upon log-off. They're children, and it seemed like elegant and easy damage control. In retrospect, it's an apparently uncommon use case and I can appreciate that.

I can probably use the existing controls to script events at log-on and log-off, probably via Task Manager.
SoftPerfect Support forum - Ann avatar image
Ann

Re: Unloading persistent log-on RAM disks at log-off   07 October 2020, 09:43

Indeed the RAM Disk application is not exactly designed for the scenario where each user has their own RAM disk and image file.

Like you mentioned, it can be automated with some command line parameters. Or simply consider an alternative product that allows per-user configuration.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **   *******   **    **  ********   *******  
  **  **   **     **  ***   **     **     **     ** 
   ****    **         ****  **     **            ** 
    **     ********   ** ** **     **      *******  
    **     **     **  **  ****     **            ** 
    **     **     **  **   ***     **     **     ** 
    **      *******   **    **     **      *******  

Message: