Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Remote Assistance w/o Permission

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,50614
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> Remote Assistance w/o Permission
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1] 2   next >   >>
Login
Message << Older Topic   Newer Topic >>
 Remote Assistance w/o Permission - 8/11/2007 10:37:47 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
Here is a script that allows you to connect to a user's machine and start a Remote Assistance session without the user having to interact with the connection initialisation procedure. Sounds naughty but you have to be a local admin of the target machine and that machine has to have it's firewall off etc, i.e. a corporate domain environment.

About 10% of the time it fails to connect and it copies some modified operating system files to the target client first. Get modified files here. RA.ZIP


I don't use this script anymore because we use SMS remote control or Dameware which also kicks you straight into a remote control session, but someone may find this script useful or make it better. Read script comments before running it, have fun.


      

< Message edited by Meg -- 9/26/2007 12:15:06 AM >
 
 
Revisions: 2 | Post #: 1
 
 RE: Remote Assistance w/o Permission - 8/12/2007 12:05:06 AM   
  itismike

 

Posts: 42
Score: 0
Joined: 7/7/2007
Status: offline
Hi Meg,

Yes, I find this very interesting indeed! I will probably incorporate this into my script after I get my script to run a bit more reliably.

I had an earlier version that I wrote before I learned how to use subroutines and functions, and for some reason it works more consistently than the script I posted here. Still have some debugging to do!

I have to admit that I got a little confused reading the nested if-then statements so I took the liberty of adding indentation and was wondering if I interpreted it correctly:


      

I just had trouble following the logic of the above. Would this satisfy what the above intended?

      

(in reply to Meg)
 
 
Post #: 2
 
 RE: Remote Assistance w/o Permission - 8/12/2007 1:51:13 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
Sorry that part of the script is a bit messy where the command line variable passed is yes or no, what I have done is converted it to 6 or 7 which is the same as the output from the msgbox and then apply logic to it.
You could trim this part of the script down by not even asking the question, i.e. running a normal RA session or the special one always.
The command line variable passing part of the script can be removed completely to make it simpler to follow.

My logic
1. Check if 1st cmd line variable is passed to script (computer name).
2. If "" (nothing is passed) then prompt for a computer name
3. Check if a file on the remote computer specified is there
4. No file found - report target computer is off - quit
5. Yes file found - check if 2nd cmd line variable was passed to script (connection method)
6. If "" (nothing is passed) then prompt for connection method YES or NO
7. connection method normal - "YES" specified - launch Remote assistance without copying SZY's files.
8. Connection method new -No permission required - "NO" specified -
9. Copy SZY's files to client
10.Launch Remote assistance
11.60 seconds later copy MJP's copy of the original files back.
12.quit

(in reply to itismike)
 
 
Post #: 3
 
 RE: Remote Assistance w/o Permission - 8/13/2007 12:54:12 PM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
I would use something else like AutoIT to replace the RALaunch Sub, but besides that, this is a slightly cleaned up version. (untested)

command line:
RAScript.vbs /computer:Computer1 /ranormal:yes
or
RAScript.vbs /computer:Computer1 /ranormal:no


      

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Meg)
 
 
Post #: 4
 
 RE: Remote Assistance w/o Permission - 8/13/2007 2:16:55 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
Thanks dm_4ever,

That's heaps better. I tried it and after adding the scriptpath function back in because the copy function was failing, it works better than mine.

Here is your version with that fix,


      

It connects more reliably and is easier to understand.

(in reply to dm_4ever)
 
 
Post #: 5
 
 RE: Remote Assistance w/o Permission - 8/13/2007 3:06:08 PM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Glad to help a bit.

This is another way to get the current path

Function ScriptPath
   ScriptPath = Replace(WScript.ScriptFullName, _
                                      WScript.ScriptName, "")
End Function

I mentioned to itismike in another post and you that I would use AutoIT for the RALaunch Sub because it is more powerful when waiting for a window and setting focus to it.

