Page 1 of 3
Sandboxie Shortcut Creator
Posted: Tue Aug 28, 2007 1:39 am
by wraithdu
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)
Posted: Tue Aug 28, 2007 2:11 am
by SnDPhoenix
Omg, it's a virus!
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....
Posted: Tue Aug 28, 2007 2:49 am
by dlguild
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.
Posted: Tue Aug 28, 2007 2:53 am
by street011
SnDPhoenix, you scare people, i almost got banned on another forum for a comparable post :p
Posted: Tue Aug 28, 2007 3:17 am
by MitchE323
Nice work! Works flawlessly-
This is fine for me. Thanx Wraithdu
Posted: Tue Aug 28, 2007 3:39 am
by SnDPhoenix
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?
Posted: Tue Aug 28, 2007 3:54 am
by dlguild
@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.
Posted: Tue Aug 28, 2007 8:49 am
by wraithdu
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.
Posted: Tue Aug 28, 2007 1:25 pm
by Paul_K
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.
Posted: Tue Aug 28, 2007 1:37 pm
by wraithdu
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.
Posted: Tue Aug 28, 2007 4:54 pm
by tzuk
Nice job wraithdu.
New Version - v2.1.0.0
Posted: Tue Aug 28, 2007 6:34 pm
by wraithdu
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!
Posted: Tue Aug 28, 2007 9:28 pm
by Paul_K
Really nice update, wraithdu
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.
Posted: Tue Aug 28, 2007 9:53 pm
by wraithdu
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.
Posted: Tue Aug 28, 2007 10:48 pm
by Paul_K
Do'H.
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
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