Menu

Synchronize image manually via command line whithout using syncronize at shutdow option

AdrianG
2021-04-04
2021-04-05
  • AdrianG

    AdrianG - 2021-04-04

    Hi,

    I have a ram disk with a lot of cached files and folders, and I would like to reduce the amount of time it takes to save the image to disk at shutdown, when using the "synchronize at shutdown" option, even if I select the option to "copy only files with Archive attribute", it takes more than 5 minutes each time.

    The other alternative is using the command line "C:\Program Files\ImDisk\ImDiskTk-svc.exe" SYNC and it does the job much faster (< 1min) so I would like to use it on demand, or program it in a shutdown scripts, but it does not work unless the "synchronize at shutdown" option is previously selected, which defeats the purpose of using the command line manually.

    Is there a way to use that command line without having to select the "synchronize at shutdown" option first?

    Thanks

     

    Last edit: AdrianG 2021-04-04
  • v77

    v77 - 2021-04-05

    This command line does exactly the same thing than at system shutdown. So, if it goes faster, this is either because you already used the command, or there are less files to copy, or the file caching is different when the system is shutting down.

    There is a registry value (HKLM\SOFTWARE\ImDisk\SyncFlags) that represents the options you checked in the GUI. But it can be named differently if there are several ramdisks defined.

    If you don't want the synchronization done by the service at shutdown, the simplest way is likely to disable the service. Note that the service is recreated by the GUI, if required, if it is removed. So you should only disable it or put its start on demand:

    sc stop ImDiskTk-svc
    sc config ImDiskTk-svc start= demand

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.