Real location of wincmd.ini with AppV (VFS)

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
Saaru
Junior Member
Junior Member
Posts: 5
Joined: 2019-06-21, 09:21 UTC

Real location of wincmd.ini with AppV (VFS)

Post by *Saaru »

I've encountered strange behaviour of the %APPDATA%\GHISLER folder at my workplace where Total Commander (x64) 9.20 is installed in an AppV environment. I suspect the latter plays a role, but I might be totally wrong.
Ultimately I am looking for a way to copy the wincmd.ini file periodically to another location.
I hope someone can help me out, as I'm all out of ideas to try. Please let me know if you need any more information from me.

Setup
I have Total Commander (x64) 9.20 provided by my employer. It is installed through some enterprise deployment application and stored in:

Code: Select all

C:\Users\username\AppData\Local\Microsoft\AppV\Client\Integration\some-unique-id\Root\VFS\ProgramFilesX64\totalcmd.920
According to TC (Help -> About Total Commander) my INI-files are stored in

Code: Select all

C:\Users\username\AppData\Roaming\GHISLER\wincmd.ini
C:\Users\username\AppData\Roaming\GHISLER\wcx_ftp.ini
Problem
My final goal is to automatically back-up the TC settings to a network drive using robocopy.
For those unfamiliar with robocopy, it is a windows command line utility that can copy files. It requires a source and destination folder.
I've set the source folder to be:

Code: Select all

C:\Users\username\AppData\Roaming\GHISLER
and the destination folder to a network path.

The folder is copied successfully, but when I inspect the folder contents the wincmd.ini file is completely different from the one I see when in TC I go to "Configuration -> Change Settings File Directly". The wincmd.ini file that is copied appears to be from an older TC version (v8.51).

The strange thing is that if I go to C:\Users\username\AppData\Roaming\GHISLER in TC, I see the wincmd.ini shown by TC's "Change Settings File Directly" option.
If I go to C:\Users\username\AppData\Roaming\GHISLER in Windows Explorer, I see the wincmd.ini that was copied by robocopy.

It appears that there are two version of the C:\Users\username\AppData\Roaming\GHISLER folder for some reason: one accessible through TC and one accessible through other applications.

What I've tried
Click "Show" to see the troubleshooting steps I've tried
Show
Attempt 0
First I have deleted the GHISLER folder from C:\Users\username\AppData\Roaming through Windows Explorer. All other attempts are done after that.

Attempt 1
If I open Total Commander and go to C:\Users\username\AppData\Roaming\GHISLER, the folder still opens. It contains the correct wincmd.ini file.
If I try to go to that path in Windows Explorer, cmd.exe, Powershell or Git Bash I'm told that the path does not exist.

Attempt 2a
If I go to the C:\Users\username\AppData\Roaming\GHISLER folder in TC and in the command line panel in the lower part type:

Code: Select all

cmd.exe .
a command window opens in the folder. If then in the command window I type

Code: Select all

type wincmd.ini
I see the correct wincmd.ini file

If I open cmd.exe through the Run command and then type

Code: Select all

cd C:\Users\username\AppData\Roaming\GHISLER
I am told that "The system cannot find the path specified.".

Attempt 2b
If I go to the C:\Users\username\AppData\Roaming\GHISLER folder in TC and in the command line panel in the lower part type:

Code: Select all

"c:\Program Files\Git\bin\bash.exe" --login
a Git bash window opens in the folder. If then in the bash window I type

Code: Select all

cat wincmd.ini
I see the correct wincmd.ini file

If I open Git bash from the Windows start menu and then type

Code: Select all

 cd /c/Users/username/AppData/Roaming/GHISLER
I am told "No such file or directory".

Attempt 3
I found that there is an AppData folder in the AppV workspace. I thought perhaps it's somehow linked into my regular %APPDATA% folder.
The path is:

Code: Select all

C:\Users\username\AppData\Local\Microsoft\AppV\Client\Integration\some-unique-id\Root\VFS\AppData\GHISLER\
If I open that path in TC I see the correct wincmd.ini file.
If I open it in in Windows Explorer, cmd.exe, Powershell or Git Bash I see some outdated wincmd.ini file with a modified date of a few months back.
Question
How can I find, show and copy the real wincmd.ini file used by TC, with a program that is not TC (e.g. cmd.exe, Powershell or Git bash)?
User avatar
Stefan2
Power Member
Power Member
Posts: 3018
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Stefan2 »

Hi and welcome Saaru!

- Check in "Help - About TC" where the INI is currently located.
- [Close TC and] move the INI to the TC-folder
- Modify the wincmd.ini and add under [Configuration] the line>>> UseIniInProgramDir=7
- - - - See TC Help > Settings in the file wincmd.ini (Part 1)
- From now on the INI found in the TC-folder is used.


Advice taken from
FAQs: Total Commander is fully portable
viewtopic.php?p=292844#p292844



