File associations to sandboxed apps.

If it doesn't fit elsewhere, it goes here
Post Reply
LittleGuest

File associations to sandboxed apps.

Post by LittleGuest » Wed Jun 09, 2010 6:19 am

Hi,

I've installed a couple of applications within a sandbox and have created shortcuts to them and put them on the desktop (Configure -> Windows Shell Integration -> Add Shortcut Icons). My problem is that the sandbox is set to allow full access to certain folders to save files outside the sandbox, but I can't seem to work out how to set up the association for the files the applications save so that double clicking the files loads the appropriate sandboxed application while keeping the application sandboxed.

Any suggestions?
Thanks.

MikeR

Post by MikeR » Fri Jun 11, 2010 7:41 am

You say that you've installed a couple of apps within a sandbox. While this might be the correct thing to do, eg you wish to test the apps, could you clarify why the apps are installed within a sandbox? And just to be clear, are you aware of the difference between installing an app in a sandbox and running an app sandboxed (that might otherwise have been installed outside of the sandbox)?

I assume you already know how to set up file associations. If you have set up a file association, what's happening when you double click on the file?

MikeR

LittleGuest

Post by LittleGuest » Fri Jun 11, 2010 6:43 pm

Hi Mike,

I'm treating the Sandbox as a way of creating a portable application - perhaps not it's designed purpose but it does the job fine.

are you aware of the difference
Yep.

Well, the file association is set to load up the shortcut to the sandboxed application, but what I'm getting is a message saying

"MyFile.dat is not a valid Win32 application".

I've tried a number of different applications, but all give this error when loading through a shortcut.

Thanks.

LittleGuest

Post by LittleGuest » Fri Jun 11, 2010 7:09 pm

By the way, if I specify a shortcut to:

"C:\Program Files\Sandboxie\Start.exe" /box:DefaultBox "C:\Documents and Settings\All Users\Start Menu\Programs\MyApplication\StartApplication.lnk" "C:\Documents and Settings\User\Desktop\MyFile.dat"

It works fine, so I'm thinking it may be more of a limitation of windows not appending the file argument correctly rather than a fault with sandboxie...

MikeR

Post by MikeR » Sat Jun 12, 2010 4:19 am

Hi LittleGuest

Perhaps I have the wrong idea, but I notice that the example you give in your last post does not refer to a sandboxed application - or at least the example link you give, StartApplication.lnk, appears to be installed outside of the sandbox. Of course, it's possible that the link in your (unsandboxed) start menu points to the EXE file sitting in in the sandbox, eg C:\Sandbox\<Username>\DefaultBox\C\Program Files\MyApplication\MyApplication.EXE (or something similar), but it's worth confirming.

That said, I was able to install a random app in a sandbox and associate it with a (randomly chosen) .XYZ file suffix without any problem. To be clear, in my test the file association went directly to the sandboxed executable, in this case at F:\Sandbox\Mike\<SandboxName>\C\Program Files\MyApplication\MyApplication.EXE - and it ran just fine. Have you tried to associate the .DAT file suffix directly with the sandboxed application?

MikeR

LittleGuest

Post by LittleGuest » Sat Jun 12, 2010 9:13 am

Hi Mike,

Thanks very much for testing and going through this with me. Here's the steps I've done:

1) Install the application within a Sandbox.

2) Within Sandboxie Control:
  • Configure
  • Windows Shell Integration
  • Add Shortcut Icons
  • Create a shortcut to the newly installed sandboxed application
3) Within an unsandboxed Windows Explorer screen (My Documents or something):
  • Tools
  • Folder Options
  • File Types
  • New
  • Type in the file extension
  • OK
  • Select it in the list
  • Change
  • Select the shortcut created by Sandboxie to the installed sandboxed application
Although after that double clicking a file with that extension that resides outside of the sandbox (like my real Desktop), gives the error I posted earlier.

Thank you,
LittleGuest

tzuk
Sandboxie Founder
Sandboxie Founder
Posts: 16076
Joined: Tue Jun 22, 2004 12:57 pm

Post by tzuk » Sat Jun 12, 2010 2:38 pm

LittleGuest, I think you're right in that selecting a shortcut as the "open with" application doesn't seem to work.

It looks like you will need to set Start.exe as the "open with" application, but then you also need to specify command line arguments and it doesn't look like the File Types dialog box has that kind of flexibility.

So maybe something like this can be useful:

http://www.angelfire.com/biz/rhaminisys/fileasoc.html

But I have not used it myself so I can't actually vouch for this software.
tzuk

MikeR

Post by MikeR » Sun Jun 13, 2010 6:06 am

I have replicated the steps you show and also see the same error.

However, if you change the final step to associate the file extension directly with the sandboxed executable - and not the desktop icon you've created via the Sandboxie Control - it seems to work fine.

I also tried creating a desktop icon/shortcut that points to the sandboxed executable and associating the file extension with the new shortcut but this too fails with the same error.

The bottom line seems to be that you cannot use indirection (eg desktop icons) in this case but you can associate a file extension with the underlying sandboxed executable.

One caveat: I'm using a registered copy of Sandboxie, so I'm not sure whether an unregistered copy will, in effect, give you default Forced Program functionality if the application is installed directly within a sandbox. Normally Forced Program etc, is only available in the registered version.

MikeR

ThomasV
Posts: 19
Joined: Mon Jun 21, 2010 10:42 am

Post by ThomasV » Tue Jun 22, 2010 4:05 am

Hi,

I'm new to Windows 7 and also Sandboxie,
so here what I did yesterday for my file associations:

After 5min of work I came with this:
http://www.ntwind.com/software/utilities/hstart.html

I have created file OpednDoc.bat and inside is this:
"c:\Program Files\HStart\hstart.exe" /NOCONSOLE ""C:\Program Files\Sandboxie\Start.exe" /box:Office2003 "C:\Program Files\Microsoft Office\Office11\WINWORD.EXE" %1 %2 %3"

Now you go to Control Panel->Programs->Default Programs->Associate a file type or protocol with a program
and you look for .doc and point to this OpenDoc.bat

I remember I have written one day start.exe which doesn't open any window but just pass parameters, but I don't have time to fined it on my DVDs:(
maybe there is on internet something already, I'm sure...

This solution just shortly blinks black window but it works:)

Hmmmm but now I'm thinking, maybe this is better solution (to create .reg file):
(tonecool) http://www.sandboxie.com/phpbb/viewtopi ... c&start=15
Yes it is :)


Bye,
T.

Quinnx
Posts: 24
Joined: Mon Apr 29, 2013 10:59 pm

Post by Quinnx » Mon May 27, 2013 12:16 pm

I found that this works much better than the original command line:

"C:\Program Files\Sandboxie\Start.exe" /box:OtherApps %1 %2 %3"

if you add this to a batch file called lets say OtherApps.bat

any apps installed in this box will be associated correctly with the file type executing the .bat file without having to specify the app or .exe in the command line. :)
so the same bat file can be use for more than just one file type.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest