summaryrefslogtreecommitdiff
path: root/BUILD/Help/html/advanced/RunAsService.html
blob: 499d0d4d78d17831efb331f30adb620da080c0a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE></TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0  (Win32)">
	<META NAME="CREATED" CONTENT="20091206;16574000">
	<META NAME="CHANGED" CONTENT="20100420;20042700">
	<META NAME="Info 1" CONTENT="">
	<META NAME="Info 2" CONTENT="">
	<META NAME="Info 3" CONTENT="">
	<META NAME="Info 4" CONTENT="">
	<STYLE TYPE="text/css">
	<!--
		@page { margin: 2cm }
		P { margin-bottom: 0.21cm }
		H3 { margin-bottom: 0.21cm }
		H3.western { font-family: "Arial", sans-serif }
		H3.cjk { font-family: "MS Mincho" }
		A:link { so-language: zxx }
	-->
	</STYLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H3 CLASS="western"><FONT FACE="Tahoma, sans-serif">Run RealtimeSync
as a Service <SPAN STYLE="font-weight: normal">(Windows only)</SPAN></FONT></H3>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The
following step-by-step guide describes how to setup RealtimeSync (or
any other application) as a Windows Service. This can be useful if
the tool shall run on a SYSTEM account without necessarily requiring
a user to log in.</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">1. Get
access to the command-line tools &quot;</FONT><FONT FACE="Courier New, monospace">instsrv.exe</FONT><FONT FACE="Tahoma, sans-serif">&quot;
and &quot;</FONT><FONT FACE="Courier New, monospace">srvany.exe</FONT><FONT FACE="Tahoma, sans-serif">&quot;
which come with the Windows Server 2003 Resource Kit Tools:</FONT></P>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Download:
<A HREF="http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en</A></FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">2.
Create and register a new Service via command line:</FONT></P>
<UL>
	<P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen4" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
		<FONT FACE="Courier New, monospace">instsrv &lt;ServiceName&gt;
		&lt;PathToResourceKit&gt;\srvany.exe</FONT></P>
	</SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_4f230a46.jpg" NAME="Grafik9" ALIGN=BOTTOM WIDTH=430 HEIGHT=107 BORDER=0></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">3. Link
the new Service with RealtimeSync:</FONT></P>
<UL>
	<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Open
	the Registry editor (Regedit.exe) and navigate to key
	&quot;</FONT><FONT FACE="Courier New, monospace">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\&lt;ServiceName&gt;</FONT><FONT FACE="Tahoma, sans-serif">&quot;</FONT></P>
	<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
	a new key &quot;</FONT><FONT FACE="Courier New, monospace">Parameters</FONT><FONT FACE="Tahoma, sans-serif">&quot;.<BR><IMG SRC="bf02de4e-7b45-4353-97e8-85b55cff3ac5.jpeg" NAME="Grafik8" ALIGN=BOTTOM WIDTH=249 HEIGHT=101 BORDER=0></FONT></P>
	<LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Add
	a new String value named &quot;</FONT><FONT FACE="Courier New, monospace">Application</FONT><FONT FACE="Tahoma, sans-serif">&quot;
	and specify a command line that shall be executed as value.<BR><IMG SRC="RunAsService_html_m3be0f332.jpg" NAME="Grafik10" ALIGN=BOTTOM WIDTH=620 HEIGHT=58 BORDER=0></FONT></P>
</UL>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">That's
it!</FONT></P>
<P STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen1" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
	<FONT FACE="Tahoma, sans-serif"><B>Attention:</B><BR>When running
	RealtimeSync as a service the application has no means to interact
	with the user. Therefore any popup dialog will stop the process
	flow! Consequently consider the following rules when setting up a
	FreeFileSync batch job:</FONT></P>
	<UL>
		<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Enable
		checkbox &quot;<I>Silent mode</I>&quot; to prevent showing a status
		dialog at the end of the process.</FONT></P>
		<LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">Set
		&quot;<I>Error handling</I>&quot; to either &quot;<I>Exit
		instantly</I>&quot; or &quot;<I>Ignore errors</I>&quot;.</FONT></P>
	</UL>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">The new
service can now be started via commandline or Windows Service
administration:</FONT></P>
<UL>
	<P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen5" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
		<FONT FACE="Tahoma, sans-serif">net start &lt;ServiceName&gt;</FONT></P>
	</SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="17e8fbfe-a994-4860-abaa-e00e0289b44c.jpeg" NAME="Grafik5" ALIGN=BOTTOM WIDTH=640 HEIGHT=55 BORDER=0><BR>&nbsp;<BR><IMG SRC="7aa44556-38dc-467e-9902-2c9143cd0116.jpeg" NAME="Grafik1" ALIGN=BOTTOM WIDTH=548 HEIGHT=291 BORDER=0></P>
</UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><SPAN ID="Rahmen7" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: 1px solid #000080; padding: 0.05cm; background: #ccccff">
	<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
	<FONT FACE="Tahoma, sans-serif"><B>Note:</B><BR>By default the
	service is created with startup type &quot;automatic&quot; which
	runs it on Windows start. This behavior can be changed in Windows
	Service administration.</FONT></P>
</SPAN><BR CLEAR=LEFT><BR>
</P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><IMG SRC="RunAsService_html_m3e56d901.jpg" NAME="Grafik6" ALIGN=BOTTOM WIDTH=410 HEIGHT=468 BORDER=0></P>
<P STYLE="margin-left: 1.46cm; margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P STYLE="margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">If the
Service shall be removed from the system, enter via command line:</FONT></P>
<UL>
	<P STYLE="margin-right: 0.98cm"><SPAN ID="Rahmen6" DIR="LTR" STYLE="float: left; width: 80%; height: 0.14cm; border: none; padding: 0cm; background: #e6e6e6">
		<P ALIGN=LEFT STYLE="margin-left: 0.79cm; margin-right: 0.98cm; margin-bottom: 0cm">
		<FONT FACE="Tahoma, sans-serif">instsrv &lt;ServiceName&gt; remove</FONT></P>
	</SPAN><BR CLEAR=LEFT>&nbsp;<BR><IMG SRC="RunAsService_html_68e0fe53.jpg" NAME="Grafik7" ALIGN=MIDDLE WIDTH=640 HEIGHT=52 BORDER=0></P>
</UL>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-right: 0.98cm; margin-bottom: 0cm"><FONT FACE="Tahoma, sans-serif">(Reference:
<A HREF="http://support.microsoft.com/kb/137890">http://support.microsoft.com/kb/137890</A>)</FONT></P>
</BODY>
</HTML>
bgstack15