topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 6:46 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: sort of launcher for command lines with parameter in a pre-defined place  (Read 34671 times)

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Hello there :}

I work in some sort of help desk and have been "dreaming" lately of some GUI program which I (and maybe my co-workers) could use as a customizable remote administration console.
I looked for various types of launchers or other "parameterizers", but couldn't find what I need.

Selector first seemed close to that, but still, somehow lacks some things for my needs.

So, without further ado, I guess I should explain how I see the thing…


Main features / requirements :

* A GUI driven program, to be run under Windows (32/64 bits), which would have :
 - a text field where the user would type or paste a "target" : for the usage I have in mind, we would enter there either a networked machine's hostname or IP address
 - a zone with user-definable action triggering buttons (from now on, let's call them "button")

* For each of those buttons, the user should be able to define :
 - a caption (displayed either on the button or near it, up to you and depending on whether or not some of the optional features —see further below— are implemented)
 - a command with optional prefix parameters string (let's call that whole string "prefixcmd" from here on)
 - additional parameter "suffixes" : the user would not be required to enter some, but it is necessary that he would be able to
 - it must be possible for the command to be a .bat/.cmd file, it must NOT be restricted to .exe files (like Selector seems to be, from what I've seen)

* The user should be able to create more, modify or remove individual "buttons", if possible from within the GUI itself (for example by clicking a dedicated button, or by means of a right click/context menu from the empty space in the window) ; if not, by editing a human readable config file

* The buttons list should be saved in a portable config file anyway (please, not in the registry)

* When the user clicks the action button, the program concatenates prefixcmd+target+suffix (without "+" or anything) and starts the resulting command line


Optional Features that would be pretty nice if you have enough time for it :

* let the user chose an optional custom icon for each button

* while the mouse cursor is over a button, display the concatenation of the command that clicking that button would send, either as a tooltip or in a status bar

* ability for the user, when editing an action trigger button, to add some flag for the program to ask confirmation before running that command (useful for "shutdown-like" commands ^^'

* a most recent targets list

* a "favorites" list ; the user should be able to easily add the "current target" to his favorites or load a target from his favorites list


In case you'd need a name for the program, well I've been thinking about it… though I could not settle on something definitive, I suppose something around the lines of "Customizable Remote Administration Panel" (or in short "CRAP") would do ? xD

Of course, don't hesitate to ask if you need me to rephrase something, give more precisions, if you have suggestions etc. :)

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Well, not even a single reply after a whole month has passed… did I do anything wrong in the way I asked ? :/

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
did I do anything wrong in the way I asked ? :/
no,
it's very clearly laid out!
Hopefully the bump will help get a response.


Selector[/url] first seemed close to that, but still, somehow lacks some things for my needs.
-ConstanceJill (August 23, 2012, 02:27 PM)

might be an idea to ask MilesAhead in that thread if he'd consider adding additional functionality to Selector.
Tom

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
This does seem like something that might be doable with my Find and Run Robot program (or with a plugin for it?).

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Hi, ConstanceJill, and welcome to the site.  I had meant to reply to your original post but it slipped my mind.  Apologies.

In regards to your request, does it have to be physical buttons on the GUI?  Interfaces like that can get really messy if you plan on adding a large number of these commands.  What about using a listview where you can double-click a row to run a command.  Or, highlight a row and click a single button to run a command?

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Hello there ;D

This does seem like something that might be doable with my Find and Run Robot program (or with a plugin for it?).
Hmm I'll need to take a closer look at it before I can answer this ^^

Hi, ConstanceJill, and welcome to the site.  I had meant to reply to your original post but it slipped my mind.  Apologies.
No problem :}

In regards to your request, does it have to be physical buttons on the GUI?  Interfaces like that can get really messy if you plan on adding a large number of these commands.  What about using a listview where you can double-click a row to run a command.  Or, highlight a row and click a single button to run a command?
Well I had chosen buttons because these where the first user interface objects that came to my mind in order to minimize the number of mouse clicks required to trigger an action, so it would probably be the fastest way of triggering (several) pre-defined actions, but I suppose double clicking a listview line could do the trick too. Though I guess then I might not be able to choose an icon for each action (?)
Also, buttons don't need to be huge, as long as they have a tooltip on mouseover that describes what they do and/or an icon, so I guess one could get a few dozens to fit even in a rather small window — while there is no particular restriction on the program's window size.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
How about WinButtons?

The UI for editing the button actions may not be super, but IMHO it's usable.
If you have any feature requests, just throw 'm in :D

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Hmm I suppose I could use it if it had the mandatory text field for the user to input the target('s hostname or IP) and the second field for the second part of the command, since some administrative commands can't have the target to be specified at the very end — though I probably could create .bat files to get around that part.

Though, I think I'd prefer if possible a more "standard looking" resizable window, with less options in the editor xD

Here are some rough sketches of what I have in mind.

Main window :


- Right clicking on a button would open a context menu to edit or remove it
- Right clicking in the empty space of the "buttons zone" would allow to add a new button.
- The buttons don't absolutely need to be as large as on my sketch, as long as they're large enough for an icon and a short caption — we probably won't need anything longer than "Telnet, port 9000" or "Trigger CCM Soft. inventory"

Add / Edit dialog :


That's about all I need for the user interface :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
Hm, it's not too difficult to add these features to WinButtons.
I'll use the variables it already supports, adding some options there, to show a parameter window-section like you sketched.
I can create a Quick button editor, with just the most standard fields, and the Confirmation option isn't that much work too.

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Thanks a lot, looking forward to it :D

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
I've been playing with something for this

Clipboard_20120930.pngIDEA: sort of launcher for command lines with parameter in a pre-defined place

buttons are generated dynamically (from the favourites list).  the list view is only used for maintaining your favourites and would normally be 'hidden'

how picky are you about graphical buttons, and where do you anticipate you would get the icons?

and if you could provide a sample of some of the commands you use (and the parameters) that would be helpful

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Hello there :}
how picky are you about graphical buttons, and where do you anticipate you would get the icons?
Hmm I'm not sure I completely understand the first part.
If that means "does it absolutely have to be buttons", then well, I'd really prefer ìt to
If that means "is that mandatory that you could put icons on the buttons", then my answer is : no, though I'd prefer if it was possible — as stated in the first message, it's part of the "optional" features
About where I would get the icons : from within some .exe, .dll, .cur or .ani files. Possibly some .bmp renamed to .ico, since that seems to work fine enough under XP / 7

and if you could provide a sample of some of the commands you use (and the parameters) that would be helpful
Sure, here are a few examples.

ping -t target
sc \\target start remoteregistry
reg add "\\target\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
mstsc /v:target
shutdown -r -t 0 -m \\target
"c:\program files (x86)\mozilla firefox\firefox.exe" http://target
telnet target:9000
wmic /node:"target" /namespace:\\root\ccm path sms_client CALL TriggerSchedule "{00000000-0000-0000-0000-000000000002}” /NOINTERACTIVE

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Hello there :}
how picky are you about graphical buttons, and where do you anticipate you would get the icons?
Hmm I'm not sure I completely understand the first part.
If that means "does it absolutely have to be buttons", then well, I'd really prefer ìt to
If that means "is that mandatory that you could put icons on the buttons", then my answer is : no, though I'd prefer if it was possible — as stated in the first message, it's part of the "optional" features
About where I would get the icons : from within some .exe, .dll, .cur or .ani files. Possibly some .bmp renamed to .ico, since that seems to work fine enough under XP / 7

ok, my reasoning was that AHK does buttons or images, but not (easily) graphical buttons.  The second part was about whether or not you had a folder of favourite icons (easier) or you were just going to use another resource (harder)
 

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
come on guys, where are all those solutions you were working on 8)

here's my take

click a button to run the command.  When you do this you will get prompted for the 'target' info which will then be inserted into the command.

Commands are saved to an ini file.  They must be typed in full and use TARGET as a token for the...erm...target
Commands can be added, deleted, or edited from the gui (press the little button on the right hand end)
You can add as many commands as you like, though if you add too many the gui could be wider than the monitor  (I don't anticipate this being a problem)

I just reread your requirements and there's a few things I haven't done
  • button captions - this was a space consideration as the button sizes would likely get out of control quick smart.  That said the 'command' is displayed in the status bar on mouse over
  • Favourite 'targets' - when you click on a button you will get an input box to enter the required 'target' which will then be inserted into the command and run.  I've done very limited testing of this as I can't use it the same way you're likely to.
  • confirmation before execution of commands - only just noticed this, but it shouldn't be too hard to add
  • favourite targets - this is possible, but would require a different gui

Is this going in the right direction?

EDIT: attachment removed (downloaded 8 times)
« Last Edit: October 11, 2012, 03:50 AM by Target »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
I'm working on an extension to WinButtons, but I have limited time available.
I've got parameter entry and tooltip updating working, but the confirmation prompt and quick add/edit of a button need to be added

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
To Target : Hey, not bad :)

A few things though :
 - Would it be possible to have options to prevent it from "auto-hiding" and to be able to move it without it sticking to the top edge of the desktop ?
 - Though I don't have an example yet, I fear there might be issues should any command line require the text "target" (instead of the target's name) to be written within one of its commands. Or is there any syntax trick to prevent it ?
 - If possible, I'd prefer to enter the target name in a field on the same window as where the buttons are, so I don't need to click "OK" in a second window to actually run the command — though that can act as a "confirmation" dialog
 - I guess the window should be manually resizable, for with these default commands, the status bar is too short to display the contents of the B3 and B6 command
 - should we keep the dialog box asking for the target's name, I guess it would be nice if that window also reminded somewhere of which command it will run

To Ath : No problem, I can wait :]

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
For teasers, here's a screenshot:

Screenshot - 06-10-2012 , 15_59_05.pngIDEA: sort of launcher for command lines with parameter in a pre-defined place

A few notes:
- 7 types of input controls:
  - Textbox with history
  - Textbox no history
  - Combobox
  - Combobox with edit & history
  - Combobox with edit, no history
  - Checkbox with history
  - Checkbox no history
- All parameters are connected to a Variable, as can be configured using WinButtonEdit, and the variable is to be used like :varVarName: in the command defined.
- Checkboxes can be easily mapped to a checked/unchecked value
« Last Edit: October 07, 2012, 02:28 PM by Ath, Reason: Added 2 and updated 2 types of input controls »

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
To Target : Hey, not bad :)

A few things though :
 - Would it be possible to have options to prevent it from "auto-hiding" and to be able to move it without it sticking to the top edge of the desktop ?
 - Though I don't have an example yet, I fear there might be issues should any command line require the text "target" (instead of the target's name) to be written within one of its commands. Or is there any syntax trick to prevent it ?
 - If possible, I'd prefer to enter the target name in a field on the same window as where the buttons are, so I don't need to click "OK" in a second window to actually run the command — though that can act as a "confirmation" dialog
 - I guess the window should be manually resizable, for with these default commands, the status bar is too short to display the contents of the B3 and B6 command
 - should we keep the dialog box asking for the target's name, I guess it would be nice if that window also reminded somewhere of which command it will run

