Sandboxie Shortcut Creator

Utilities designed for use with Sandboxie
wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Sandboxie Shortcut Creator

Post by wraithdu » Tue Aug 28, 2007 1:39 am

Somewhere someone requested a shortcut maker to link a file to be opened with Start.exe. Well, here it is (I was bored tonight).

EXE will first look for sbie.ini containing the path to Start.exe, if it doesn't find it, it wil prompt you to locate it (and will check to be sure), then write the INI file containing the path in the same directory as the EXE.

Then it checks if you passed it a file via drag-and-drop or the Send To... menu. So yes, you can do both of those things :) If not, it will prompt you to choose your target file. If the target file is an EXE file, it will use the program icon for the shortcut. If not, it will use the Sandboxie icon for the shortcut (instead of the generic windows icon).

Then you are prompted for a location to save the shortcut, a shortcut name, and then you are given the option to specify a sandbox parameter, ie /box:current.

Voila, shortcut created. Comments and suggestions welcome!!

Sandboxie Shortcut Creator v2.1.2.7
(MD5: 88ffccb43531c43080fd01705fce19b2)
Last edited by wraithdu on Wed Sep 09, 2009 10:09 am, edited 8 times in total.

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Tue Aug 28, 2007 2:11 am

Omg, it's a virus! :evil:













Just kidding...... lol, but seriously though, great work man, i've tried it a few times and works perfectly, i do have one small suggestion, but i dont want to mention it until i hear some comments from other people first, that way, if they are fine with the shortcut creator the way it is right now, then i'll just keep my mouth shut.... :lol:

dlguild
Posts: 230
Joined: Sat Apr 21, 2007 8:30 pm
Location: Pennsylvania

Post by dlguild » Tue Aug 28, 2007 2:49 am

Very nice indeed! Well done (yet again). Made a desktop shortcut to the Shortcut Maker. 5 drag & drop minutes later I have all the shortcuts I've been meaning to get around to making. Fantastic! Thanks.
Dan

street011
Posts: 412
Joined: Tue Jan 16, 2007 2:08 pm

Post by street011 » Tue Aug 28, 2007 2:53 am

SnDPhoenix, you scare people, i almost got banned on another forum for a comparable post :p

MitchE323
Posts: 2268
Joined: Thu Nov 02, 2006 9:32 am

Post by MitchE323 » Tue Aug 28, 2007 3:17 am

Nice work! Works flawlessly-
This is fine for me. Thanx Wraithdu
Last edited by MitchE323 on Tue Aug 28, 2007 3:51 am, edited 2 times in total.

SnDPhoenix
Posts: 2690
Joined: Tue Dec 26, 2006 5:44 pm
Location: West Florida

Post by SnDPhoenix » Tue Aug 28, 2007 3:39 am

Haha, thats not what im referring to.....
Anyways, i guess i'll just bring it up anyways, heres the suggestion, when you get to the part that lets you enter in what box you'd like to run the specified program in, instead of having to type it in, how about if you have the shortcut creator query what sandboxes exist on your hd, then let them choose the sandbox from a dropdown menu?

dlguild
Posts: 230
Joined: Sat Apr 21, 2007 8:30 pm
Location: Pennsylvania

Post by dlguild » Tue Aug 28, 2007 3:54 am

@Mitch - I think the shortcut arrows are added by Windows. There is a setting somewhere that lets you turn them on and off globally, but I don't know that you could change the behavior for a single shortcut. Maybe make a folder to contain all the Sandbox shortcuts would minimize the confusion?

@ SND - good idea. The location of sandboxie.ini would have to be added to the initial 'discovery' process to be included in sbie.ini as sandboxie.ini can reside (I think) in 2 locations, the Sandboxie program folder or Windows directory.
Dan

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Tue Aug 28, 2007 8:49 am

SnDPhoenix wrote:have the shortcut creator query what sandboxes exist on your hd, then let them choose the sandbox from a dropdown menu?
That's a good idea. I'll have to look into it to see if I can do that with the current setup. I don't think I can with the current plugin used for the dialogs. However I'm looking into using a different method to create a one page dialog, and I think I can do more with that. But the documentation for it is very incomplete at the moment becuase it's new, so it might be a while before either they finish the docs, or I can figure it out somehow.

