ReadOnly Volumes; DISKPART; Everything pauses indexing changes.

Found a bug in "Everything"? report it here
Post Reply
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

ReadOnly Volumes; DISKPART; Everything pauses indexing changes.

Post by raccoon »

I have a series of drives that I regularly keep set to ReadOnly Volume and ReadOnly Disk attributes set, via DISKPART (batch file script), to prevent unplanned writing to the drive.

When I make these drives writable again, clearing the ReadOnly attributes from the Volume and Disk, and then do make changes to files... Everything does not register these changes. Even on NTFS volumes.

It would seem that Everything pauses monitoring for changes, either when it detects that a device is ReadOnly, or at some point in DISKPART's unmounting remounting process.

The only solution is to rebuilt the entire index, especially since NTFS volumes do not have a "Rescan Now" option.

disk-readonly.cmd

Code: Select all

@rem disk-readonly.cmd script by Raccoon 2016
@rem DISKPART: ATTR DISK SET/CLEAR READONLY
@echo off

fltmc >nul 2>&1 && ( goto admin ) || ( goto noadmin )

:noadmin
echo This script must be 'Run As Administrator'.
echo Exiting...
echo.
pause
goto end

:admin
echo Setting drive %~d0 to READONLY...
echo ^>^> ARE YOU SURE? ^<^<
echo.
pause

( echo sele vol %~d0
  echo list vol
  echo attr vol set readonly
  echo deta vol
  echo attr disk set readonly
  echo deta disk ) | diskpart

echo.
echo.
if %ERRORLEVEL% == 0 (
  echo SUCCESS! Drive %~d0 should now be READONLY.
) else (
  echo Failure setting %~d0 to READONLY.
)
echo.
pause
:end
disk-writeable.cmd

Code: Select all

@rem disk-writeable.cmd script by Raccoon 2016
@rem DISKPART: ATTR DISK SET/CLEAR READONLY
@echo off

fltmc >nul 2>&1 && ( goto admin ) || ( goto noadmin )

:noadmin
echo This script must be 'Run As Administrator'.
echo Exiting...
echo.
pause
goto end

:admin
echo Setting drive %~d0 to WRITEABLE...
echo ^>^> ARE YOU SURE? ^<^<
echo.
pause

( echo sele vol %~d0
  echo list vol
  echo attr disk clear readonly
  echo deta disk
  echo attr vol clear readonly
  echo deta vol ) | diskpart

echo.
echo.
if %ERRORLEVEL% == 0 (
  echo SUCCESS! Drive %~d0 should now be WRITEABLE.
) else (
  echo Failure setting %~d0 to WRITEABLE.
)
echo.
pause
:end
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: ReadOnly Volumes; DISKPART; Everything pauses indexing changes.

Post by void »

Thank you for the bug report raccoon,

From my testing (Windows 10 21H1 and Everything 1.4.1.1009 and Everything 1.5.0.1275a):

Run DISKPART sel vol g:
Run DISKPART attr vol set readonly
Run DISKPART attr disk set readonly
Everything gets the request to dismount the disk.
Everything closes handles to the g: drive successfully.
The G: drive is dismounted.
The G: drive is remounted as readonly.
Everything gets error 19 ERROR_WRITE_PROTECT when attempting to monitor the g: for changes.
Everything will keep trying to re-monitor this drive every 30 seconds.
Run DISKPART sel vol g:
Run DISKPART attr disk clear readonly
Run DISKPART attr vol clear readonly
The G: drive is dismounted.
The G: drive is remounted as writable
Everything picks up the new G:
remonitoring in Everything resumes immediately.
New changes to the G: are detected in Everything.



Perhaps Everything is not resuming immediately for you.
If you wait 30 seconds does Everything pickup new changes?


To rescan only a single NTFS volume:
In Everything, type in the following search and press ENTER:
/reindex g:
(where g: is the drive to be reindexed)



What version of Windows are you using?
What version of Everything are you using?


What is shown in the debug log when you set a volume to readonly and then clear the readonly attribute?
  • In Everything, type in the following search and press ENTER:
    /debuglog
  • set your drive to readonly.
  • clear the readonly attribute for your drive.
  • Make a change to your drive.
  • Wait for 30 seconds.
  • In Everything, type in the following search and press ENTER:
    /restart
  • Could you please send your %TEMP%\Everything Debug Log.txt to support@voidtools.com
Post Reply