logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Jhuggins@bluzonepc.com  
#1 Posted : Sunday, February 15, 2015 9:45:00 PM(UTC)
Jhuggins@bluzonepc.com


Rank: Member

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

Joined: 10/31/2014(UTC)
Posts: 14

Was thanked: 2 time(s) in 1 post(s)
Anytime we repair a computer at my shop, we install our branded screenconnect client on it.
Makes life easier for ongoing support and such.

Getting your minions to correctly fillout a session and install it can be.. imaginative.

This VBS script has helped us out at my shop scads.

Code:

Dim strComputerName, hostname, groupname
Dim phonenum, contract, intCaseSensitive
Set wshShell = WScript.CreateObject( "WScript.Shell" )
intCaseSensitive = 1
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )

hostname = InputBox("Computer name?","Set Hostname",strComputerName)

phonenum = InputBox("Phone Number?","","Leave Blank if unknown")

groupname = InputBox("Business Name?","Set Group")

contract = InputBox("Under Contract?","yes or no")

hostname = Replace(hostname, " ", "%20", 1, -1, intCaseSensitive)
phonenum = Replace(phonenum, " ", "%20", 1, -1, intCaseSensitive)
groupname = Replace(groupname, " ", "%20", 1, -1, intCaseSensitive)


wshShell.Run "http://yourscreenconnectsite:8040/Bin/Elsinore.ScreenConnect.ClientSetup.exe?h=yourscreenconnectsite&p=8041&k=YourKeyHere&e=Access&y=Guest&t=" & hostname & "%20" & phonenum & "&c=" & groupname & "&c=" & contract

wshShell.Quit



We have the first C variable filled with the organization the computer belongs to (if applicable) and the second C variable filled with Yes/No are they under contract.

