#Outlook Search Indexing with App Volumes (2149799)

##Symptons

  • User with a Writable Volume attached and trying to do an Advanced Search in Outlook by right-clicking on a message and choosing “find related messages” might cause the application to crash.
  • This might also occur on other Office applications when Search Index is enabled.
  • Versions of Office affected are Office 2013and Office 365 (2013 and 2016).
  • The Office application can be natively installed or in an AppStack, results are the same

##Resolution

To resolve this issue, correct the error by changing / updating 3 files and adding 1 line in the snapvol.cfg file for the affected user with the writable volume.

Changing this for a single user will address the issue for that specific user. Ensure that to complete the change, the user needs to be logged off any system so that the writable volume shows as detached in the App Volumes Manager console.

As an alternative, you can also choose to change this for all your user by changing the Writable Volume template, before assigning Writable Volumes to your user.

The required modifications are needed for prestartup.bat, startup.bat, shutdown.bat and snapvol.cfg.

Note: The prestartup.bat, startup.bat and shutdown.batare present in the 2149799_OutlookIndexConfig.zip file available under attachment section of the KB.

Reminder that these changes are all done on the Writable volume.

In the file snapvol.cfg, add the following entries under the registry exclusions section

exclude_registry=\REGISTRY\MACHINE\SOFTWARE\Microsoft\Windows Search\CrawlScopeManager_PreviousVersion

The new prestartup.bat, would look like the information below. Please note that only the lines in Italic are the lines that are added, the other lines should already exist. Also note that the mkdir and rmdir command have been updated:

setlocal enabledelayedexpansion
set SCRIPT_PATH=%~dp0

echo %date%-%time%>>%SCRIPT_PATH%prestartup.log
sc.exe config wsearch start= disabled >>%SCRIPT_PATH%prestartup.log
net stop wsearch >>%SCRIPT_PATH%prestartup.log

mkdir %SCRIPT_PATH%writable 2>>%SCRIPT_PATH%prestartup.log
rmdir c:\SnapVolumesTemp\writable /s /q 2>>%SCRIPT_PATH%prestartup.log
mklink /j c:\SnapVolumesTemp\writable %SCRIPT_PATH%writable >>%SCRIPT_PATH%prestartup.log

reg delete "hklm\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DataDirectory"  /F >>%SCRIPT_PATH%prestartup.log
reg add "hklm\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v "DataDirectory" /d "c:\snapvolumestemp\writable\persistent" /f >>%SCRIPT_PATH%prestartup.log

Add the following lines to your startup.bat file, if your Writable Volume does not have a startup.bat, you need to create it, with the information below:

sc.exe config wsearch start= demand
sc.exe start wsearch

In the shutdown.bat file, you add the following lines, above the rmdir command:

sc.exe config wsearch start= disabled >>%SCRIPT_PATH%shutdown.log
net stop wsearch >>%SCRIPT_PATH%shutdown.log