Previous Topic: Use a Windows Job Object to Manage Job Processing PropertiesNext Topic: Specifying a Password for a User ID


Access Network Resources

When your agent runs as a Windows service, you can schedule Windows workload that accesses network resources. For example, you can specify UNC names and share names in your job definition.

Usually, when running Windows programs as a service, you are restricted to how you can access data on remote computers. For example, to access data on a remote computer as a specified user ID, you must run the Windows service with that user ID.

With the agent, however, those restrictions do not apply. Instead of running the agent service with a specific user ID, you can specify the user ID with the USER statement in your job definition. To use the USER statement, your agent must run as a Windows service under the local system account (the default configuration).

To access Windows network resources

  1. Verify with your agent administrator that the agent is running as a Windows service under the local system account.
  2. Ask your scheduling manager administrator to define a user ID and password on the scheduling manager that has access to the file on the remote Windows system.
  3. Specify the file name using the CMDNAME statement in the job definition.

    Notes:

  4. Specify the user ID and the domain the user ID belongs to using the USER statement in the job definition.

Notes:

Example: Run a Command on a Remote Server

In this example, the path c:\WINNT\Profiles\Visitor\Desktop\ has the share name MyDesktop. The command notify.cmd is in that path on the CYBNT server. JDOE is a user ID in the CYBDOM domain and has access to the notify.cmd command. JDOE's password is defined on the scheduling manager.

AGENT NT20
CMDNAME \\CYBNT\MyDesktop\notify.cmd
USER CYBDOM\JDOE

Example: Run an Executable in Public Folder on a Remote Server

This example runs calc.exe on the CYBNT server. CYBUSER is a user ID in the CYBDOM domain. CYBUSER is defined on the scheduling manager and has access permission to the public folder.

AGENT NT30
CMDNAME \\CYBNT\public\calc.exe
USER CYBDOM\CYBUSER

Example: Access a Remote Resource Using the C$ Share Name

In this example, drive C is accessed by an administrator over the network through an agent. The agent is running under the System Account option. The agent runs the test application in the c:\working directory on the server CYBNT. The directory c:\working is not a shared resource. The user admin1 is a valid user on both the local and remote computers and belongs to the Administrators group. admin1 is also in the CYBDOM domain.

AGENT NT30
CMDNAME \\CYBNT\C$\working\test
USER CYBDOM\admin1