Yincognito, I think that single-line command is getting a bit complex to do that way. I was struggling with how to quote/escape it to work correctly, so I just made it an external .ps1 file, and Bob's Your Uncle.
MyScriptFile.ps1:
Code:
[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1OnRefreshAction=[!CommandMeasure MeasureMaxAll "Run"][MeasureMaxAll]Measure=PluginPlugin=RunCommandProgram=Powershell.exeParameter=-NoProfile -ExecutionPolicy Bypass -Command "& '.\MyScriptFile.ps1'"OutputType=ANSIState=Hide[MeasureAllNum]Measure=CalcFormula=[MeasureMaxAll]DynamicVariables=1[MeasureBinSize]Measure=RecycleManagerRecycleType=SIZE[MeterBinText]Meter=StringMeasureName=MeasureBinSizeMeasureName2=MeasureAllNumFontColor=255,255,255,255FontSize=14SolidColor=0,0,0,1AutoScale=1AntiAlias=1Text=Bin Size Total: %2B | All Drives Trash: %1B
Code:
$items = gcim -class Win32_Volume -filter "NOT DriveLetter like ''" | select DriveLetter,DeviceID | sort DriveLetter$total = 0for ($i=0; $i -lt @($items).Count; $i++){$guid = [regex]::Matches($items[$i].'DeviceID','({.*?})').value$total = $total + (Get-ItemProperty -Path ('HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\Volume\' + $guid) -Name 'MaxCapacity').'MaxCapacity' * 1024 * 1024}$totalexit
Statistics: Posted by jsmorley — Today, 5:17 pm