XnView on removable drive - drive's contextual menu

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

Moderators: XnTriq, helmut, xnview

Post Reply
aapapapa
Posts: 2
Joined: Mon Jan 11, 2010 9:27 am

XnView on removable drive - drive's contextual menu

Post by aapapapa »

XnView placed on a USB drive or an optical media.

Drive has autorun.inf at its root.
autorun file has to generate some options in the drive's contextual menu.

These contextual menu positions lead to xnview invocation with the -ini and -slide parameters.
How should the autorun syntax look?
It has to work at least on Vista and Windows 7.

I guess, they will be the shell/<item>/command items.
But how exactly have they to be?
User avatar
ckv
Posts: 786
Joined: Wed Feb 02, 2005 2:30 pm
Location: Glow
Contact:

Re: XnView on removable drive - drive's contextual menu

Post by ckv »

aapapapa wrote:XnView placed on a USB drive or an optical media.

Drive has autorun.inf at its root.
autorun file has to generate some options in the drive's contextual menu.

These contextual menu positions lead to xnview invocation with the -ini and -slide parameters.
How should the autorun syntax look?
It has to work at least on Vista and Windows 7.

I guess, they will be the shell/<item>/command items.
But how exactly have they to be?
Usual autorun.inf context menu looks like this:

Code: Select all

shell\uniquestring=Menu text
shell\uniquestring\command=some.exe -param
With xnview -ini and -slide parameters:

Code: Select all

shell\xnview=&XnView slide
shell\xnview\command=xnview.exe -ini xnview.ini -slide someslide.sld
But here it gets interesting with Windows Vista and possibly with Windows 7, there's a bug in the context menu processing that causese all programs runned from the context menu to get a wrong working directory (C:\WINDOWS\System32). This breaks all relative paths in the command line as they are no longer looked relative to the drive path.

To fix the problem you need to use full paths in the command line or you could use a little program I wrote called Autorunner, it will correct the working directory before runing the context menu program.

When using Autorunner you simply add 'autorunner.exe' to the beginning of the command entry:

Code: Select all

shell\xnview=&XnView slide
shell\xnview\command=autorunner.exe xnview.exe -ini xnview.ini -slide someslide.sld
XnView Tweak UI - Tool to customize your XnView beyond the regular XnView options.
UI-less Settings - Documentation of all the hidden settings in XnView.
XFAM - Tool to create and customize XnView file associations.
Post Reply