So recently I've been playing with the Lenovo T431s, but this is not about the laptop it's about the 24 GB SSD drive they install for caching, I think it's a cool feature to have.
So the default configuration is a 16 GB caching drive and a 8 GB hibernation partition which I didn't figure was needed. So since I'm looking at distributing this model to our users I had to learn the configuration of the software. For starters it uses the ExpressCache application which really doesn't have many configurations options the only one I found hand was the -preload option.
So the basics configuration is as follows:
This is a high level overview that will be detailed later
Uninstall Expresscache - Reboot Required
Run DiskPart to configure the SSD card
Reinstall Expresscache - Reboot required
Load desired files and folders
Since this is a mass deployment I set up the machine with all the applications and configuration settings and uninstalled Expresscache before capturing the image so I don't have to worry about the first step of uninstalling the application.
Image is put on the machine with a batch file and 2 Diskpart scripts
Diskpart Script 1
=================
List Disk
=================
This is designed to identify the correct disk to work with
Diskpart Script 2
=================
Select Disk %dsknum%
Clean
Convert MBR
Create Partition Primary
Set ID=73 Override
Exit
=================
Once the correct disk is identified all partitions are removed, it's converted to a Master Boot Record and the ID is set to 73
Batch Script
=================
@echo off
cls
setlocal EnableDelayedExpansion
setlocal EnableExtensions
:Start
If exist c:\windows\system32\phtcfg\SSDCFG.flg goto Cleanup
If exist c:\windows\system32\phtcfg\partI.flg goto Exprinst
:ConfigDSK
for /f "tokens=1,2,4,5" %%a in ('diskpart /s c:\windows\system32\phtcfg\diskcfg.edr ^| find /i "online"') do if %%c==22 (set dsknum=%%b & goto config)
goto End
:Config
diskpart /s c:\windows\system32\phtcfg\SSDcfg.edr
type nul > c:\windows\system32\phtcfg\partI.flg
start /w C:\DRIVERS\expresscache_setup_64
goto end
:Exprinst
cd c:\windows\system32
for /r %%l in (*.dll) do eccmd -preload "%%l"
cd "c:\Program Files (x86)\Microsoft Office"
for /r %%m in (.) do eccmd -preload "%%m"
:cleanup
del c:\windows\system32\phtcfg\partI.flg
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\SSD Config" /f
type nul > c:\windows\system32\phtcfg\SSDCFG.flg
:end
=================
A register entry is added to the Run key for the default user, so any user creating a profile gets the value and it run on boot.
The Start section determines the state.
If there are no .flg files nothing has been run
If the partI.flg is present then only the first part of the script has run
if the SSDcfg.flg is present then the process has completed
The ConfigDSK section gets the disk information from Diskpart
for /f "tokens=1,2,4,5" %%a in ('diskpart /s c:\windows\system32\phtcfg\diskcfg.edr ^| find /i "online"') do if %%c==22 (set dsknum=%%b & goto config)
It opens Diskpart and runs the follow command "List Disk" and grabs the following variables (The word Disk, The Disk Number, The Disk Size and the Disk size units) for each disk ie Disk 1 495 GB. Since we know it's a 24 GB SSD we check the Disk Size column for a matching number. It then sets the disk number and goes to the configuration portion for the SSD card
The Config Section
Uses the second Diskpart to configure the SSD Card
Creates a flag for for the completion of the first part and installs Expresscache - This as stated above forces a reboot
After the reboot since it is still in the run key of the registry it starts again but it finds the flag file indicating that the first part was complete and goes to the second phase
The Exprinst Section
Loads all the DLL in the Windows\System32 Directory and the entire Microsoft Office Directory on the Cache drive and does a Clean up
The Cleanup Section
Removes the Flag file for Phase 1, Removes the registry entry and creates a flag so to show that it has completed so when a new profile is created after checking the completed state in the Start section it goes to the Clean Up section to prevent it from running
Really fast boot times Windows and Office is pretty quick, but it does depend on the data you are opening. Overall a really fun time