Trust No Program
Reply to topic
Sandboxie Shortcut Creator
wraithdu


Joined: 29 Jun 2007
Posts: 1410
Reply with quote
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 Smile 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 2:09 pm; edited 8 times in total
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
Omg, it's a virus! Evil or Very Mad













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.... Laughing
View user's profileSend private message
dlguild


Joined: 22 Apr 2007
Posts: 230
Location: Pennsylvania
Reply with quote
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
View user's profileSend private message
street011


Joined: 16 Jan 2007
Posts: 410
Reply with quote
SnDPhoenix, you scare people, i almost got banned on another forum for a comparable post :p
View user's profileSend private message
MitchE323


Joined: 02 Nov 2006
Posts: 2268
Reply with quote
Nice work! Works flawlessly-
This is fine for me. Thanx Wraithdu


Last edited by MitchE323 on Tue Aug 28, 2007 7:51 am; edited 2 times in total
View user's profileSend private message
SnDPhoenix


Joined: 26 Dec 2006
Posts: 2694
Location: West Florida
Reply with quote
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?
View user's profileSend private message
dlguild


Joined: 22 Apr 2007
Posts: 230
Location: Pennsylvania
Reply with quote
@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.
View user's profileSend private message
wraithdu


Joined: 29 Jun 2007
Posts: 1410
Reply with quote
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.
View user's profileSend private message
Paul_K


Joined: 18 Mar 2007
Posts: 477
Reply with quote
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
View user's profileSend private message
wraithdu


Joined: 29 Jun 2007
Posts: 1410
Reply with quote
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.
View user's profileSend private message
tzuk


Joined: 22 Jun 2004
Posts: 15004
Reply with quote
Nice job wraithdu. Very Happy

_________________
tzuk
View user's profileSend private message
New Version - v2.1.0.0
wraithdu


Joined: 29 Jun 2007
Posts: 1410
Reply with quote
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 6:15 am; edited 2 times in total
View user's profileSend private message
Paul_K


Joined: 18 Mar 2007
Posts: 477
Reply with quote
Really nice update, wraithdu Very Happy
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.
View user's profileSend private message
wraithdu


Joined: 29 Jun 2007
Posts: 1410
Reply with quote
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.
View user's profileSend private message
Paul_K


Joined: 18 Mar 2007
Posts: 477
Reply with quote
Do'H. Embarassed
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 Laughing

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

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
View user's profileSend private message
Sandboxie Shortcut Creator
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 3  

Use the RSS feed to watch this topic for replies
  
  
 Reply to topic  

Sandboxie is Copyright © 2004-2012 by Sandboxie Holdings LLC.  All rights reserved.
Sandboxie.com | Contact Author
This site has been viewed 208,482,643 times since June 2004