Please note that App-V is a virtual installation only, with own transparent folder/file/registry redirection, so WinExplorer e.g. have to say "No such file or directory".
You may want to copy that whole TC-folder to e.g. C:\Tools\TotalCmd and not use that App-V thingy at all. But that may be against your company rules.


 
HTH?
Saaru
Junior Member
Junior Member
Posts: 5
Joined: 2019-06-21, 09:21 UTC

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Saaru »

Hi Stefan,

Thank you for your quick reply. I tried to follow your steps, but I get stuck in step 2 though.

- Step 1 yields: C:\Users\username\AppData\Roaming\GHISLER\wincmd.ini
- Then I close TC and try to go to that location in Windows Explorer, cmd.exe, Powershell or Git bash to copy it to the TC-Folder. However, all applications tell me that C:\Users\username\AppData\Roaming\GHISLER\wincmd.ini does not exist.
User avatar
Stefan2
Power Member
Power Member
Posts: 3018
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Stefan2 »

Then utilize "Configuration -> Change Settings File Directly" while that virtual TC is running

Add: UseIniInProgramDir=7
to the [Configuration] section
and save that file to the TC-folder with the TOTALCMD.EXE as wincmd.ini.
If you start TC next time, the INI in that TC-folder will be used.

Or create a brand new INI (read the above FAQ) if you don't have configured the old one much.


Read the above FAQs to work even more "portable".

 
Saaru
Junior Member
Junior Member
Posts: 5
Joined: 2019-06-21, 09:21 UTC

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Saaru »

Thanks again for the fast reply.

I've followed these steps and got an interesting result:
Steps
- "Change Settings File Directly"
- Add line UseIniInProgramDir=7 to the [Configuration] section
- Save the wincmd.ini file in the same folder as the TOTALCMD64.EXE file
- Restart TC

Result
TC picks up the settings without a problem.
If I look in TC -> Help -> About Total Commander I see that my ini file is in

Code: Select all

c:\ProgramData\App-V\some-unique-id\some-other-unique-id\Root\VFS\ProgramFilesX64\totalcmd.920\
If I visit that location in TC I see wincmd.ini there.
If I visit that location in Windows Explorer, cmd.exe, Powershell or Git bash I see no .ini files at all. These all only find a WINCMD.KEY file, which is not similar to the INI file at all.
So the problem still exists, I cannot copy the wincmd.ini file programmatically as I don't have a valid path to point it to.
User avatar
Stefan2
Power Member
Power Member
Posts: 3018
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Stefan2 »

Saaru wrote:
2019-06-21, 12:32 UTC
..
So the problem still exists, I cannot copy the wincmd.ini file programmatically as I don't have a valid path to point it to.
You mean you can't do it inside of that App-V environment :P
You may need to learn how that App-V works if you want do something inside of that system, but I fear that settings there are closed down.
App-V allows applications to be deployed ("streamed") in real-time to any client from a virtual application server.
It removes the need for traditional local installation of the applications.
The App-V stack sandboxes the execution environment so that an application does not make
changes directly to the underlying operating system's file system and/or Windows Registry,
but rather is contained in an application-specific "bubble".
https://en.wikipedia.org/wiki/Microsoft_App-V



As it seems, the above by me mentioned settings work only outside of that App-V virtualization.




 
Saaru
Junior Member
Junior Member
Posts: 5
Joined: 2019-06-21, 09:21 UTC

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Saaru »

You mean you can't do it inside of that App-V environment :P
This pointed me in the right direction, thanks!

As I understand now, TC runs in an App-V bubble. (System?) files I create are visible to TC in the bubble, but not to processes outside of the bubble.
However, if I start e.g. cmd.exe inside the same bubble as TC lives, I can see those files as well!

I found from Task Manager that the PID of TC is 11152, so then I started cmd from Run with:

Code: Select all

cmd.exe /appvpid:11152
Then I went to the folder:

Code: Select all

cd c:\ProgramData\App-V\some-unique-id\some-other-unique-id\Root\VFS\ProgramFilesX64\totalcmd.920\
and there was the wincmd.ini!

Now my plan is to create a wincmd.ini outside of the App-V bubble in the %APPDATA% directory, revert the UseIniInProgramDir=7 and see if TC can pick the wincmd.ini file that lives outside of the bubble.
Saaru
Junior Member
Junior Member
Posts: 5
Joined: 2019-06-21, 09:21 UTC

Re: Real location of wincmd.ini with AppV (VFS)

Post by *Saaru »

Saaru wrote:
2019-06-21, 13:29 UTC
Now my plan is to create a wincmd.ini outside of the App-V bubble in the %APPDATA% directory, revert the UseIniInProgramDir=7 and see if TC can pick the wincmd.ini file that lives outside of the bubble.
After a brief struggle I found out that this was not going to work.
I created a backup of WINCMD.KEY (i.e. the license), uninstalled the App-V TC version, installed a regular TC version and re-applied the license.

All is solved. I can now copy the settings file from the %APPDATA% folder programmatically from any process without hassle.

Thanks Stefan for taking the time and thinking along with me!
Post Reply