I took a script similar to this and converted it to an .exe using the editor that comes with AutoIT so that it can run on any machine.  The script then executes this .exe passing the computer name as a parameter before this line:  objShell.run "hcp://CN=Microsoft%20CorpoRAtion,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm"

AutoIT code

      

i.e.
objShell.Run "C:\scripts\RAHelper.exe " & strComputer
WScript.Sleep 2000
objShell.run "hcp://CN=Microsoft%20CorpoRAtion,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm"

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to Meg)
 
 
Post #: 6
 
 RE: Remote Assistance w/o Permission - 8/14/2007 9:11:32 AM   
  rothgar

 

Posts: 4
Score: 0
Joined: 8/14/2007
Status: offline
Does anyone else get an error when running the script?

The error I get is

Script: C:\remoteassistance.vbs
Line: 85
Char: 1
Error: 0x80041002
Code: 80041002
Source: (null)

This looks like a great tool for me as a computer tech but I can't get it to work.  Any help would be great!

Thanks

(in reply to dm_4ever)
 
 
Post #: 7
 
 RE: Remote Assistance w/o Permission - 8/14/2007 10:15:21 AM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
What's line 85 for you?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to rothgar)
 
 
Post #: 8
 
 RE: Remote Assistance w/o Permission - 8/14/2007 10:23:38 AM   
  rothgar

 

Posts: 4
Score: 0
Joined: 8/14/2007
Status: offline
It looks like the call for remote assistance.

shell.run "hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm"


OH WAIT...it is different in vista.  Let me try it on XP

(in reply to dm_4ever)
 
 
Post #: 9
 
 RE: Remote Assistance w/o Permission - 8/14/2007 12:27:07 PM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
Yeah, on Vista they actually have an EXE which can be used via the command line to pass various options.... wish they had that on WinXP....it would make RemoteAssistance so much easier to script.

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to rothgar)
 
 
Post #: 10
 
 RE: Remote Assistance w/o Permission - 8/14/2007 2:43:59 PM   
  rothgar

 