It'll pop 4 questions:
1. Computer Name (pre-filled with the computer's netbios name)
2. Phone number of the client
3. Organization/Business Name
4. Under Contract?

Works fairly well for us, happy to help mod it if someone needs some advice.

Edited by user Wednesday, April 22, 2015 8:28:52 PM(UTC)  | Reason: Key changed to be more obvious.

thanks 2 users thanked Jhuggins@bluzonepc.com for this useful post.
RADRaze2KX on 4/23/2015(UTC), ebell on 6/26/2015(UTC)

meme  
#2 Posted : Wednesday, April 15, 2015 3:44:49 PM(UTC)
meme


Rank: Newbie

Joined: 9/17/2013(UTC)
Posts: 5

Thanks: 4 times
Sorry for my ignorance.
How do I get the public key to enter in the script

Tanks Yon
Jhuggins@bluzonepc.com  
#3 Posted : Wednesday, April 15, 2015 11:16:28 PM(UTC)
Jhuggins@bluzonepc.com


Rank: Member

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

Joined: 10/31/2014(UTC)
Posts: 14

Was thanked: 2 time(s) in 1 post(s)
Originally Posted by: meme Go to Quoted Post
Sorry for my ignorance.
How do I get the public key to enter in the script

Tanks Yon


Download your screenconnect client using Chrome or Firefox.
Right click the entry and select "copy download link"
Paste the link in notepad.

You'll see the information in there, match it up with the URL in the VBS script.
RADRaze2KX  
#4 Posted : Wednesday, April 22, 2015 8:07:31 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
Can you explain what this does on the client side and the server side? How the data is represented?
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
Jhuggins@bluzonepc.com  
#5 Posted : Wednesday, April 22, 2015 8:26:48 PM(UTC)
Jhuggins@bluzonepc.com


Rank: Member

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

Joined: 10/31/2014(UTC)
Posts: 14

Was thanked: 2 time(s) in 1 post(s)
Originally Posted by: RADRaze2KX Go to Quoted Post
Can you explain what this does on the client side and the server side? How the data is represented?


Your question feels 'mu'.
The VBS script here does not represent the data at all - it constructs a URL based on the information you feed it.
This URL is the same one created by Screenconnect when you click the "Add" button next to the Access title.


I will do my best to explain.

This script asks a series of questions, and then collates the information for the creation of a new "Access" client.
Some questions are automatically filled in, but all fields have the option to be changed.

The hostname and the phone number become the name of the computer in Screenconnect, under Access.
The business name becomes the value of CustomProperty1
The Contract data becomes CustomProperty2

This is formatted into a Screenconnect Access URL, and then the URL is fed into the computer's preferred browser.

Screenconnect deconstructs the url, creates the session, and hands the client computer the executable.

Afterdownloading, run the executable and you'll have it all set without having had to log in on the Screenconnect server.
RADRaze2KX  
#6 Posted : Wednesday, April 22, 2015 8:33:07 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
This sounds very handy, as renaming the session from the server every time is somewhat of a time waster. I'll give this a shot, thank you for sharing!
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
SageMajor  
#7 Posted : Wednesday, April 22, 2015 9:53:57 PM(UTC)
SageMajor


Rank: Newbie

Joined: 4/7/2015(UTC)
Posts: 5
United States
Location: CA

This seems really interesting but I can't seem to find my key
With chrome I have it downloaded and when I right click on the downloaeded .exe file I do not see copy download link option. Where is it?

RADRaze2KX  
#8 Posted : Wednesday, April 22, 2015 10:03:39 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
UserPostedImage

Will look like this once copied:
http://YOURHOST:8040/Bin/Elsinore.ScreenConnect.Client.exe?h=YOURHOST.org&p=8041&k=YOUR_KEY_IS_SUPER_LONG&s=ETC...

You want everything between the "K=" and the "&S=" ... you're obtaining this from the "Create Support Session" button on your hosts page, the (+) icon... It'll download the temporary session file... from Chrome, press CTRL+J to go to the downloads page, then right-click the download and "Copy Link Address". Paste it into notepad and copy just the key. You use the key in the script Mr. Huggins provided.
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
SageMajor  
#9 Posted : Thursday, April 23, 2015 8:19:06 PM(UTC)
SageMajor


Rank: Newbie

Joined: 4/7/2015(UTC)
Posts: 5
United States
Location: CA

Thanks for you help. It worked perfect. I did have to remove the wshShell.Quit from the script. Everything else worked
RADRaze2KX  
#10 Posted : Thursday, April 23, 2015 11:13:08 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
Originally Posted by: SageMajor Go to Quoted Post
Thanks for you help. It worked perfect. I did have to remove the wshShell.Quit from the script. Everything else worked


I had to remove wshShell.Quit as well. Thank you for the confirmation.
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
stsanford  
#11 Posted : Monday, June 1, 2015 4:49:56 PM(UTC)
stsanford


Rank: Member

Medals: ScreenConnect Advisor: Focus Group Member

Joined: 5/21/2015(UTC)
Posts: 14
United States

Hi, I've run into this incredibly useful resource, but I'm wondering if there's a way to use this for an unattended client (I believe this is setup for guest use?)
Also, is there a way to populate the organization field? We use that for organizing hosts.

Thanks so much!
RADRaze2KX  
#12 Posted : Monday, June 1, 2015 5:19:42 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
This is for unattended clients. The prompt for "Business Name?" (groupname) will populate the Organization field. I disabled "Under Contract" in my script by commenting the corresponding sections out. If you only use this within the same organization, you can prevent certain prompts and hardcode certain responses.
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
stsanford  
#13 Posted : Monday, June 1, 2015 5:29:15 PM(UTC)
stsanford


Rank: Member

Medals: ScreenConnect Advisor: Focus Group Member

Joined: 5/21/2015(UTC)
Posts: 14
United States

I must have botched something up, I'm getting groupname in the Machine name now. I'll back track and see where I typoed
RADRaze2KX  
#14 Posted : Monday, June 1, 2015 5:45:20 PM(UTC)
RADRaze2KX


Rank: Advanced Member

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

Joined: 5/15/2013(UTC)
Posts: 70
Man
United States
Location: Tempe, AZ

Thanks: 3 times
Was thanked: 4 time(s) in 3 post(s)
Check the order of the script at the end. Machine, phone, group, contract. Make sure your &t and & c's precede the correct variables.
My How-To's:
Restrict A User's Access to Certain Computers: Forum Search (Posts) "25422"
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.