Re: how to offer remote support not throu port 3389
- From: "Mark L. Ferguson" <marfer_mvpREMOVE@xxxxxxxxxxx>
- Date: Fri, 2 Sep 2005 07:03:54 -0500
This might help you get it done
<!--
* Copy paste this file as unsolicitedrctest.htm in
%windir%\PCHEALTH\HELPCTR\System
* You will need to type the following in start-run
* %windir%\PCHEALTH\HELPCTR\Binaries\HelpCtr.exe -url
hcp://services/centers/support?topic=
hcp://system/unsolicitedrctest.htm
-->
<HTML>
<HEAD>
<TITLE></TITLE>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY topMargin="0">
<OBJECT id="oSAFClassFactory" height="0" width="0"
classid="CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7"
VIEWASTEXT>
</OBJECT>
<P> </P>
<P> </P>
<P align="center"><FONT face="Times New Roman"
size="5"><STRONG>Unsolicited Remote Control
Unittest</STRONG></FONT></P>
<TABLE>
<TR>
<TD><I size="20"> Enter Server Name to invoke
</I><B>ConnectRemoteDesktop </B><INPUT name="ServerName"
id="ServerName" style="WIDTH: 310px; HEIGHT: 20px"
size="40"> </TD>
</TR>
<TR>
<TD><BUTTON id="Button1" onclick="RunScriptAPIs()"
name="RunScriptAPIs"
type="button">RunScriptAPIs</BUTTON></TD>
</TR>
</TABLE>
<!--
*
*
-->
<SCRIPT Language="JScript">
var oSAFRemoteDesktopConnection = null;
var oSAFRemoteConnectionData = null;
var oUsersCollection = null;
var oSessionsCollection = null;
var RemConnectionParms = null;
function RunScriptAPIs()
{
try
{
// Create an object of SAFRemoteDesktopConnection
oSAFRemoteDesktopConnection =
oSAFClassFactory.CreateObject_RemoteDesktopConnection();
if (oSAFRemoteDesktopConnection != null)
{
// Connect to the remote desktop given by ServerName
oSAFRemoteConnectionData =
oSAFRemoteDesktopConnection.ConnectRemoteDesktop
(ServerName.value);
//
// Get the count for users that are logged on
// and their UserName and DomainName
//
// Get the collection of all the logged on
// users on the Server, novice, machine
oUsersCollection = oSAFRemoteConnectionData.Users();
// List the UsersCollection's details.
var nUsersLen = oUsersCollection.Count;
// For each user, display the UserName and DomainName
for(i=1; i<= nUsersLen; i++)
{
oUserObj = oUsersCollection.item(i);
// Use the ISAFUser.UserName and
// ISAFUser.DomainName properties
alert("Index : " +i+" UserName : "
+oUserObj.UserName+"DomainName : "
+oUserObj.DomainName);
}
//
// Get the UserName, DomainName, SessionID,
// SessionState for all the sessions for all
// logged on users
//
// Get all the sessions for all logged on
// users on the remote, server, machine.
oSessionsCollection =
oSAFRemoteConnectionData.Sessions();
// List the SessionsCollection's details.
var nSessionsLen = oSessionsCollection.Count;
// Display the UserName, DomainName,
// SessionID, SessionState
// for each of the session collection objects.
for(i=1; i<= nSessionsLen; i++)
{
oSessionObj = oSessionsCollection.item(i);
// ISAFSession.UserName, ISAFSession.DomainName,
// ISAFSession.SessionID and
// ISAFSession.SessionState
alert("Index : " +i+" UserName : "
+oSessionObj.UserName+" DomainName : "
+oSessionObj.DomainName+" SessionID "
+oSessionObj.SessionID+" SessionState "
+oSessionObj.SessionState);
}
//
// Using the ServerName, UserName, DomainName and
// SessionID call ConnectionParms() to
// get the ticket in RemConnectionParms.
//
oSessionObj = oSessionsCollection.item(1);
RemConnectionParms =
oSAFRemoteConnectionData.ConnectionParms(
ServerName.value, oSessionObj.UserName,
oSessionObj.DomainName,
oSessionObj.SessionID, "");
alert("SUCCEEDED : ConnectionParms"
+RemConnectionParms);
// This call will cause an error in XP,
// but will work on Server2003
// fConnected =
// oSAFRemoteConnectionData.ModemConnected
// (ServerName.value);
// alert("ModemConnected = "+fConnected);
alert("Successfully called all the APIs. \n GoodBye");
}
} catch(e)
{
alert("RunScriptAPI() threw an exception : "
+e.description);
}
}
</SCRIPT>
</BODY>
</HTML>Offering Remote Assistance (PC Health Technical Articles):
http://msdn.microsoft.com/library/en-us/dnpchealth/html/remoteassistanceapi.asp-- Mark L. FergusonFAQ for Windows Antispy
http://www.geocities.com/marfer_mvp/FAQ_MSantispy.htm<schnellemail2@xxxxxx> wrote in message
news:1125659102.722443.185140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi Mark,
>
> thanks for responding. Could you or somebody else tell me how to handle
> the WshRemote object to create remote support invitation? And if it
> should be possible in WHS then it should be possible in VB6, too, what
> I prefer.
>
> Meik
>
>> Remote scripting will probably allow you to remotely issue an invite from the client
>>
>> http://msdn.microsoft.com/library/default.asp?URL=/library/en-us/dnclinic/html/scripting11132000.asp
>> "WSH 5.6 ships with a new object, WshRemote, that is designed to do exactly this. The WshRemote object model provides an execute
>> method that will run a WSH script on a remote Windows machine."
>
.
- Follow-Ups:
- Re: how to offer remote support not throu port 3389
- From: schnellemail2
- Re: how to offer remote support not throu port 3389
- References:
- Re: how to offer remote support not throu port 3389
- From: Mark L. Ferguson
- Re: how to offer remote support not throu port 3389
- From: schnellemail2
- Re: how to offer remote support not throu port 3389
- Prev by Date: Re: Screensavers
- Next by Date: Re: I would realllllllly appreciate some help
- Previous by thread: Re: how to offer remote support not throu port 3389
- Next by thread: Re: how to offer remote support not throu port 3389
- Index(es):