Making a shortcut on USB flash drive for xplorer² Portable

A collection of especially useful xplorer² topics and ideas. New users may find it helpful to look here before searching the other forums for information. >>>>>> Please post new material in the relevant forum. (New stuff posted here will be removed.) Thanks. -fg-

Moderators: fgagnon, nikos

User avatar
droidbot7000
New Member
Posts: 8
Joined: 2006 Apr 15, 15:01

Making a shortcut on USB flash drive for xplorer² Portable

Post by droidbot7000 »

This thread was originally posted  in the xplorer² Professional forum.        
Moved here 19-May-2010 =fg=
=====================================================


Is there a command syntax for xplorer² Portable that I can use in a shortcut in the root folder of my USB flash drive that will work with ALL drive designations assigned by the various computers I may use the flash drive in?
ie, Drive E:, F:, G:, etc.  This is so I don't have to make a separate shortcut for each drive the flash drive may become.
I don't have x2 installed in the root, to avoid clutter there.  It is in I:\Programs\xplorer2 Portable.
droidbot7000
"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena... -TR
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Autorun tool for removable USB flash drives

Post by Robert2 »

Hi,

I have two solutions for this:

1. Basic solution.

Create the simplest of CMD file with these contents:

cd /d %~dp0
"Programs\xplorer2 Portable\ xplorer2_UC.exe"

Name this CMD file anything that suits you ("xplorer.cmd"), give it a specific icon if you want.

Launch this CMD file to run xplorer from any drive it is plugged into.

The problem with this method is that you'll be stuck with the DOS window that launched xplorer² until you close it manually.

2. Smarter solution.

Go to http://www.lazybit.com/index.php/a/2007 ... ve_autorun, and download "Autorun tool for removable USB flash drives" (free utility).

Place the "RunMe.exe" utility in the USB stick root folder.
Place the related "Autorun.inf" file in the USB stick root folder too.
The contents of that "Autorun.inf" file should be as follows:

[autorun]
OPEN="Programs\xplorer2 Portable\ xplorer2_UC.exe" /minimize /path:image.dpd /symbol:Z /RD
ACTION=Mount Private Disk

This done, launch xplorer² by running "RunMe.exe".

Cheers,
Robert
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

that's an unexpected complication! I thought that the shorcuts would allow relative pathnames so that you wouldn't need the drive letter, but they don't

what about normal autorun.inf? If it doesn't launch automatically when you plug it in, you can double click on the .inf file
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Autorun tool for removable USB flash drives (2)

Post by Robert2 »

I use the solutions I gave because I have tweaked my registry to disallow Autorun completely.
Nothing "autoruns" on my system... :wink:

Note that double-clicking an "Autorun" file does not run it in such a case. It only opens the Autorun file in the default text editor...

But I don't know what would happen if Autorun was allowed on my system.

From the doc I have, it is unclear whether Autorun works with USB sticks.
Robert
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Like you, I have tweaked my registry so nothing autoruns. :)

Yet, because the usage under discussion is portable for working on others' systems, whether or not autorun is enabled depends on how the owner of the target system has it set.
Mr.Pleasant
Silver Member
Silver Member
Posts: 281
Joined: 2006 Dec 29, 12:56
Location: Utrecht, NL

Post by Mr.Pleasant »

droidbot7000, this tip is more or less in the same vein as the one from Robert2, but you might like it. I use 'PStart' on my portable drive. It is a kind of startup manager. You can put shortcuts to executables on the portable drive, much in the same way as in the Start menu. You can also add the '/I:x2settings.reg' parameter needed for x2-portable. The shortcuts become independent of any drive-letter the drive gets assigned, because they are relatively linked from within PStart.
Whether it could start automatically, again, is dependent on the pc's handling of autoruns.
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Autorun tool for removable USB flash drives (3)

Post by Robert2 »

Hi again,

I found a way to have the DOS window that launches xplorer self-exit.

Simply create a CMD file ("explorer.cmd") with these contents:

cd /d %~dp0
START Programs\xplorer_portable\xplorer2_UC.exe

Run "explorer.cmd" from the USB stick.

Cheers,
Robert
User avatar
droidbot7000
New Member
Posts: 8
Joined: 2006 Apr 15, 15:01

Post by droidbot7000 »

Both of these last suggestions sound do-able, I'll try them out & get back here.  I really appreciate the input.
Actually, I don't want anything to autorun except maybe a menu, since I have several programs on the stick (a 4GB).
droidbot7000
"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena... -TR
Robert2
Gold Member
Gold Member
Posts: 673
Joined: 2004 Jun 17, 15:39

Making a shortcut on USB flash drive for xplorer² Portable

Post by Robert2 »

Hi again!

Up to now, I had tried the CMD file method with a different application than xplorer² portable.

I just received my own xplorer² portable. So I tested launching it from "K:\Programs\xplorer2\xplorer2_portable.exe" (K: being my current USB drive).

Here are the contents of the CMD file ("xplorer.cmd") that launches xplorer² portable:

@echo off
cd /d %~dp0
cd Programs\xplorer2
START /B /MAX xplorer2_portable.exe

Cheers,
Robert
User avatar
droidbot7000
New Member
Posts: 8
Joined: 2006 Apr 15, 15:01

Post by droidbot7000 »

Robert-

What is the "cd /d %~dp0" for?
droidbot7000
"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena... -TR
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

That is NT4 CMD syntax to change the current drive and directory to be that where the command script file resides.
Very useful (& clever) for forcing a command program into its own directory, as explained here (among other NT CMD arcana)
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

worst case scenario: win+E, browse to usb, launch x2
not the end of the world, surely!

note that the argument '/I:x2settings.reg' isn't necessary if you keep the name "x2settings.reg" for the settings; it is used automatically
User avatar
droidbot7000
New Member
Posts: 8
Joined: 2006 Apr 15, 15:01

New Wrinkle

Post by droidbot7000 »

OK.
x2 portable runs fine from USB on my XP machine.  It runs with all my custom settings even without the "/I:x2settings.reg" parameter because I have x2settings.reg in its folder.
However, when I use the USB stick in my Vista machine, it WON'T run with my custom settings activated, even WITH the "/I:x2settings.reg" parameter. Neither will the fixed-disk version on Vista.
When used in the Vista machine, the portable x2 runs with the same settings as the x2 that's already on the Vista machine. Are registry entries overriding the settings file?

I tried to make a shortcut with the above parameter but Vista won't let me, saying that the name in the target box is invalid.
How about them apples?
Last edited by droidbot7000 on 2007 Jul 16, 06:36, edited 1 time in total.
droidbot7000
"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena... -TR
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

what happens if you double-click on the REG file? do you have registry import permissions on that vista?
User avatar
droidbot7000
New Member
Posts: 8
Joined: 2006 Apr 15, 15:01

Post by droidbot7000 »

I did that when I first put the USB stick in the Vista system, as administrator.  I got an elevation box from UAC about modifying the registry.  I clicked OK, not knowing what I was doing really.  I guess it wrote to the registry?
I did that after I ran x2 portable the first time.
I edited my post above to explain better, after you replied.
droidbot7000
"It is not the critic who counts: not the man who points out how the strong man stumbles or where the doer of deeds could have done better. The credit belongs to the man who is actually in the arena... -TR
Post Reply