You can find out the necessary ids for both of the Macrium Reflect columns with this exe:
Open a command prompt, switch into the directory you've extracted the .zip into and call the .exe with:
Code: Select all
"Enumerate all extended shell properties_x64.exe" "<full path to one of your .rimrg files>"
Look for the two Macrium columns in the output and write both ids down!
Do this step first!
Add two custom columns by:
Executing:
{ENTER}
from the address bar
and pasting the code below into it.
Do this two times (you need two custom columns...)!
Name the first e.g. "Method" and the second e.g. "Comment"
Replace the $type line for the second custom column
with "comment" instead of "method"
and for both custom columns inside the used scripts the 2 with the column id for "Backup Method" and
the 3 for the column id for "Backup Comment" from the first step.
Code: Select all
sPropName = oFolder.GetDetailsOf(Null, 2)
sPropValue = oFolder.GetDetailsOf(oFile, 2)
sPropName = oFolder.GetDetailsOf(Null, 3)
sPropValue = oFolder.GetDetailsOf(oFile, 3)
The real values could look like this (this is OS dependent)!:
Code: Select all
sPropName = oFolder.GetDetailsOf(Null, 291)
sPropValue = oFolder.GetDetailsOf(oFile, 291)
sPropName = oFolder.GetDetailsOf(Null, 292)
sPropValue = oFolder.GetDetailsOf(oFile, 292)
After you've finished these steps, go into your %TEMP% folder and delete the
"XY_CC_VBScript.vbs" file!
Use this as a custom column script:
Code: Select all
Snip: CustomColumn 1
XYplorer 19.20.0036, 29.10.2018 16:51:52
Action
ConfigureColumn
Caption
Method
Type
3
Definition
$type = "method"; // Options: "method" / "comment"
$tmpFile = "%TEMP%\XY_CC_VBScript.vbs";
$vbScript = <<<>>>
On Error Resume Next
sFullPath = WScript.Arguments(0)
sType = LCase(WScript.Arguments(1))
sFile = Mid(sFullPath, InStrRev(sFullPath, "\") + 1)
sPath = Mid(sFullPath, 1, InStrRev(sFullPath, "\") - 1)
Set objShell = CreateObject("Shell.Application")
Set oFolder = objShell.Namespace(sPath)
Set oFile = oFolder.ParseName(sFile)
If sType = "method" Then
sPropName = oFolder.GetDetailsOf(Null, 2)
sPropValue = oFolder.GetDetailsOf(oFile, 2)
If sPropName <> "" Then
If sPropValue <> "" Then
WScript.Echo sPropValue
End If
End If
ElseIf sType = "comment" Then
sPropName = oFolder.GetDetailsOf(Null, 3)
sPropValue = oFolder.GetDetailsOf(oFile, 3)
If sPropName <> "" Then
If sPropValue <> "" Then
WScript.Echo sPropValue
End If
End If
End If
>>>;
writefile($tmpFile, $vbScript, "n", "utf8");
return replace(runret("""C:\Windows\Sysnative\cscript.exe"" ""$tmpFile"" ""<cc_item>"" ""$type"" //nologo"), <crlf>);
Format
1
Trigger
1
Item Type
0
Item Filter
*.mrimg
Alternatively, you could use this compiled (x64!) version of a slightly modified .vbs script, that needs to be called with a file and a specific id:
Then the script itself can be reduced to:
Code: Select all
return replace(runret("""<some path>\Enumerate extended shell properties_x64.exe"" ""<cc_item>"" <id>"), <crlf>);
Where <id> needs to be replaced with the real id, on this vm test machine e.g.:
For "Method"
Code: Select all
return replace(runret("""<some path>\Enumerate extended shell properties_x64.exe"" ""<cc_item>"" 291"), <crlf>);
For "Comment"
Code: Select all
return replace(runret("""<some path>\Enumerate extended shell properties_x64.exe"" ""<cc_item>"" 292"), <crlf>);