How to switch to using a portable version?

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

How to switch to using a portable version?

Post by The Electro Machine »

I downloaded the latest version [1.4.3] and left the installed one [1.0.1] alone


I wanted to change my folder holding settings which is

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\

Or to be precise: from using option

Tools > Settings > Integration > Paths > XnView settings > Use .ini file in folder > User (System)

to >>Custom<< and then picking manually

C:\Portables\XnViewMP\config\

But as there is no >>Custom<< for the INI file in the end I have returned to what it was set to [i.e. >>User (System)<<]. And deleted the

C:\Portables\XnViewMP\xnview.ini

file which was created when I was testing available options. This apparently resulted with XnView 1.4.3 Portable, after its reopening, to picking up default settings


So how is this suppose to work? If I run the EXE of the portable and leave / choose in its settings >>User (System)<<], then the >>xnview.ini<< file is created in

C:\Portables\XnViewMP\

But if I delete this INI then how is

C:\Portables\XnViewMP\xnviewmp.exe

suppose to know to use

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\xnview.ini

?

I mean: where is this one pivotal information stored at? In other words: how to migrate from using installed version to portable one, import all of the old settings, use from now on a chosen location for storing settings, retain refraining from using Registry; and re-register all of associated files to the portable EXE?

There is this >>Associate files with XnViewMP.exe<< file but it has just a few file formats on its list
But as there is no >>Custom<< for the INI file in the end I have returned to what it was set to [i.e. >>User (System)<<]. And deleted the

C:\Portables\XnViewMP\xnview.ini

file which was created when I was testing available options. This apparently resulted with XnView 1.4.3 Portable, after its reopening, to picking up default settings


So how is this suppose to work? If I run the EXE of the portable and leave / choose in its settings >>User (System)<<], then the >>xnview.ini<< file is created in

C:\Portables\XnViewMP\

But if I delete this INI then how is

C:\Portables\XnViewMP\xnviewmp.exe

suppose to know to use

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\xnview.ini

?

I mean: where is this one pivotal information stored at? In other words: how to migrate from using installed version to portable one, import all of the old settings, use from now on a chosen location for storing settings, retain refraining from using Registry; and re-register all of associated files to the portable EXE?

There is this >>Associate files with XnViewMP.exe<< file but it has just a few file formats on its list
Last edited by The Electro Machine on Fri Mar 31, 2023 10:12 am, edited 1 time in total.
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to switch to using a portable version?

Post by xnview »

XnView check first if xnview.ini exists in folder's program, and if it doesn't exist check in user's folder
Pierre.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

Right now it does not because I deleted it as for now I am keeping the

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\

folder, that I can have all config files in one place in a form easy for copying them

In the future I wan to keep them in

C:\Portables\XnViewMP\WHATEVER CUSTOM NAME\

as I cannot be expected to hand pick all those BAR, DB and INI files and no make a mistake of omission at some point


Thus:
The Electro Machine wrote: Thu Mar 30, 2023 10:20 am [...]
So how is this suppose to work? If I run the EXE of the portable and leave / choose in its settings >>User (System)<<], then the >>xnview.ini<< file is created in

C:\Portables\XnViewMP\

But if I delete this INI then how is

C:\Portables\XnViewMP\xnviewmp.exe

suppose to know to use

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\xnview.ini

?

I mean: where is this one pivotal information stored at? In other words: how to migrate from using installed version to portable one, import all of the old settings, use from now on a chosen location for storing settings, retain refraining from using Registry
[...]
?


And also how to
The Electro Machine wrote: Thu Mar 30, 2023 10:20 am re-register all of associated files to the portable EXE?

There is this >>Associate files with XnViewMP.exe<< file but it has just a few file formats on its list
User avatar
user0
XnThusiast
Posts: 1446
Joined: Sat May 09, 2015 9:37 am

Re: How to switch to using a portable version?

Post by user0 »

The Electro Machine wrote: Fri Mar 31, 2023 10:11 am In the future I wan to keep them in
C:\Portables\XnViewMP\WHATEVER CUSTOM NAME\
as I cannot be expected to hand pick all those BAR, DB and INI files and no make a mistake of omission at some point
+1
i like user_profile folders
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to switch to using a portable version?

