Installing process for “RemoteWrts

TYX Corporation

Productivity Enhancement Systems

 

 

 

 

 

 

Reference

TYX_0051_16

Revision

1.0

Document

DcomWRTS.doc

Date

September 8, 2004

 

 

 

 

 

 

How to remotely control the WRTS


Versions used:

Paws Studio:               1.26.7

Operating System:      Windows 2000 SP4

 

Requirements:

  • Paws developer Studio version 1.10.0 or above.
  • Operating system supporting DCOM (NT4.0 with Sp3 or later, Win2000 or XP)
  • The same version of PAWS Studio needs to be installed on both the server computer and the client computer. Only the server computer needs a valid license.

 

Introduction:

This document will help configuring the environment in order to use the WRTS from a remote location using the operating system settings.

There are two parts to the settings. You need to configure:

  1. The server computer where Paws Studio is installed.
  2. The client machine where your remote client is installed.

 


1         Dcom capability of PAWS RTS (Run Time System):

 

The WRTS (Windows Run Time System) remote usage is made possible via the DCOM (Distributed COM) protocol.

This enables a user to test a program remotely using a client /server and advanced security features of Microsoft DCOM.

Notes:

  1. The WRTS is the only component that has a server that can be run remotely by a client.
  2. As a default Distributed COM is not configured on windows systems, so making use of  WRTS by a remote client is not possible.

1.1      The server system:

The server system is the computer that has Paws Studio installed on it. This installation includes the WRTS with the WRTS server. The WRTS server is registered upon installation.

You have to:

  1. Configure the Operating System to allow remote usage of the WRTS server. We will go over those settings later in this documentation.
  2. Have a full installation of PAWS Studio with a valid license.
  3. Have a valid PAWS Studio project that has been built.

1.2      The client system:

The client system is the computer that has the WRTS client.

You have to:

1.       Have a valid WRTS client. This client should be configured to be able to launch the WRTS server remotely.

2.       Configure the Operating System to allow remote usage of the WRTS server. We will go over those settings later in this documentation.

3.       Install the same version of PAWS Studio that you have on the server computer. However, you do not need to license that version. The reason to install PAWS Studio on this machine is related to registration issues. Those registrations are done during the installation of PAWS Studio.

4.       Have a file with the name of the project and the correct extension: .PAX, or .PAW depending upon your configuration. This project should be located exactly in the same subfolder as it is on the server computer. This is done in order for the client to tell the WRTS server which project to load on the server computer. It is however not necessary to have a complete project. This means that the project on the server computer should be the only one that needs to be built and up to date. The .PAW file on the client does not even need to be a generated by PAWS Studio and can be as simple as an empty text file that has been renamed to <you project name>.paw.

It is assumed that you have a functional WRTS client that can launch the server remotely.

 


1.3      Secure operation of the PAWS RTS Server:

1.3.1 Configuring the Operating System for the server computer:

1.3.1.1         Configuring DCOM settings:

The settings addressed below will have to be configured on the machine where the WRTS is installed. On the machine where you want to run the WRTS server, you will need to follow the steps below:

  • Install Paws Developer Studio on the Server Machine. This will install the WRTS and the WRTS server.

Note: A user doing this would need administrative privileges on the computer to install the software.

  • From the Windows start menu select Start… Run …dcomcnfg :

 

 

  • Select MfcRts from the Applications tab of Distributed COM Configuration Properties dialog
  • Click Properties on the window below:

 

 

  • Select to the Location tab in MfcRts Properties and you will have the following window:

 

 

  • Verify that  Run application on this computer is checked.
  • Switch to the Security tab.
  • Select Use custom access permissions as shown below:

 

 

  • Select Edit within that frame.

 

 

  • The name of the Owner displayed above will differ from the one that you will see in your window. It will be a function of the Operating System Login ID.
  • In the Registry Value Permission window select Add….
  • In the Add Users and Groups dialog select Show Users to see all users in your domain.
  • In order to add a user to the list of users who is allowed to use this COM component, select the user as shown below. In this case, the user we add to the list is bartek:

 

 

  • Press Add.

 

  • If you are done with the list of authorized users, you can press OK on the Add Users and Groups window. You may chose to add more users in your environment, but in our case we will limit ourselves with this one user.

 

 

  • Press OK on the Registry Value Permissions window when done.
  • In the Security tab from the MfcRts Properties window, select Use custom launch permissions.

 

 

·         Select Edit within that frame.

 

 

·         The list of names in the Name: window may be different.

·         In the Registry Value Permission dialog select Add.

·         In the Add Users and Groups window select Show Users to see all users in your domain.