Paul_K
Posts: 477
Joined: Sun Mar 18, 2007 3:35 pm

Post by Paul_K » Tue Aug 28, 2007 1:25 pm

SnDPhoenix wrote:when you get to the part that lets you enter in what box you'd like to run the specified program in,... let them choose the sandbox from a dropdown menu?
The shortcut creator works fine for me. For a newbie, SnD's suggestion would probably work out better than having them type-in the /box parameter. Or, since that input box is to be used for the box name, at least check that the text entered begins with /box:

You could simply enter DefaultBox at that point, and the /box: would be missing from the shortcut's target parameter.
XP Pro SP3

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Tue Aug 28, 2007 1:37 pm

I've just about got the one-page dialog done. I've basically figured out the nsDialogs plugin - cool stuff. Too bad I left my other source code at home (doh!).

Re: the /box: parameter -
To present a listbox, I'd have to read each line from the INI (can't just extract section titles), check for the [] and store all box titles, skipping the Global section. Then I could create the listbox. But documentation of listboxes is non-existent at this time (of course), so this will have to wait a bit.

In the mean time I'll change it so the user only has to enter the box name, and not the full /box:name string. It will just test - if the field is empty, nothing will be added; if the field has text it will add /box:text.

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

Post by tzuk » Tue Aug 28, 2007 4:54 pm

Nice job wraithdu. :D
tzuk

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

New Version - v2.1.0.0

Post by wraithdu » Tue Aug 28, 2007 6:34 pm

One-page dialog!

This one is much more user friendly. And I finally got to force myself to learn nsDialogs, at least a portion of it. It's a sweet plugin for anyone who uses NSIS, but the documentation is a long way from finished.

Does the same stuff as the old version, except now you only have to type the name of the sandbox you want to run it under and you can omit the /box: prefix. Drag-and-drop and Send To... shortcuts still supported as well.

Thanks everyone for the positive comments and suggestions!
Last edited by wraithdu on Mon Nov 19, 2007 1:15 am, edited 2 times in total.

Paul_K
Posts: 477
Joined: Sun Mar 18, 2007 3:35 pm

Post by Paul_K » Tue Aug 28, 2007 9:28 pm

Really nice update, wraithdu :D
Not much I can suggest, here.

Maybe you can figure out how to delete the text in the "Shortcut name..." text entry box, when that box gets the focus, so that typing in the box automatically deletes what's there - same as in the previous version. If not, no big deal.

I like the check for Start.exe location, and writing of the sbie.ini file to disk. I haven't tried moving sandboxie.ini to a different location (from Windows to SB program folder), after the sbie.ini file is written, but I assume that your program will prompt for the new location and re-write sbie.ini.
XP Pro SP3

wraithdu
Posts: 1410
Joined: Fri Jun 29, 2007 2:54 pm

Post by wraithdu » Tue Aug 28, 2007 9:53 pm

I'm sure there's a window message that will do that, like an OnFocus message or something, I'll have to look into it.

The utility doesn't use sandboxie.ini (yet / ever?). If you meant sbie.ini, then yes, if it's missing it will prompt you to locate Start.exe again and rewrite the file. I noticed however I don't actually check that Start.exe exists in subsequent runs. It checks the filename, but not that the path still exists. Now, this shouldn't change, cause you'd have to change your installation directory or manually mess up the INI, but I'll add it just to be thorough after I figure out how to clear that box.

Paul_K
Posts: 477
Joined: Sun Mar 18, 2007 3:35 pm

Post by Paul_K » Tue Aug 28, 2007 10:48 pm

Do'H. :oops:
I don't even have SnD's excuse - wasn't drinking at all - it's just been a very long day.
Came back to delete that comment - too late...I was too tired to make any sense, but I did like the update :lol:

Yes, I was referring to moving start.exe, after your .ini file was written to disk. Somehow, things got mixed-up. :?

Another alternative for the Shortcut Name box: move "(Omit .LNK extension)" out of the box, and put it in the label for the box.

P.S. Don't overlook adding an "About" drop-down menu, if the documentation shows you how to do it. You do want some credit showing, don't you?
Version number, Author: ....

Time for bed, now... zzzzzzz
XP Pro SP3

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests