logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mike  
#1 Posted : Wednesday, August 26, 2015 12:48:56 PM(UTC)
Mike


Rank: Administration

Medals: Level 3: Shirt off your back! Received 25 Thanks!

Joined: 5/30/2012(UTC)
Posts: 470
Location: Raleigh, NC

Thanks: 52 times
Was thanked: 74 time(s) in 60 post(s)
UserPostedImage

This tool adds a Toolbox option to the right-click menu of the host page. Preset configurable commands can be sent to remote machines.

Directions:

1. After installing the extension, click on the options to configure your settings.

UserPostedImage

2. Add in the commands you'd like to store and save settings.

UserPostedImage

3. Navigate to the host page, select a session(s), and right click.

UserPostedImage

4. Select the Command Toolbox and select the command to pass.

UserPostedImage

5. Your results will post to the commands tab for each session selected.

UserPostedImage

This extension is now available in the Online Extensions Library.

Note: Currently this extension has only been tested with ScreenConnect 5.4 or higher. Revisions are pending to address some requests.

Disclaimer: This extension was written by our support team (and in some cases in conjunction with our forum community) in response to customer requests. Extensions are meant to be quick workarounds or immediate solutions to problems. Extensions are not supported under our normal terms of service, as these extensions are outside typical Q/A or development guidelines. Questions for extensions should be addressed in its respective forum post. Suggestions for improvements (enhancements or defects) should also be queued in the post for consideration.
ScreenConnect Team
thanks 6 users thanked Mike for this useful post.
AustinKnight on 8/26/2015(UTC), rich2323 on 8/26/2015(UTC), Stefan on 8/27/2015(UTC), clickright on 8/28/2015(UTC), ebell on 8/28/2015(UTC), hibrid0 on 9/20/2015(UTC)
clickright  
#2 Posted : Friday, August 28, 2015 5:13:08 AM(UTC)
clickright


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 1: Random Act of Kindness! Received One Thanks!

Joined: 5/15/2014(UTC)
Posts: 67
Canada

Thanks: 8 times
Was thanked: 2 time(s) in 2 post(s)
Love it!

Only thing is the box appears really small in Chrome 44:

UserPostedImage

Edited by user Friday, August 28, 2015 5:14:03 AM(UTC)  | Reason: Not specified

Mike  
#3 Posted : Friday, August 28, 2015 3:02:13 PM(UTC)
Mike


Rank: Administration

Medals: Level 3: Shirt off your back! Received 25 Thanks!

Joined: 5/30/2012(UTC)
Posts: 470
Location: Raleigh, NC

Thanks: 52 times
Was thanked: 74 time(s) in 60 post(s)
Orginally posted by jonmcknight

Quote:
Installed Screen Connect Version: 5.3.9074.5646

Not working for simple reboot command:
Code:
shutdown /r


Error Message Returned:
Code:
System.ServiceModel.FaultException`1[ScreenConnect.SessionManagerFault]: Session group 'A' does not exist. (Fault Detail is equal to ScreenConnect.SessionManagerFault).


Am I using this incorrectly?

Command Toolbox Settings

Edited by user Friday, August 28, 2015 3:02:58 PM(UTC)  | Reason: Not specified

ScreenConnect Team
Scott  
#4 Posted : Monday, August 31, 2015 2:48:31 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
I've just committed a fix to make this extension work correctly with previous versions of SC.

@clickright I haven't been able to replicate that, though. Do you have a really long command by chance?

ninja edit: the new version may take a few days to hit the Library.

Edited by user Monday, August 31, 2015 2:50:29 PM(UTC)  | Reason: Not specified

ScreenConnect Team
jonmcknight  
#5 Posted : Tuesday, September 1, 2015 2:50:24 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
Confirmed working in Version: 5.3.9074.5646. Thanks for the fix!
Matt Highsmith  
#6 Posted : Thursday, September 3, 2015 7:45:32 PM(UTC)
Matt Highsmith


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 4/1/2014(UTC)
Posts: 220
United States
Location: Raleigh

Thanks: 2 times
Was thanked: 15 time(s) in 11 post(s)
nice, thanks
hibrid0  
#7 Posted : Sunday, September 20, 2015 2:12:08 PM(UTC)
hibrid0


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 11/25/2014(UTC)
Posts: 28
Colombia
Location: Bogota

Thanks: 25 times
Was thanked: 7 time(s) in 5 post(s)
How can I launch a tool from this command tool and show the gui on the client?

I need to do that because I have a Client with Active Directory and the "Run Tool" not work, becuase he have policies to dont save anything in the local hard drive. I have a network drive with some tools.
Scott  
#8 Posted : Tuesday, September 22, 2015 8:28:37 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Commands executed from the Host page cannot invoke applications/operations to the GUI.
ScreenConnect Team
Scott  
#9 Posted : Thursday, December 17, 2015 1:55:23 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
To update this thread, version 1.31 is now available from the Extension Library. The two new features are the ability to Edit commands before you send them and the ability to provide a common name to identify the command.

In the Extension's Settings, you'll notice that there are now two settings per command, CommandNameX can be used to identify a command.
ScreenConnect Team
jonmcknight  
#10 Posted : Thursday, December 17, 2015 2:06:11 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
Looks great! Thanks Scott
KBrownConsulting  
#11 Posted : Wednesday, March 2, 2016 12:08:32 AM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
I'm having trouble getting this to work on version 5.3.9074.5646

I have successfully installed the extension & configured a test command as shown below:

Extension Settings

The "Command Toolbox..." option shows up on the righ-click menu on the Host page, but clicking on it does nothing in either Chrome or Firefox...

Suggestions?
Matt Highsmith  
#12 Posted : Wednesday, March 2, 2016 1:53:05 PM(UTC)
Matt Highsmith


Rank: Advanced Member

Medals: ScreenConnect Advisor: Focus Group MemberLevel 2: Lent a Helping Hand! 10 Thanks!

Joined: 4/1/2014(UTC)
Posts: 220
United States
Location: Raleigh

Thanks: 2 times
Was thanked: 15 time(s) in 11 post(s)
so nothing is in your command tab after running the command toolbox line?

this is what i see when i run that command

[img]null[/img]IPCONFIG /ALL
KBrownConsulting  
#13 Posted : Thursday, March 3, 2016 7:55:23 AM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Matt Highsmith Go to Quoted Post
so nothing is in your command tab after running the command toolbox line?



The problem is that I can not get the Command Toolbox to pop up & therefore I'm unable to run any commands. Like I said:

KBrownConsulting wrote:
The "Command Toolbox..." option shows up on the righ-click menu on the Host page, but clicking on it does nothing in either Chrome or Firefox...

Scott  
#14 Posted : Thursday, March 3, 2016 2:02:34 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
The Command Toolbox works best with ScreenConnect version 5.4+, but it does have code to handle 5.3 and lower. I recommend going to 5.4 if you can, but I'll make a note to take a look at the 5.3 code to see what the issue is.
ScreenConnect Team
Scott  
#15 Posted : Thursday, March 3, 2016 5:08:09 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
To update, I just uploaded a new revision, 1.34, which contains a fix for version 5.3 not showing the dialog on the Host page. As always, it might be a few days before it hits the Library.
ScreenConnect Team
KBrownConsulting  
#16 Posted : Friday, March 4, 2016 1:04:28 AM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
To update, I just uploaded a new revision, 1.34, which contains a fix for version 5.3 not showing the dialog on the Host page. As always, it might be a few days before it hits the Library.



Thanks Scott. I just tested 1.34 & can confirm that the Command Toolbox dialog does now pop up on the Host page.

Unfortunately there's now a second issue:

It appears the extension is only looking at the command name & not the actual command itself in some circumstances. See below.

Here's my Command Toolbox settings:

Command Toolbox Settings

When I initially open the Command Toolbox from the Host page it pops up fine & shows the correct command:

Command Toolbox Dialog Box Initial Open

But if I switch to the second command, it show the command name for both the name & the command. (And if I run the command it sends exactly what is shown to the client.)

Command Toolbox 2nd command

Further, at this point if I switch back to the first command, that one is now messed up too:

Command Toolbox, switch back to 1st command

Obviously the easy solution is to just set the command name to the command you want to use & for now that's what I'll do, but I thought you might want to be aware of the issue. (I won't be upgrading until 5.6 is released as stable as I haven't wanted to deal with the delayed auto-start that was introduced in 5.4)

Thanks
Scott  
#17 Posted : Friday, March 4, 2016 2:42:34 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Doh! That was purely my mistake, a typo in the < 5.4 version code. I've fixed it and uploaded version 1.4, might take a few days to appear on the Library.

Thanks for pointing that out!
ScreenConnect Team
KBrownConsulting  
#18 Posted : Wednesday, March 9, 2016 11:55:16 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
Doh! That was purely my mistake, a typo in the < 5.4 version code. I've fixed it and uploaded version 1.4, might take a few days to appear on the Library.

Thanks for pointing that out!


Hope I'm not being impatient, but how long is "a few days"? I'm still not seeing the update...


Also, is it possible to include shabang modifiers (like maxlength & timeout) in a Command Toolbox command? I've tried a bunch of different ways & at least in 5.3 nothing seems to work, which is actually a major limitation for me. (I know I can globally adjust those settings but it would be much nicer if I could define them on a command by command basis.)

On a related note, would it be possible to allow the Command Toolbox to support multi-line commands? (This would probably resolve the shabang modifier issue as well as make the Command Toolbox much more flexible.)

Thanks for considering it!

Edited by user Thursday, March 10, 2016 12:05:57 AM(UTC)  | Reason: Grammar police

Scott  
#19 Posted : Tuesday, March 15, 2016 1:07:22 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
@KBrownConsulting should be live now.

What have you tried with the shebang modifiers that isn't work? Can you post an example?

Also, the current iteration just assumes the textarea's contents are one entire string but I can look into allowing support for multi-line commands.
ScreenConnect Team
KBrownConsulting  
#20 Posted : Tuesday, March 15, 2016 2:55:49 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
@KBrownConsulting should be live now.

Confirmed & verified it's working, thanks!

Originally Posted by: Scott Go to Quoted Post
What have you tried with the shebang modifiers that isn't work? Can you post an example?

Well really the only seemingly halfway decent idea I could come up with was concatenating the commands:

Code:
#timeout=60000 & MyAppThatRunsForALongTime.exe


I also tried just stringing the commands together:

Code:
#timeout=60000 MyAppThatRunsForALongTime.exe


As well as some random delimiters:

Code:
#timeout=60000, MyAppThatRunsForALongTime.exe

Code:
#timeout=60000; MyAppThatRunsForALongTime.exe

Code:
#timeout=60000 &nbsp; MyAppThatRunsForALongTime.exe


But they all resulted in the process instantly being killed:

Quote:
Killed after 0 milliseconds.


Please let me know if you have any other suggestions!

Originally Posted by: Scott Go to Quoted Post
Also, the current iteration just assumes the textarea's contents are one entire string but I can look into allowing support for multi-line commands.

It would be amazing if you could figure out a way to allow for multi-line entries in the Command Toolbox configuration! It would definitely make the Command Toolbox more flexible & powerful!

Edited by user Tuesday, March 15, 2016 3:41:29 PM(UTC)  | Reason: Spelling

Scott  
#21 Posted : Tuesday, March 15, 2016 4:10:05 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
It might depend upon what the exe is doing, as I just tested with a console exe with no UI output (it emails) using the following:

Code:

#!ps 
#timeout=90000
C:\Users\slinak\checkStuff.exe


Also, upon further investigation, you can use Shift+Enter within the textarea to effectively make the command multi-line.
ScreenConnect Team
KBrownConsulting  
#22 Posted : Tuesday, March 15, 2016 4:21:51 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
It might depend upon what the exe is doing, as I just tested with a console exe with no UI output (it emails) using the following:

Code:

#!ps 
#timeout=90000
C:\Users\slinak\checkStuff.exe


Also, upon further investigation, you can use Shift+Enter within the textarea to effectively make the command multi-line.


We're still talking about the Command Toolbox extension right? Shift+Enter works great in the text box for the built-in "Commands" window but I'm trying to figure out how to send the #timeout= shabang as part of a Command Toolbox command without having to modify the command before sending it...

Are you able to save your example code as a working Command Toolbox command??
Scott  
#23 Posted : Wednesday, March 16, 2016 5:35:24 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
@KBrownConsulting Ahhhhh, I see the difference, my mistake. No, I was not entering the text into the 'Edit Settings' but rather into the text area itself. The Edit Settings menu right now only supports the text box as it exists currently, but I suppose a button within the Command Toolbox modal to Save/Overwrite might do the trick, I'll look into that when I get a chance.
ScreenConnect Team
KBrownConsulting  
#24 Posted : Thursday, March 17, 2016 12:36:55 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
@KBrownConsulting Ahhhhh, I see the difference, my mistake. No, I was not entering the text into the 'Edit Settings' but rather into the text area itself. The Edit Settings menu right now only supports the text box as it exists currently, but I suppose a button within the Command Toolbox modal to Save/Overwrite might do the trick, I'll look into that when I get a chance.


That would be really great, thanks.
Cooper  
#25 Posted : Friday, April 1, 2016 6:20:25 PM(UTC)
Cooper


Rank: Advanced Member

Medals: Bug Buster Level One: Spoon!Level 1: Random Act of Kindness! Received One Thanks!

Joined: 10/28/2015(UTC)
Posts: 44
United States
Location: WA

Thanks: 10 times
Was thanked: 4 time(s) in 4 post(s)
Hello,

Would it be possible to add the ability to do the follow?

-Be able to easily change the order of the commands in the toolbox. Maybe by Alphabetical or grouping or just up and down arrows.

-Provide two text boxes for each command. For example, if I want the command to first stop a service then start a service. I couldn't find a way to create a return so that the command could do each action separately without having two different command drop-downs. For example, net stop "spooler" net start "spooler"
KBrownConsulting  
#26 Posted : Friday, April 1, 2016 11:39:45 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Cooper Go to Quoted Post
-Be able to easily change the order of the commands in the toolbox. Maybe by Alphabetical or grouping or just up and down arrows.

I like this idea! At least the up & down arrows would be great! I'd definitely use them! +1

Originally Posted by: Cooper Go to Quoted Post
-Provide two text boxes for each command. For example, if I want the command to first stop a service then start a service. I couldn't find a way to create a return so that the command could do each action separately without having two different command drop-downs. For example, net stop "spooler" net start "spooler"

This is exactly what I asked for above. (Not multiple boxes but the ability to enter multiple lines for each command.) Scott said in his most recent message that he'd try to look into this. In the meantime though, you can accomplish your goals of stringing multiple commands together by simply concatenating them with the ampersand (&) character like so:

net stop "spooler" & net start "spooler"


Cheers

Edited by user Friday, April 1, 2016 11:45:07 PM(UTC)  | Reason: Not specified

thanks 1 user thanked KBrownConsulting for this useful post.
Cooper on 4/5/2016(UTC)
Cooper  
#27 Posted : Tuesday, April 5, 2016 4:13:59 PM(UTC)
Cooper


Rank: Advanced Member

Medals: Bug Buster Level One: Spoon!Level 1: Random Act of Kindness! Received One Thanks!

Joined: 10/28/2015(UTC)
Posts: 44
United States
Location: WA

Thanks: 10 times
Was thanked: 4 time(s) in 4 post(s)
Originally Posted by: KBrownConsulting Go to Quoted Post
Originally Posted by: Cooper Go to Quoted Post
-Be able to easily change the order of the commands in the toolbox. Maybe by Alphabetical or grouping or just up and down arrows.

I like this idea! At least the up & down arrows would be great! I'd definitely use them! +1

Originally Posted by: Cooper Go to Quoted Post
-Provide two text boxes for each command. For example, if I want the command to first stop a service then start a service. I couldn't find a way to create a return so that the command could do each action separately without having two different command drop-downs. For example, net stop "spooler" net start "spooler"

This is exactly what I asked for above. (Not multiple boxes but the ability to enter multiple lines for each command.) Scott said in his most recent message that he'd try to look into this. In the meantime though, you can accomplish your goals of stringing multiple commands together by simply concatenating them with the ampersand (&) character like so:

net stop "spooler" & net start "spooler"


Cheers


Thanks! I'll try that out.

What I ended up doing is putting the commands into a bat file and that works fine.

The Command Toolbox and the Run Tool features are awesome. They can be such a time saver.
silversword  
#28 Posted : Wednesday, April 6, 2016 12:42:40 PM(UTC)
silversword


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 6/17/2013(UTC)
Posts: 25

Thanks: 10 times
Was thanked: 2 time(s) in 2 post(s)
Putting together some useful commands with a google docs spreadsheet. It's publicly editable, feel free to add your useful items! :)

https://docs.google.com/...aMG11HQ/edit?usp=sharing
KBrownConsulting  
#29 Posted : Friday, April 8, 2016 2:29:07 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
@Scott - In the newly posted Extension: Set Session Properties From System Variables

I noticed the following:

"The Extension Settings editor for this extension has been modified to allow Text Area type fields for these command entries to facilitate multi-line commands (script-style)."

UserPostedImage

Is there any way that functionality could easily be copied to this extension?!
jonmcknight  
#30 Posted : Friday, April 8, 2016 2:49:05 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
+1 @KBrownConsulting
Scott  
#31 Posted : Monday, April 18, 2016 12:59:17 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Thanks for noticing that, I'll make a note to change that to allow similar behavior in the command toolbox.
ScreenConnect Team
thanks 1 user thanked Scott for this useful post.
KBrownConsulting on 4/18/2016(UTC)
jonmcknight  
#32 Posted : Thursday, April 28, 2016 9:37:53 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
Hey Scott, any progress on text-area input, (multi-line commands) update?
Scott  
#33 Posted : Wednesday, May 4, 2016 1:01:33 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Nothing solid yet, it's still on my to-do list. The way it was implemented within that other Extension @KBrownConsulting mentioned is kind of hackish, I'm instead looking at potentially changing the Extension Runtime itself to provide a way for extensions to hook into native modals.
ScreenConnect Team
KBrownConsulting  
#34 Posted : Wednesday, May 4, 2016 6:28:03 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
I was just looking at some new commands I'd like to add to the Command Toolbox that would be simplified if multi-line entries were possible so thanks for continuing to consider this Scott.
Scott  
#35 Posted : Tuesday, May 10, 2016 3:27:04 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
I'm not super happy with the implementation, but I've added the ability to save multi-line commands to the Extension in version 1.43.21, which should be available for download from the Library already. The reason I'm not super happy with it is that it's far from intuitive, the multi-line commands are saved from within the Command Toolbox modal on the Host page, similar to:

UserPostedImage

Overloading the already-present Edit Extension Settings modal is only possible through some hackish copy-paste which isn't a very good method. We're still looking for ways to allow Extensions to hook into other modals, though.
ScreenConnect Team
jonmcknight  
#36 Posted : Tuesday, May 10, 2016 3:35:18 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
@Scott

I'm running ScreenConnect version 5.4.9675.5750.

I just updated the Command Toolbox extension to the new version 1.43.21. I immediately tested changing one of my commands in the manner you described. While it did save that command as a multi-line command, it also deleted all of my other commands.

Any thoughts?

Scott  
#37 Posted : Tuesday, May 10, 2016 3:45:38 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
@jonmcknight ah, sorry about that but thanks for the report. I have temporarily reverted the version found in the Library to 1.4 so that I can find a fix. I can see what's happening so the fix should be relatively quick.
ScreenConnect Team
Scott  
#38 Posted : Wednesday, May 11, 2016 3:30:20 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Version 1.43.22 of the Command Toolbox has been published with a fix for the issue that @jonmcknight reported. Thanks again for the report.
ScreenConnect Team
jonmcknight  
#39 Posted : Wednesday, May 11, 2016 3:37:49 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
@Scott

I just updated the Command Toolbox extension to the new version 1.43.22. I immediately tested changing one of my commands in the manner you described. The bug that was deleting all other other commands is no longer present, however it is no longer saving the command as a multi-line command.

Any thoughts?
Scott  
#40 Posted : Wednesday, May 11, 2016 3:39:31 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
@jonmcknight hmm, strange. It's saving the commands correctly as multiline from both my dev environment and our QA environment. What browser are you using? What version of SC and what OS for the SC server?
ScreenConnect Team
jonmcknight  
#41 Posted : Wednesday, May 11, 2016 4:06:43 PM(UTC)
jonmcknight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/30/2015(UTC)
Posts: 41
United States

Was thanked: 7 time(s) in 5 post(s)
I'm running SC version 5.4.9675.5750 on Windows Server 2008 R2. I'm accessing SC from Google Chrome on Windows 7.

I just got it to work, but I'm not certain how or what the problem was.

After yesterday's 1.43.21 issue that deleted all but the edited multi-line command, my commands where as follows:
1~6 as "Default"
#7 as the multi-line command that I just saved.
8~10 as "Default"


Later that day I edited command #1 to a normal single line command leaving me with the following commands:
#1 as a custom single line command
2~6 as "Default"
#7 as the multi-line command that I just saved.
8~10 as "Default"


I'm not sure which of the following two actions I just performed fixed the problem.

I reset all commands/names to default, then I setup #1 as a custom single line command and #2 as a soon-to-be multi-line command.

I then saved my changes.


After this I returned to the /HOST page, modified #2 to be multi-line saved the change and refreshed, (as I have done every time). When I rechecked command #2, I saw that it was multi-lined and that #1 had not been deleted. So it appears that everything is good now.

Edited by user Wednesday, May 11, 2016 4:08:21 PM(UTC)  | Reason: Not specified

KBrownConsulting  
#42 Posted : Wednesday, May 11, 2016 8:13:59 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
First, thanks for working on this Scott. It is appreciated!

Unfortunately I think I found another bug.

Basic functionality seems to work in that I can save multi-line commands, reload the page & they are still there, still work & no other commands have been messed up.

BUT if I then go back to the Extension settings to add a new command, as soon as I save the extension settings all the carriage returns seem to get wiped out for the multi-line command & it no longer works.


SC 5.3.9074.5646 running on Windows 2012 R2
Browser: Chrome on Windows

Scott  
#43 Posted : Wednesday, May 11, 2016 8:24:56 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
@KBrownConsulting what you describe is exactly why I wasn't too happy with how I had to implement this. The ability to save multiline-commands is only possible from the Command Toolbox modal on the Host page because the textarea field. The Edit Extension Settings modal uses an input element of type text which doesn't respect the newlines.

We're still looking for a good, clean way to hook into current modals in order to modify their behavior. But, until then, this is about as good as it gets without having to change a significant amount of stuff around or implement a hackish alternative.
ScreenConnect Team
KBrownConsulting  
#44 Posted : Wednesday, May 11, 2016 9:16:44 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
That's what I was afraid you'd say.

Would it be possible to update not just the command itself but the name of the command from within the Command Toolbox modal on the Host page? If so, we could just enable ALL commands from the Extension settings page initially (with the unused ones having a name/title of "Unused") & from then on configure/update/add new commands from the Host page. It's ugly & hackish but no more so than the current implementation & does (more or less) solve the problem.


But this train of thought actually brings up a security related question regarding the recently added functionality...

Who is allowed to update the Command Toolbox commands using the new "Overwrite Setting" button?

I haven't tested it, but if anyone who has the ability to use the Command Toolbox can update the command for ALL users in the system that presents the following security vulnerability:

Scenario & attack:
  • Malicious Tech X is trying to gain access to a server that they do not have access to.
  • Tech X has a legitimate SC account but is prevented from accessing the target server through properly configured SC user roles & session groups.
  • Tech X is allowed to use the Command Toolbox.
  • Tech X modifies an existing multi-line command that is commonly used by other SC users. Tech X appends/inserts commands that create a new local admin account as well as downloads & installs a remote administration tool of their choosing. If they wanted to try & hide their actions a little they could program in some logic into the commands so they only run against the target server.
  • Tech X waits.
  • Tech A who does have access to the target server runs the modified command on the target server as part of regular maintenance.
  • Tech X now has full admin rights to the target server...
  • Tech A would almost undoubtedly be unaware of the malicious changes for two reasons: 1 - The purpose of the Command Toolbox extension is to simplify/automate things & you don't want to have to audit the code before sending it every time. 2 - With the current modal dialog box that pops up on the Host page you can't even see the full text of the commands you are sending without manually expanding the size of the text box.

Mellow

Thoughts...?
KBrownConsulting  
#45 Posted : Wednesday, May 11, 2016 9:37:53 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
As a follow-up thought... if this is indeed a concern, and one that might cause you to consider reversing the changes; instead of losing the feature altogether, maybe there could be an option added to the main Extension options controlling whether or not the "Overwrite Setting" functionality is enabled with a link to an explanation of the security considerations.

(That way people like myself who are essentially a 1-man shop & don't have to worry about this issue can still take advantage of the multi-line capability immediately!) Cool

Edited by user Thursday, May 12, 2016 10:15:40 PM(UTC)  | Reason: Not specified

Scott  
#46 Posted : Friday, May 13, 2016 1:19:41 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Quote:

Would it be possible to update not just the command itself but the name of the command from within the Command Toolbox modal on the Host page? If so, we could just enable ALL commands from the Extension settings page initially (with the unused ones having a name/title of "Unused") & from then on configure/update/add new commands from the Host page. It's ugly & hackish but no more so than the current implementation & does (more or less) solve the problem.


Potentially, I'm not quite sure which is the best route yet. Yesterday we discussed expanding the Extension Setting's definitions to allow authors to define the type of setting (or type of input required). This would mean that I would just say these settings should have a textarea input field and the modal would act accordingly. This route is relatively simple to implement and provides quite a lot of benefit; it could also allow other input elements like SELECT and/or radiobuttons.

Also, I can certainly see where the concern is coming from with regards to your second issue. I guess that since you have to have access to the Extension tab in order to set any extension's settings that requiring Administrator permission to modify them from within the modal seems logical. I'll make sure to add that to the next release of this extension.

Thanks for the feedback!
ScreenConnect Team
KBrownConsulting  
#47 Posted : Friday, May 13, 2016 7:17:39 PM(UTC)
KBrownConsulting


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/11/2014(UTC)
Posts: 69
United States

Thanks: 13 times
Was thanked: 8 time(s) in 5 post(s)
Originally Posted by: Scott Go to Quoted Post
Potentially, I'm not quite sure which is the best route yet. Yesterday we discussed expanding the Extension Setting's definitions to allow authors to define the type of setting (or type of input required). This would mean that I would just say these settings should have a textarea input field and the modal would act accordingly. This route is relatively simple to implement and provides quite a lot of benefit; it could also allow other input elements like SELECT and/or radiobuttons.

That sounds like a great solution! I'd +1 that!


Quote:
Also, I can certainly see where the concern is coming from with regards to your second issue. I guess that since you have to have access to the Extension tab in order to set any extension's settings that requiring Administrator permission to modify them from within the modal seems logical. I'll make sure to add that to the next release of this extension.

Awesome, thanks Scott!


paulrick  
#48 Posted : Wednesday, August 17, 2016 5:57:35 PM(UTC)
paulrick


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 3/9/2011(UTC)
Posts: 109
Location: Lancaster, Pennsylvania

Thanks: 7 times
Was thanked: 2 time(s) in 2 post(s)
Command Toolbox doesn't seem to work in ScreenConnect 6.0.11299.6071. Choose a command and hit Run Command and nothing happens. The window just sits there until you close it and when you check the Commands on the computer nothing was sent to the computer.
Scott  
#49 Posted : Friday, August 19, 2016 2:00:26 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Version 1.45.1 of this extension has been released and works with 6.0 as well as previous versions.
ScreenConnect Team
Scott  
#50 Posted : Monday, September 19, 2016 3:10:15 PM(UTC)
Scott


Rank: Administration

Medals: Level 4: Wise Old Owl! Received 100 Thanks!

Joined: 3/28/2014(UTC)
Posts: 2,420
United States

Thanks: 3 times
Was thanked: 298 time(s) in 256 post(s)
Version 1.46 has been published containing a minor fix for overwriting non-sequentially saved commands.
ScreenConnect Team
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.