·         Then select a user who would use this COM component remotely.

 

 

·         Press Add to add that user in the list for Add Names:.

 

 

·         Press OK on the Add Users and Groups window when done.

 

 

·         Press OK on the Registry Value Permissions dialog when done.

·         In the MfcRts Properties window, switch to the Identity tab

·         Verify that The Launching User is selected.

 

 

Note: Security concerns could arise with the setting on this page.

·        Selecting interactive user requires that the logged in user on the server machine have permissions to access the COM component as selected in Use custom access permissions on the Security page.

·        In the case where launching user is selected the COM component can be launched even if nobody is logged in.

More information on this is provided by Microsoft …look in the Reference section of this document.

 

·         Press OK on the MfcRts Properties window when done.

·         In the Distributed COM Configuration Properties window, switch to the Default Properties tab.

·         Verify that Enable Distributed COM on this computer is checked.

 

 

·         Press OK to save these settings.

·         Finally Reboot the computer.

1.3.1.2         Folder security issues:

To ensure proper operation by the user from the client computer, you will need to make sure that the security on the folder should not prevent that user to write into the folder where the .paw project is located on the server computer.

  • The following settings are set by default and should allow for that user to have the WRTS server create a file into the folder where the .paw project is located. One of the common files to be written is the PRINTER file that is redirected by default to a FILE.

 

 

·         In the event that the security settings for that folder are one of the following, the user will have the right to read, but not to write into the .paw project folder:

 

 

 

As a consequence, when running the .paw project from the client, you may have an error that looks like this: I/O “PRINTER”, COM error, …

 

 

More errors related to security are possible and it is not possible to cover them all. This section should however allow you to be sensitized to the subject and in the event of a problem, for you to look into the sharing and security issues associated to the folder where the .paw project is located.

1.3.2 Installation of Paws Studio:

·         We need to have an installation of the TYX Paws Developer Studio. The version we used for the document is 1.26.7.

·         You need to have a valid license for the WRTS.

·         After installing all the above, you can verify that:

    1. The WRTS can be started.

 

If you are having problems with the step above, you need to work on those problems before you can proceed with the client computer. Please refer to the proper documentation to troubleshoot those issues.

1.3.3 Presence of Built Paws project:

·         You will need to have a valid project that has been built.

·         You should verify that:

1.       You can load the project from the WRTS.

2.       Run the project that you want to run from the client computer without unexpected problems.

 

If you are having problems with either one of the steps above, you need to work on those problems before you can proceed with the client computer. Please refer to the proper documentation to troubleshoot those issues.

 

 


1.4      Setting up the CLIENT computer:

1.4.1 WRTS client:

It is assumed that you have a client that can launch the WRTS remotely.

The difference between a client that can launch the WRTS locally and remotely is in the API call Attach:

·         For a client launching a local WRTS server, the parameter can be empty.

For example, we have the following C/C++ code:

// attach tpsserver to wrts

hr = m_pTpsServerEx->Attach();

 

·         For a client launching a remote WRTS server, the parameter has to include the IP of the computer that the WRTS server is located on.

For example, we have the following C/C++ code:

// attach tpsserver to wrts remotely

hr = m_pTpsServerEx->Attach(CComVariant(“192.168.0.57”));

where 192.168.0.57 in this example is the IP of the computer running the WRTS server. You will need to use the IP of your WRTS server computer in the code for your client.

There are tutorials for WRTS clients on the www.tyx.com website.

In those tutorials you will need to make the changes addressed above regarding the Attach API.

 

In this documentation, we will be using an HTML client as we’ll see later on this documentation.

1.4.2 Configuring the Operating System:

  • From the Windows start menu select Start|Run|dcomcnfg :

 

 

  • Switch to the Default Properties page of the Distributed COM Configuration Properties dialog.
  • Verify Enable Distributed COM on this computer is checked.
  • Switch the Default Authentication Level from Connect to None.
  • The window should now look like this:

 

 

 

  • Press OK to save these settings. You don’t need to reboot.

1.4.3 Installation of Paws Studio:

You need to install the same version of PAWS Studio that was installed on the server computer. A different version may prevent you from being able to run the WRTS server from the client successfully.

 

The main reason to do this is associated to the files that get registered during the installation of PAWS Studio.

 

è You therefore do not need to have a valid license for this installation, even if having one is not a source of problems.

1.4.4 PAWS file on your client:

You will need two things:

  1. A file that has the same name and extension as the one you intend to use on the server computer. If the file on your server computer is a real file generated by Paws Studio such as a .paw or a .pax file, the one on your client machine can be a file of any type that has been renamed to be the same as the one on your server computer.