Post by xnview »

"User (System)" is always c:\UserData\...\Roaming\XnViewMP

"Associate files with XnViewMP.exe" is for Windows 7 system, so no need to use it... Associations is made with Windows settings

The only way to use your custom folder for xnview.ini is to use argument

Code: Select all

-ini C:\Portables\XnViewMP\WHATEVER CUSTOM NAME\xnview.ini
Pierre.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

xnview wrote: Fri Mar 31, 2023 12:56 pm [...]
"Associate files with XnViewMP.exe" is for Windows 7 system, so no need to use it... Associations is made with Windows settings
So users of portable versions are suppose to manually associate 209 file formats with XnViewMP? And not make a single mistake about it? And after taking it on a pendrive to another machine repeat the whole process?

xnview wrote: Fri Mar 31, 2023 12:56 pm [...]
The only way to use your custom folder for xnview.ini is to use argument

Code: Select all

-ini C:\Portables\XnViewMP\WHATEVER CUSTOM NAME\xnview.ini
You mean to e.g. create an LNK file with Target

C:\Portables\XnViewMP\xnviewmp.exe -ini C:\Portables\XnViewMP\settings\xnview.ini

?

If yes- then it did not work for me; i.e. I experience default settings and these files are created

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\Thumb.db
C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\XnView.db
C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\xnview.ini



And had it worked, would it also use

C:\Portables\XnViewMP\settings\

folder also for reading / storing of those DB files?
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to switch to using a portable version?

Post by xnview »

The Electro Machine wrote: Sun Apr 02, 2023 2:42 pm
xnview wrote: Fri Mar 31, 2023 12:56 pm [...]
"Associate files with XnViewMP.exe" is for Windows 7 system, so no need to use it... Associations is made with Windows settings
So users of portable versions are suppose to manually associate 209 file formats with XnViewMP? And not make a single mistake about it? And after taking it on a pendrive to another machine repeat the whole process?
209?? "Associate files with XnViewMP.exe" doesn't works on newer Windows system, you need to use Windows Settings>Applications
C:\Portables\XnViewMP\xnviewmp.exe -ini C:\Portables\XnViewMP\settings\xnview.ini

?

If yes- then it did not work for me; i.e. I experience default settings and these files are created
Yes, do you have created an empty xnview.ini?
C:\Portables\XnViewMP\settings\

folder also for reading / storing of those DB files?
the folder for other files is in xnview.ini
Pierre.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

xnview wrote: Fri Mar 31, 2023 12:56 pm [...]
users of portable versions are suppose to manually associate 209 file formats with XnViewMP? And not make a single mistake about it? And after taking it on a pendrive to another machine repeat the whole process?
[...]
xnview wrote: Mon Apr 03, 2023 11:52 am 209?? "Associate files with XnViewMP.exe" doesn't works on newer Windows system, you need to use Windows Settings>Applications
[...]
Well, 552? I have no idea now just where I saw that 209 number, because under the

Help > About > Formats

it now clearly says
Formats in reading: 552


xnview wrote: Mon Apr 03, 2023 11:52 am [...]
do you have created an empty xnview.ini?
After my second attempt at creating LNK with its Target set to

C:\Portables\XnViewMP\xnviewmp.exe -ini C:\Portables\XnViewMP\settings\xnview.ini

and executing it, this time only this file was created

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\XnView.db


xnview wrote: Mon Apr 03, 2023 11:52 am [...]
folder for other files is in xnview.ini
So the file xnview.ini [by default located at >>C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\settings\<<] stores info that correct path is e.g.

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\XnView.db

?

If yes then is find not even one occurrence of

Code: Select all

\XnViewMP
in xnview.ini file which stores my old settings
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to switch to using a portable version?

Post by xnview »

The Electro Machine wrote: Mon Apr 03, 2023 2:53 pm So the file xnview.ini [by default located at >>C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\settings\<<] stores info that correct path is e.g.