ok, try this instead

Screenshot.jpgIDEA: sort of launcher for command lines with parameter in a pre-defined place

  • window now floats and doesn't hide
  • removed the status bar and used tooltips instead
  • replaced the token string with '###' instead of the string TARGET (this could be anything you like)
  • added a combobox for the faves list - you can type an entry, or use the drop down to select an existing favourite
  • added a confirmation field to the command list.  Items tagged for confirmation will be prompted at run time

I haven't done anything about editing the faves list yet, but if you want to you can just edit the INI file (I could make it automagically reload if the ini is edited)

as it stands it doesn't actually run anything (it throws a messagebox showing the command).  If you like it I'll tidy the code and fix that

EDIT: attachment removed (downloaded 4 times)
« Last Edit: October 09, 2012, 08:00 PM by Target »

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Thank you, that's becoming closer to what I had in mind :]
Though I really wish the buttons could have custom captions, as that would make it much easier for the user to reach the intended function.

[…] automagically […]
Huh ? I see what you did there ;)

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Thank you, that's becoming closer to what I had in mind :]
Though I really wish the buttons could have custom captions, as that would make it much easier for the user to reach the intended function.

ummm, so do you want a physical caption (eg <my description here instead> of <B1>) or would you like the caption in the tooltip?


ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
First choice, please :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
Hm, WinButtons can do both the prompt and custom captions already...

I'm working on the readme and close to a release of WinButtons 3.6.0 (and a matching WinButtonEdit), not sure if I can make it tonight though, if not then tomorrow night. (I'm in the CET timezone)

ConstanceJill

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 203
    • View Profile
    • Donate to Member
Alright, I'll be waiting for this eagerly too :}

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,610
    • View Profile
    • Donate to Member
I've released WinButtons 3.6.0 and WinButtonEdit 1.1.0 in this message, click through to the release message for a couple of screenshots, and the official downloadlink.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
try this then....

Screenshot.jpgIDEA: sort of launcher for command lines with parameter in a pre-defined place

looks pretty much the same, just rearranged, though there are a lot of changes in the background

add as many buttons as you like - if you exceed the screen width it will start a new row

I've removed the editing functionality for the time being - I'm working on that at the moment, but in the meantime you can simply edit the ini by hand and the script will reload your changes when you save the file (NOTE - the COUNT key should equal the number of buttons)