For example: if you intend to run a project called Beep.paw, you will need a file called Beep.paw on you client computer, even if it is an empty text file, such as untitled.txt, that you renamed to Beep.paw.

This will allow the client to have a file to target when choosing a project to load. You will be loading this pretend project file on your client machine and the WRTS server will  load the real paws project file on the server machine. You can see that file on the client machine as being some sort of image file.

  1. That file has to be located in the same folder on your client computer, as you would expect to find on your server computer.

For example: if the Beep.paw project is located on the server computer under C:\usr\tyx\src\IEEE71689\Beep, you will have to have the same path on your client computer and place the “pretend” Beep.paw file in that folder. You will then have the following file on your client computer C:\usr\tyx\src\IEEE71689\Beep\Beep.paw. This is all that you will need. You won’t need any other files on your client computer. You will however have a complete project in that location on your server machine that has also been built.

1.5      Running the WRTS from the client:

  • We will be running a version of the HTML client that enables the possibility to launch a remote WRTS server. The file we will use is RtsControl.htm. Some versions that are part of the PAWS Studio distribution may be different and not offer the ability to connect to a remote WRTS server.
  • With the correct version of RtsControl.htm, you need to make a few changes in the content of that file. Namely, you need to add the IP address of your server computer in the right place. In the block:

<SELECT id=selHost name=selHost size=3

                 style="HEIGHT: 80px; LEFT: 40px; POSITION: absolute; TOP: 30px; WIDTH: 140px">

                <OPTION value="" selected>Local</OPTION>

                <OPTION value="MACHINE_A">Machine A</OPTION>

                <OPTION value="MACHINE_B">Machine B</OPTION>

                <OPTION value="MACHINE_C">Machine C</OPTION>

</SELECT>

you need to replace “MACHINE_A” with the IP address that you want to use associated to the WRTS server machine and Machine A with the correct description. You will have the following line instead:

<OPTION value="192.168.100.109">Server Computer</OPTION>

where you will want to adjust the IP address to what is relevant in your case.

 

Note: Obtaining the Server Machine’s IP Address:

·         On the server machine, open a Command Window.

·         Execute command ipconfig /all

Note the IP Address of the Server Computer.

Example: IP Address. . . . . . . . . . . . : 192.168.100.109 as can be seen from the following window:

 

Now you need to save the changes and you are ready to use the HTML client.

  • To use the client, we need to drag the RtsControl.htm file into Microsoft Internet Explorer. This HTML client does not work with Netscape. You will see something like this:

 

·         In the RTS Server Host window, select Server Computer.

·         Press ATTACH.

 

           

 

·         If all goes well, you should see the LOAD button become active. If not, you will need to go over the steps above again and verify that your client is suited to run a remote WRTS server.

·         At this point, you need to press LOAD and select the pretend .paw file that is located exactly in the same folder on your client computer as it is on your server computer. In our case, we will load C:\usr\tyx\src\IEEE71689\Beep\Beep.paw.

 

·         We are now ready to run the project.

·         If you press Run, the project will be running on the server machine.

 


2         Appendix: Steps to ensure that remote access of WRTS Server is turned off:

  • From the Windows start menu select Start|Run|dcomcnfg:

 

 

  • Switch to the Default Properties page of the Distributed COM Configuration Properties dialog.
  • Select MfcRts from the Applications tab of Distributed COM Configuration Properties dialog and click on Properties.

 

 

  • Switch to the Security tab.
  • Verify that Use Default access permissions is selected.
  • Verify that Use Default launch permissions is selected.

 

 

  • Press OK.
  • Then on the Distributed COM Configuration Properties switch to the Default Security tab.

 

  • Within the Default Access Permissions frame, click on Edit Default.

 

 

  • Verify that only intended users are given default access permissions.
    • If unintended users exist, select them and click Remove to restrict access.
  • Press OK to save these settings.
  • Within the Default Launch Permissions frame, click on Edit Default.

 

 

  • Verify that only intended users are given default access permissions.
    • If unintended users exist, select them and click Remove to restrict access.

Note: It is ok to allow INTERACTIVE, SYSTEM and Administrators to have access and launch permissions.

  • Press OK to save these settings.
  • Press OK on the Distributed COM Configuration Properties dialog to save all settings.
  • Finally Reboot the Client Computer.
  • You can then verify that your WRTS client on the client machine cannot launch the WRTS server on the server machine.

3         References:

Using DCOM Config (DCOMCNFG.EXE) on Windows NT & Windows 2000 Systems.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;176799

 

***