C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP\XnView.db
By default if xnview.ini doesnt have paths, it uses 'C:\Users\YOUR-USER-NAME\AppData\Roaming\XnViewMP'
You need to change

Code: Select all

dbFlag=
dbFolder=
otherFlag=
otherFolder=
Pierre.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

But when changing them I need to use

C:/Portables/XnViewMP/settings/

instead of

C:\Portables\XnViewMP\settings

like the

History=C:/Users/YOUR-USER-NAME/Documents/

line in xnview.ini suggests me, right? Well I got some of my old settings but apparently some not, like the dark mode


All in all this whole shebang is getting plain ridiculous


Just how many adjustments does a user have to do in order to start using XnView as a portable on a new system? And what about file associations? Why is no there no way of adding them through Settings or at least reworking some REG hack in which user adjust path to EXE?
User avatar
xnview
Author of XnView
Posts: 43357
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: How to switch to using a portable version?

Post by xnview »

you can use XnView to create your default xnview.ini and put it after where you want
Pierre.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

I still do no know if I can / should associate to portable version of XnView all 509 file formats
User avatar
user0
XnThusiast
Posts: 1446
Joined: Sat May 09, 2015 9:37 am

Re: How to switch to using a portable version?

Post by user0 »

The Electro Machine wrote: Thu Apr 06, 2023 5:07 pm I still do no know if I can / should associate to portable version of XnView all 509 file formats
you do not need to assosiate with all 509 files

assosiate only with few formats you use via
  • normal way
    • right click on file in windows file explorer > Open with >
      - select Xnview (guess it requires to run xnview with admin rights first to let windows show it here)
      OR
      - select 'Choose another app' and locate xnviewmp.exe manually
    • go to windows settings > 'Default apps' and assosiate from there
  • if there are any problems
    • massage registry 1, 2, 3

ps. I would also suggest not to store your valuable data on disk C (eg split disk to few logical: system and data), but thats offtop.
ReefHound
Posts: 25
Joined: Sat Oct 22, 2022 8:37 pm

Re: How to switch to using a portable version?

Post by ReefHound »

The Electro Machine wrote: Sun Apr 02, 2023 2:42 pm
So users of portable versions are suppose to manually associate 209 file formats with XnViewMP? And not make a single mistake about it? And after taking it on a pendrive to another machine repeat the whole process?
Seems to me users of portable versions are not supposed to associate file formats at all. The essence of "portable" is that it makes no changes to the installed OS and it's settings. File associations are part of the OS settings. Neither should it be installed on the computer's hard drive.
The Electro Machine
Posts: 37
Joined: Tue Feb 16, 2021 8:59 am

Re: How to switch to using a portable version?

Post by The Electro Machine »

ReefHound wrote: Tue Apr 18, 2023 1:56 pm [...]
users of portable versions are not supposed to associate file formats at all. The essence of "portable" is that it makes no changes to the installed OS and it's settings. File associations are part of the OS settings
[...]
This seem to be logical assumption; the philosophy beyond their concept


But my modus operandi is this:

1] use as many programs in portable versions as possible

2] keep them in one folder

3] regularly update and backup this folder

[and then]

4] restore operating system from image

5] replace old version of folder holding portables with the newest backup of it

6] run any needed complementary REG files

7] create new image of system


This:

I] saves me time while also keeping my OS safe; by not making permanent changes before trying out new programs and / or settings

II] makes it much quicker and easier to set-up a new system from scratch; like when after buying new motherboard

III] provides ability to quickly adjust some other Windows / machine to make-over it closer to my needs; like when trying a friend to repair broken system

And thus to make this MO really work while also utilizing the 500 file-formats capability of XnView- a big REG file would be needed, which with just two clicks would associate different formats with portable version of XnView


So: my starting point would be this
user0 wrote: Thu Apr 06, 2023 6:01 pm [...]
  • if there are any problems
    • massage registry 1, 2, 3
[...]
?

Because no one who uses a portable version has such REG file - and had associated file formats manually on a one-by-one basis
Last edited by The Electro Machine on Sat Apr 29, 2023 1:21 pm, edited 1 time in total.
Post Reply