You are here

Open Files with a portable application

10 posts / 0 new
Last post
tomste
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-31 11:05
Open Files with a portable application

Hello,

I want to open Files like Doc or avi directly with portable open office or portablevlc, without searching the application or integrating launchy. Is this possible?

Thanks,
Thomas

stormal
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-16 13:55
Shell integration

Shell integration and file associations require registry edits and/or entries

For a portable app, these changes should should be performed temporarily and the original settings restored after use.

I don't know how reliable the following utility is, but I saw it touted here in this very forum. It still posesses some limitations as I do recall reading on the website:

Discription

Registry Rapper is a template for allowing the use of programs that save their
settings to the reigstry as portable applications. First it will check the
registry for settings of the program and then save them if present. Then it will
write the settings for the program to the registry, run the program and then
rewrite the registry settings to a file for later use. It will then delete the
settings from the registry; removing any trace of the program. Finally
rewritting the original current local settings back to the registry.

This program is a registry encapsulation program, which takes care of all the
registry settings a program might need to run and make sure nothing is left
behind on the host system. Allowing programs that were not created is portable
(i.e saving their settings to .ini files within the program folder) to be used
as portable.

http://www.portasoft.org/e107/page.php?4

U3's U3Action.exe is also touted to have such a capability, but only for the U3 environment.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
A Bit Dangerous

The only issue is that it's a bit dangerous. If the PC were to crash while you were using your portable apps, it would be left in a state with file associations pointing to apps that don't exist when it reboots.

I do registry changes for certain apps that require them (Thunderbird Portable and Audacity Portable, for example) like backing up the current settings, using the portable ones while the app is running and restoring the original ones when it exits. This is a bit dangerous, as it could affect the local app, but it generally only affects certain settings and not things like file associations. Plus, since the launcher is a seperate process, even if the portable app crashes, the registry restore is still done.

I can't comment on U3Action as I haven't used it yet, though I'm going to be looking into it soon. Hopefully it restores when you exit the app and not as part of the HostCleanup process within U3 since it isn't guaranteed to run (for example, if you shutdown the PC without ejecting HostCleanup doesn't happen... and, for someone that should really know better, I do this a *lot*). I'm actually planning on moving some of the registry stuff done in Thunderbird for U3 out of HostCleanup and into the launcher that wraps thunderbird.exe so it will restore on exit of Thunderbird, just like Thunderbird Portable does.

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

stormal
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-16 13:55
I agree

I too prefer to avoid such a dangerous approach,

particularly when altering existing settings without a complete registry backup to recover from if needed.

One can end up with a catastrophe on their hands.

tomste
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-31 11:05
Thanks

Ok, Thanks.

I want to use it for a CD-Rom production. For that I want to start all application from the cdrom and also start the Documents with an application from the CD.

Has someone done such a project like this?

Thomas

stormal
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-16 13:55
Use the

Create objects that invoke the command-line:

"{relative-path\}{application.exe}" "{relative-path\}{Filename}"

Or, for existing associated filetypes try:

Autorun a data file: shellout.exe - a 20 KB file which operates as MS's SHELEXEC.EXE (found on the NT4 service pack CDs) does. SHELLOUT INDEX.HTM opens INDEX.HTM in the default browser; in fact sticking anything after SHELLOUT causes it to be opened in the default associated program. SHELLOUT is freeware for personal use and nag-free.
CLARIFICATION: The program is available freely for use on any disc where its distribution is not the purpose of the disc. That is, you could not sell a disc of utilities which included it, but you can use it as a tool to autorun any disc you may produce.

http://www.mrichter.com/cdr/files/files.htm

There are also retail IDE's that make creating such projects a simple affair.

Indigo Rose's AutoPlay Media Studio is a very well known one.

But AutoHotkey is a free, open-source utility for Windows. (GPL)

http://www.autohotkey.com/

It has a much higher learning curve, but it can also get the job accomplished.

Also take a look at the user forum here:
http://www.autohotkey.com/forum/?sid=2f271d33db086ab1f19bb2b1281628cc

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 18 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Some options...

There are a few ways to accomplish this. As stromal mentioned, Autohotkey is a good option (though there is a bit of a learning curve). Batch files are quick a dirty and work fine, too. VBS scripts are an option, but more complicated and some systems may block them from running. NSIS works as well and is pretty easy and clean. You can also do it right within a launch menu like PStart or ASuite using the same format of path and parameters. You can even do it within the autorun.inf either the autorun property or one of the shell properties when you right-click on a drive.

That's a lot of options Smile

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

stormal
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-16 13:55
I found this one at SourceForge

GPL licensed of course:

"CDInterface is a tool to create autorun cd menu for your software collection. Will organize your softwares and have all the informations you want - title, description, serial number, updates, etc... An easy to use interface. No programming language is required."

http://cdinterface.sourceforge.net/

I hope you enjoy it. ; )

tomste
Offline
Last seen: 17 years 7 months ago
Joined: 2006-08-31 11:05
Ok, thanks for your answer.

Ok, thanks for your answer. I did not need a CD Interface. I have a website which I have to put on a CD and on this website there are files like .doc, .mpg, .wmv and I want to open these files with a specified application from this disk.

Maybe this helps.

Thanks.

Lurking_Biohazard
Lurking_Biohazard's picture
Offline
Last seen: 5 years 7 months ago
Joined: 2006-02-18 18:06
Looks like it could do it.

Unless I'm reading it wrong.

"Start parameters" added for for the action "File".Now you can pass parameters for each program you execute.

Sounds like you can tell it how to open files. I'll look into it more later when I get a chance...

~Lurk~

~Lurk~

Topic locked