Posts: 4
Score: 0
Joined: 8/14/2007
Status: offline
In xp it ran for me and prompted the user to allow me to connect but it never went all the way through :(

I have a feeling it is some setting on our network that is causing problems and not the program itself.  My work network is pretty jacked up. :(

If the user on the other end clicks yes it just fails every time.

(in reply to dm_4ever)
 
 
Post #: 11
 
 RE: Remote Assistance w/o Permission - 8/14/2007 9:27:39 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
Hi rothgar,

I read on your site that you use Norton AV, we use Mcafee and firewall's off, so that might be a hint?

If you can run Remote Assistance via the normal traditional way then there is no reason why remote assistance would not work via this script as basically all it does is launch the remote assistance page, punch in the machine name and press go.

Regarding the hacked version of remote assistance, try manually copying the files to a test machine and then run remote assistance via the normal traditional way. If that does not work and future windows security updates could break it, I can't suggest anything as I was just given the modified files, I am not sure what is different about them that makes them special.

I did notice today however that when I connected to a users machine using the script, If you press "Take Control" too quick it doesn’t work. Maybe the files are still finishing copying or the system needs to settle for a few seconds before pressing that button.?


(in reply to rothgar)
 
 
Post #: 12
 
 RE: Remote Assistance w/o Permission - 8/14/2007 9:48:30 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
The dude on this site describes how to edit your own Remote Assistance files in order to make the remote client auto accept a connection. http://www.lewisroberts.com/?p=40 

(in reply to Meg)
 
 
Post #: 13
 
 RE: Remote Assistance w/o Permission - 8/15/2007 10:56:24 AM   
  rothgar

 

Posts: 4
Score: 0
Joined: 8/14/2007
Status: offline
thanks for the tip.  I was going to copy the modified files over to the client machine but where do I copy them to?

(in reply to Meg)
 
 
Post #: 14
 
 RE: Remote Assistance w/o Permission - 8/19/2007 2:18:44 PM   
  Meg


Posts: 123
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
quote:

ORIGINAL: rothgar

thanks for the tip.  I was going to copy the modified files over to the client machine but where do I copy them to?


Hi rothgar,
Run the script from the same directory as where you extracted my Yes and No folders from the zip you downloaded.
The path to the where the modified files get copied to is in the script if you want to manually copy them.

But to clarify:
According to the link in my last post, it appears that there are only two files that need modifying.
C:\WINDOWS\pchealth\helpctr\System\Remote Assistance\helpeeaccept.htm
C:\WINDOWS\pchealth\helpctr\System\Remote Assistance\Interaction\Server\TakeControlMsgs.htm
 
I have tested this and all you need are the two files modified as per Lewis Robert's http://www.lewisroberts.com/?p=40 instructions.

Here is a link to the files (just the two) which I have modified myself.
RA.ZIP

These files work much better than the ones I posted earlier.
If the link stops working, follow Lewis's tutorial and modify your own copies.

< Message edited by Meg -- 9/26/2007 12:16:40 AM >

(in reply to rothgar)
 
 
Revisions: 3 | Post #: 15
 
 RE: Remote Assistance w/o Permission - 9/23/2007 6:18:13 PM   
  Aforb

 

Posts: 4
Score: 0
Joined: 9/20/2007
Status: offline
I know this isn't as fun as scripting it yourself, but I found a neat little app that does exactly this the other day.

GenControl - and I hope this isn't included as spamming. I just thought you all might want to have a look seeing as though it's remote assistance and all.

Cheers,
Reece.

_____________________________

Just another newbie...

(in reply to Meg)
 
 
Post #: 16
 
 RE: Remote Assistance w/o Permission - 9/23/2007 10:51:01 PM   
  ginolard


Posts: 1012
Score: 21
Joined: 8/10/2005
Status: offline
Holy Cow...that GenControl tool is just a little TOO powerful....

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to Aforb)
 
 
Post #: 17
 
 RE: Remote Assistance w/o Permission - 9/24/2007 8:33:26 AM   
  Aforb

 

Posts: 4
Score: 0
Joined: 9/20/2007
Status: offline
Creating it's own terminal service without authentication and no notofication on host PC.

Yeah, I guess it is ;) But it only works over a domain, not workgroup, and has difficulty finding some hosts.

[Edit: Spelling]

(in reply to ginolard)
 
 
Post #: 18
 
 RE: Remote Assistance w/o Permission - 10/11/2007 12:09:00 PM   
  Rischip


Posts: 393
Score: 2
Joined: 3/26/2007
Status: offline
All it is, is TightVNC with remote installation. My software does that, just not quite as eligantly.
But then again, mine is scriptable, and be scripted to connect to all pc's in a domain sequentially.

_____________________________

Rischip
Author of - The Grim Linker

(in reply to Aforb)
 
 
Post #: 19
 
 RE: Remote Assistance w/o Permission - 1/21/2008 6:27:48 AM   
  twilliamsen

 

Posts: 184
Score: 0
Joined: 1/18/2007
Status: offline
Meg.

Very interesting concept....  I am looking at using this piece of interesting code with my current HTA... 

But, I keep getting this:

Machine is not accessible, ie does not appear to be turned on. 

Firewalls are not on...  I can ping the machine.

and I can open this directly from the run box

\c$\WINDOWS\PCHealth\HelpCtr\System\Remote">\\<strComputerName>\c$\WINDOWS\PCHealth\HelpCtr\System\Remote Assistance\helpeeaccept.htm

I did find a little error with the directory above, there is a space between "Remote" and "Assistance"  I changed it will triple quotes, but do not know if that is the issue yet or not.

(in reply to Rischip)
 
 
Post #: 20
 
 
Page:   [1] 2   next >   >>
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> Remote Assistance w/o Permission Page: [1] 2   next >   >>
Jump to: