You are here

prevent non-portable versions from being executed

11 posts / 0 new
Last post
Bob Bagwill
Offline
Last seen: 11 years 12 months ago
Joined: 2009-11-30 10:58
prevent non-portable versions from being executed

I accidently ran firefox in the app/ directory and started accumulating bookmarks, passwords etc. in the wrong place because it came up first in Search.

I was wondering if the non-portable executables could be marked hidden, or renamed without the .exe extension or something, so that they could only be invoked by the portable launcher.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 5 months ago
Joined: 2007-04-15 21:08
No

Removing the extension would prevent them from being executed, and hiding the App folder would cause trouble for some apps which contain stuff the user may wish to access. Besides which, the distinction is very clear; before you can run the non-portable version you've got to look in App\AppName - and it's then likely to be appname.exe, rather than AppNamePortable.exe. Very difficult to do by mistake, I should rather think.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Bob Bagwill
Offline
Last seen: 11 years 12 months ago
Joined: 2009-11-30 10:58
Yes?

Your answer was soft, but somewhat non-responsive. Wink

Obviously, I did do it by mistake, and it wasn't very difficult.
If one doesn't always launch the application from the PortableApps
launcher, it makes it more likely that the wrong one will be launched.

Setting the "Hidden" property on the .exe itself does have the desired effect
of allowing the PortableApps launcher to run it, but hides it from Search.
That would be easy to do with the installer, I think.

Another option would be to change or remove the .exe extension, then use something like this http://stackoverflow.com/questions/3434799/run-external-application-with... to run it.

Bob Bagwill

John T. Haller
John T. Haller's picture
Offline
Last seen: 16 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Why?

I think Chris' response was more along the lines of how could you accidentally browse into FirefoxPortable\App\Firefox and manually run firefox.exe when FirefoxPortable.exe is right in the FirefoxPortable directory? It's not something you can do accidentally unless you're purposely looking to run it.

Sometimes, the impossible can become possible, if you're awesome!

Bob Bagwill
Offline
Last seen: 11 years 12 months ago
Joined: 2009-11-30 10:58
Sorry

As I wrote, I didn't browse to it, Windows Search (and Launchy) found (or just displayed) firefox.exe before FirefoxPortable.exe. I just saw the Firefox icon and launched it, without noticing or remembering that I should only run the FirefoxPortable.exe.

I think preventing the user from launching the non-portable versions would be advantageous. I verified that the PortableApps launcher will execute the firefox.exe even if the firefox.exe file is hidden, so that would be an easy fix.

Thank you for your responses.

Bob Bagwill

John T. Haller
John T. Haller's picture
Offline
Last seen: 16 hours 33 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
complicated

The problem is that that will be complicated as many apps have dozens of exes within them. And troublesome antivirus packages will sometimes delete exes and that would make troubleshooting difficult. If using launchy, you're going to get a bunch of extra exes and have to manually filter them.

Sometimes, the impossible can become possible, if you're awesome!

Jason404
Jason404's picture
Offline
Last seen: 3 months 1 week ago
Joined: 2009-03-08 04:13
attrib +i firefox.exe

You can stop files and folders from being indexed by Windows Search by applying the i attribute. You would have to reset indexing afterwards, if they have already been indexed.

Try:

cd /d C:\foo\PortableApps\

for /f "usebackq tokens=*" %%G in (`dir /b /s *.exe | findstr /i portable`) do attrib +i "%%~G"

..or something.

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
It's a lot of unnecessary work; perhaps we need an info page?

These apps are not intended to be 100% proof against uniquely creative misuse. You found a new way of incorrectly launching the app, by circumventing both the Platform and Windows Explorer.
It's a lot of extra work to change everything because of one weird outlier mistake that you won't make again.

I think the appropriate thing might just be that we should have a page of general recommendations for people that don't use the platform, that includes some common concepts like:

  • Start apps from the launchers only, or it can break portability
  • Without the platform, installers default to x:\PortableApps
  • Certain apps do not work well from long paths or paths with spaces
  • etc.

There's definitely a push on this site to get everyone to use the Platform, but so far it's not required to run portableapps. Providing this type of info for non-platform-users could both prevent mishaps and cut down on these types of posts.

I made this half-pony, half-monkey monster to please you.

Bob Bagwill
Offline
Last seen: 11 years 12 months ago
Joined: 2009-11-30 10:58
documentation is next to useless for end-users

I didn't circumvent Explorer, I just didn't use the PortableApps Platform Launcher, which is perfectly fine.

With luck, thousands of people will be buying USB flash drives with PortableApps preloaded. They will probably NOT carefully read and understand any documentation. When they insert the drive in their computer, Windows Search will index it. If they type "foo" at Start/Search programs and files, foo.exe will appear, and FooPortable may not. If there's an easy way to ensure that they launch FooPortable/FooPortable.exe instead of FooPortable/apps/foo.exe, that would be a good thing.

I haven't tested it, but I suspect that telling the NSIS installer generator to flag all app/*.exe as hidden will fix that problem.

Bob Bagwill

solanus
solanus's picture
Offline
Last seen: 10 years 1 month ago
Joined: 2006-01-21 19:12
I guess we'll see

Your experience appears to be unusual, and I don't know many people that use the search function as the primary way to start executables. I've tried it, especially after I upgraded to W7, but it's pretty unreliable, in that half the time it doesn't return the results I expect. Also, depending on the computer that you plug into, they may have the indexing turned off for removable drives.
While you aren't required to use the PortableApps Platform to launch your apps, it's generally a good idea to have SOME form of portable system of organizing and starting your apps. There are so many that you should be able to find one that works well for you. Some suggestions: RocketDock, Cylog Toolbox, Launchy, ASuite, Portable Apps Launcher, 8Start, Remora USB Quick Launch, PStart...

P.S. While you are concerned about thousands of people buying pre-loaded USB drives and making mistakes because they don't RTFM, well, if they buy them from this site, they will also have the Platform by default. And if they aren't sophisticated enough to read, they will use the easiest way to start the apps, namely the Platform.

I made this half-pony, half-monkey monster to please you.

NathanJ79
NathanJ79's picture
Offline
Last seen: 4 years 9 months ago
Joined: 2007-07-31 15:07
Launchy issue

As others have said, I would call this a Launchy issue.

PortableApps Format™ apps are designed to be organized with the handy PortableApps Platform™, which organizes them correctly.

As others have said, the issue you ran into is not unique to PortableApps' apps and could happen with any apps, if your app launcher will let you launch any old .exe it finds.

Perhaps the author of Launchy could be convinced to add an option to his program that detects *Portable.exe in a directory, and then ignores anything in subdirectories below. That would work and shouldn't be hard to implement, I wouldn't think. It might not be a default setting, but something you could set in options/preferences.

Log in or register to post comments