Running ChromeCacheView.exe In Command-Line Mode via Wine

Questions about Wine on Linux
Locked
Ant302cc
Newbie
Newbie
Posts: 3
Joined: Wed Nov 29, 2023 6:18 am

Running ChromeCacheView.exe In Command-Line Mode via Wine

Post by Ant302cc »

I use the ChromeCacheView.exe on Windows to extract the contents of my Chrome browser cache. The executable can be used in its GUI form by just running the executable, or as a command-line tool with the relevant parameters that specify what files types to extract and which folder to extract them to etc.

I am able to run the GUI of ChromeCacheView.exe via wine on Raspberry Pi Bookwork OS (v12). I use the below command for this, where F:\ maps to the OS root folder:

Code: Select all

wine 'F:\home\pi\Documents\ChromeCacheView.exe'
I can also expand the above to preconfigure the location of the Chrome Browser Cache data the GUI tool uses by using the below, which also works without issue:

Code: Select all

wine 'F:\home\pi\Documents\ChromeCacheView.exe' -folder 'F:\home\pi\.cache\chromium\Default\Cache'
The last command above results in the GUI showing a list of cached files present in the browser cache and I can select individual ones and copy them to a folder of my choice.

The issue comes when including the "/copycache" and "/CopyFilesFolder" parameters of chromecacheview.exe. In this scenario, the tool is meant to operate purely as a command-line tool (doesn't launch the GUI), and automatically extract out the specified content to the folder provided. This is how I intent to use the tool with wine.

Running the below command on Windows works, extracting any json files present in the Chrome cache associated with the specified URL, and placing a copy in the folder specified by the /CopyFilesFolder parameter:

Code: Select all

ChromeCacheView.exe /folder "C:\Users\ant\AppData\Local\Google\Chrome\User Data\Default\Cache" /copycache  http://headers.jsontest.com "json" /CopyFilesFolder C:\Users\ant\dump
The equivalent of this on my Raspberry Pi OS using wine would be the below, however I am not getting any files extracted with this:

Code: Select all

wine 'F:\home\pi\Documents\ChromeCacheView.exe' /folder 'F:\home\pi\.cache\chromium\Default\Cache' /copycache http://headers.jsontest.com "json" /CopyFilesFolder 'F:\home\pi\dump'
I have also tried removing the single quotes, and instead escaping each backslash in the windows paths - i.e.:

Code: Select all

wine F:\\home\\pi\\Documents\\ChromeCacheView.exe /folder F:\\home\\pi\\.cache\\chromium\\Default\\Cache' /copycache http://headers.jsontest.com "json" /CopyFilesFolder F:\\home\\pi\\dump
This also doesn't result in any files being extracted.

I know there are files in the cache to extract because launching the GUI tool with the below command shows me the list of cached files I expect to see.

Code: Select all

wine 'F:\home\pi\Documents\ChromeCacheView.exe' /folder 'F:\home\pi\.cache\chromium\Default\Cache'

I think the /copycache parameter might be part of the issue. As the documentation for ChromeCacheView.exe points out (scroll towards bottom of https://www.nirsoft.net/utils/chrome_cache_view.htm ), the /copycache parameter expects two values:

Code: Select all

/copycache <URL> <Content Type>
Direct from the site:
"Copy files from the cache into the folder specified in /CopyFilesFolder parameter. In the <URL> parameter, you can specify the URL of the Web site (for example: http://www.nirsoft.net) or empty string ("") if you want to copy files from all Web sites. In the <Content Type> parameter, you can specify full content type (like image/png), partial content type (like 'image') or empty string ("") if you want to copy all types of files."

I'm not sure if wine can handle accepting two values for a parameter, or if there is a special way to construct the command so that it can parse it correctly - if that's what the issue is of course. Hoping someone might have come across a similar issue before and might be able to point me in the right direction.
Thanks in advance.
Locked