[SOLVED] Install switch "/I1[custom_folder]" does not work

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
MemooriaDallo
Junior Member
Junior Member
Posts: 2
Joined: 2024-03-25, 11:23 UTC

[SOLVED] Install switch "/I1[custom_folder]" does not work

Post by *MemooriaDallo »

Hello,
I try to use the installation command line parameter "/I1" to select the custom folder where put the config files as described in the Installer command line parameters guide
My complete installation cli command is:

Code: Select all

.\tcmd1103x64.exe /A0 /H0 /L8 /M0 /I1"Z:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
the only switch does not work is /I
I try to debug keep only the /I switch in a non Automatic Installation to view the behavior of the installer by this command:

Code: Select all

.\tcmd1103x64.exe /I1"C:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
The installer keep correctly the destination folder but does not set the main configuration files keeping it to the default "Application Data (user-specific application data)"

I am sure that I have not interpreted the instructions on the installation options correctly and I would be grateful if someone could direct me to the correct path because I have not found any examples online other than the one reported on the wiki

Thank You in advance
Last edited by MemooriaDallo on 2024-04-03, 10:02 UTC, edited 1 time in total.
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Install switch "/I1[custom_folder]" does not work

Post by *white »

MemooriaDallo wrote: 2024-03-25, 11:44 UTC I try to debug keep only the /I switch in a non Automatic Installation to view the behavior of the installer by this command:

Code: Select all

.\tcmd1103x64.exe /I1"C:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
The installer keep correctly the destination folder but does not set the main configuration files keeping it to the default "Application Data (user-specific application data)"
Not confirmed if I use the command you specified. Where do you see that the default "Application Data (user-specific application data)" is used?
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Install switch "/I1[custom_folder]" does not work

Post by *beb »

I would be happy to be wrong, but I'm afraid this is by design.
See: https://www.ghisler.ch/wiki/index.php?title=Installer#Command_line_parameters#:~:text=I[0%20|%201]"folder"

Code: Select all

I[0 | 1]"folder"

The explicit options are:
a. Use the folder set in the Windows registry from a previous install.
b. Otherwise use the program folder if the user has write access in it. (which is for /I1".\", or /I0".\", or /I".\")
c. Otherwise use the user-specific AppData folder

There's no explicit indication that an arbitrary path is allowed there.

So ".\" will work as a 'program folder' and only if you have write access to it.
For the folder like "Z:\Zip\Prg\TotalCMD" it might work if it would be the installation folder (and only if you have write access to it) that way:
/I1".\" "Z:\Zip\Prg\TotalCMD"
Last edited by beb on 2024-03-25, 14:45 UTC, edited 2 times in total.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Install switch "/I1[custom_folder]" does not work

Post by *white »

beb wrote: 2024-03-25, 14:19 UTC

Code: Select all

I[0 | 1]"folder"
The explicit options are:
1. Use the folder set in the Windows registry from a previous install.
2. Otherwise use the program folder if the user has write access in it. (which is for /I1".\", or /I0".\", or /I".\")
3. Otherwise use the user-specific AppData folder
No, you are listing the default action when the switch is not used. Note that the column header is "Default" and not "Description".
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Install switch "/I1[custom_folder]" does not work

Post by *beb »

2white
My bad. I have tested it properly and now I can see it works with the arbitrary path.
So I cannot confirm the OP message as well.
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Install switch "/I1[custom_folder]" does not work

Post by *gdpr deleted 6 »

I can confirm /I1 not working (using the commandline arguments as presented in the report). It always either uses registry settings for the INI file directory, or (if the registry settings are not present) it will use %APPDATA%. It seems to completely ignore /I1. Tested under Windows 11.

beb wrote: 2024-03-25, 14:37 UTC 2white
My bad. I have tested it properly and now I can see it works with the arbitrary path.
So I cannot confirm the OP message as well.
Make sure there are no TC registry settings in HKLM, both in the HKLM\Software\Ghisler and HKLM\Software\Wow6432Node\Ghisler folder (and also not in HKCU branch for the account under which the installer runs, to be safe), and you should observe the behavior as reported by OP. However, perhaps, just perhaps, there might be an off-chance that the behavior is influenced by the OS. I have tested in Win11 and i can reproduce the observed behavior as described by OP. If you still can't reproduce with a clean registry: What Windows version did you use? Win10 as in your signature?
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Install switch "/I1[custom_folder]" does not work

Post by *white »

MemooriaDallo wrote: 2024-03-25, 11:44 UTC I try to use the installation command line parameter "/I1" to select the custom folder where put the config files as described in the Installer command line parameters guide
My complete installation cli command is:

Code: Select all

.\tcmd1103x64.exe /A0 /H0 /L8 /M0 /I1"Z:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
the only switch does not work is /I
No, other switches behind /A0 also don't work because you are not using the correct syntax.

Code: Select all

installer [/switches] [installfolder | datafile]
You can only have 1 optional parameter that contains switches and that parameter starts with "/" followed by all switches.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Install switch "/I1[custom_folder]" does not work

Post by *gdpr deleted 6 »

white wrote: 2024-03-25, 16:12 UTC You can only have 1 optional parameter that contains switches and that parameter starts with "/" followed by all switches.
Bingo!

Code: Select all

.\tcmd1103x64.exe /A0H0L8M0I1"Z:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
does work. (I guess the intention was to use A1 instead of A0, but it's not important regarding the reported issue...)
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: Install switch "/I1[custom_folder]" does not work

Post by *beb »

elgonzo wrote: 2024-03-25, 14:45 UTC What Windows version did you use? Win10 as in your signature?
Yep.
beb wrote: 2024-03-25, 14:37 UTC I have tested it properly...
When I wrote that the installer arguments were as follows (for PowerShell):
(the installer parameters breakdown has been given here: https://ghisler.ch/board/viewtopic.php?t=81086)

Code: Select all

& $installer /A1H1L1M0G0D0U0FRI0"$iniFolder" $installFolder
or

Code: Select all

& $installer /A1H1L1M0G0D0U0FRI1"$iniFolder" $installFolder
Both I0"folder" and I1"folder" worked as intended.
The difference is the former (I0) leaves no traces outside $iniFolder, and $installFolder, and in the registry.
Of course, the latter (I1) leaves behind all its scrap in the registry (HKCU:\SOFTWARE\Ghisler, HKLM:\SOFTWARE\Ghisler, HKLM:\SOFTWARE\WOW6432Node\Ghisler).
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
MemooriaDallo
Junior Member
Junior Member
Posts: 2
Joined: 2024-03-25, 11:23 UTC

[solved] Install switch "/I1[custom_folder]" does not work

Post by *MemooriaDallo »

gdpr deleted 6 wrote: 2024-03-25, 16:30 UTC Bingo!

Code: Select all

.\tcmd1103x64.exe /A0H0L8M0I1"Z:\Zip\Prg\TotalCMD" "c:\Program Files\TotalCMD"
does work. (I guess the intention was to use A1 instead of A0, but it's not important regarding the reported issue...)
Thank You, work also for me
Thanks a lot
Post Reply