|

Setup and Run PowerSync Server
as an NT Service
PowerSync Server contains two executable
files. One is the engine ( pwrsync.exe ) and the other is
the scheduler (pssched.exe ). Using the Microsoft utilities
SRVANY.EXE and INSTSRV.EXE you can run pssched.exe as an NT
Service. It will then call the engine as required. This will
provide the following advantages to the user.
- Allows the program to survive Logoff / Logon sequences
saving the overhead of stopping and starting the program.
- Allows the program to service requests when no users
are logged on.
- Allows the program to perform tasks in an account other
than the currently logged on user account.
- Once defined, a service rarely requires attention.
The steps to setup pssched.exe to run as
an NT service are defined below.
Important Note for All PowerSync RTS Users
The service must be set to Automatic startup, the shortcut
to pssched.exe must be removed from the startup folder
and the system restarted at the end of this procedure.
After the restart, pssched.exe will be running as a service.
It is very important that you never run pssched.exe as
an application again. If you do, the service will become
unreliable and errors will occur. An example of how this
might occur is that the user stops the pssched.exe service,
and starts pssched.exe up as an application from the Programs
menu (Auto-Sync). After some period of time the user exits
the instance of pssched.exe running as an application and
restarts the service. Random errors will now occur because
pssched.exe must never have run as an application since
the last system restart if it is to run reliably as a service.
End of Note for All PowerSync RTS Users
Important Note for PowerSync 4.X Users
After Auto-Sync™
is set up to run as a service the Icon will not appear in
the tray. When you create and save a new Auto-Sync™, or
edit and save an existing one, the Icon will now appear
in the
tray. You must double click the Icon to open the Auto-Sync
window and from the File Menu select Exit. This will remove
the Icon from the tray. This procedure is necessary because
whenever the Icon appears in the tray you have two instances
of Auto-Sync running. One is running as the background
service and the other is running as an application. The
Icon in the
tray is the application instance and must be closed.
End of
Note for PowerSync 4.X Users
Warning: This procedure should only
be attempted by a person that is completely familiar with
modifying the NT Registry. You can destroy the operating system’s
ability to restart!
Files
SRVANY.EXE ( Required )
INSTSRV.EXE ( Required )
SRVANY.WRI ( Tutorial )
These files are included in the NT Resource
Kit and are available on the Internet.
Before Starting: Close Auto-Sync (in the
tray) and remove the Shortcut to it from your Startup folder.
The path to the Startup folder will depend
on the version of PowerSync you are using.
If drive C is not the system drive, replace
C with correct drive lette
For version 4.X, it will be:
C:\WINNT\Profiles\Administrator\Start Menu\Programs\Startup
For Version 5.X, it will be:
C:\ WINNT\Profiles\All Users\Start Menu\Programs\Startup.
Procedure
(This procedure assumes PowerSync is installed
in the C:\pwrsync directory. )
- Make the directory C:\Tools
- Copy SRVANY.EXE and INSTSRV.EXE into the C:\Tools directory.
- Go to the DOS Command Console prompt and transfer to
the C:\Tools directory
- Enter the following command: INSTSRV ASync C:\Tools\SRVANY.EXE
- Exit the DOS Command Console.
- Go to Start – Run and enter REGEDT32. Click OK
- In REGEDT32, navigate to the sub-key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\ASync
- Double-click the sub-key ASync and leave it highlighted.
(Selected)
- Choose EDIT from the menu and select ADD KEY.
- The Add Key dialog box will be displayed. In the Key
Name text box enter Parameters. No entry is required in
the Class text box. Click OK.
- Highlight the Parameters sub-key, choose EDIT and select
Add Value.
- In the Add Value dialog box, enter Application in the
Value Name text box. From the Data Type list box select
REG_SZ. Click OK. The String Editor Dialog box will open
up. Enter the following: C:\pwrsync\pssched.exe Click OK
- With the Parameters sub-key still selected, choose EDIT
and Add Value. In the Add Value dialog box enter AppDirectory
in the Value Name text box. From the Data Type list box
select REG_SZ. Click OK. The String Editor Dialog box will
open up. Enter the following: C:\pwrsync Click OK
Note: This completes the modifications to the Registry.
Close Regedt32.
- Go to the Control Panel and double-click Services. Scroll
to the ASync line and double-click it. A dialog box will
open up. If the server that you are setting this service
up on and all the servers that you will synchronize with
or replicate to or from are in the same domain, follow procedure
A. If they are in different domains follow procedure B.
Procedure A
"Startup Type" Set to Automatic
"Log On As" Set to System Account
"Allow Services to Interact with Desktop" Do not
check this option.
Procedure
B
Create a new account in the domain where PowerSync is executing
and in all domains that you will synchronize with or replicate
from or to. These new accounts must have the same user name
and password in all domains. Additionally they must be in
the administrator group and have the full privileges of that
group.
"Startup Type" Set to Automatic
"Log On As" Set to This Account (Use the new account
you just created)
"Allow Services to Interact with Desktop" Do not
check this option
Click OK
Close the Services Applet and the Control
Panel.
Edit all Auto-Syncs and check "Run Minimized" and
"Quit when sync complete." All "Confirmations"
should be unchecked for automatic operation.
Restart your System
You should now be able to run Auto-Sync
as a service on your Windows NT 4.0 Server.
Remove A
Service
To remove the
service created above, perform the following steps.
- Go to the Control Panel and double click Services.
- Scroll down to ASync and select it. Click Stop.
- Close Services and the Control Panel
- Go to a DOS Command Console prompt and transfer to C:\Tools.
- Enter the following command: INSTSRV ASync REMOVE
- Add a Shortcut to C:\pwrsync\pssched.exe to your Startup
directory.
Restart your
System
|