<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>RE: [DUG] Windows Services</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-GB link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>What account is the service running as?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Select “This account” and run as
administrator.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
delphi-bounces@ns3.123.co.nz [mailto:delphi-bounces@ns3.123.co.nz] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Eion McIntosh (<st1:City
w:st="on"><st1:place w:st="on">Christchurch</st1:place></st1:City>)<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, 23 November 2006
11:30 a.m.<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">NZ
Borland Developers Group - <st1:place w:st="on">Delphi</st1:place> List</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [DUG] Windows
Services</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>I have
just figured out, and we have had the same issue the VB project under Visual
Studio, that my application only start if it run from my local PC hard drive.
If the program is on our server, and compiles, runs and installs ok, but when
you try to start the service we get the Access denied error. However, if it is
on ahe local PC hard disk, compile, run and install, and then start the service
it works fine.</span></font><o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Any
thoughts?</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Eion</span></font>
<o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-----Original
Message-----</span></font> <br>
<font size=2><span style='font-size:10.0pt'>From: delphi-bounces@ns3.123.co.nz</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>[<a
href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]On
Behalf Of Jeremy Coulter</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Sent: Wednesday, 22 November 2006
6:15 p.m.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>To: '<st1:PersonName w:st="on">NZ
Borland Developers Group - <st1:place w:st="on">Delphi</st1:place> List</st1:PersonName>'</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Subject: RE: [DUG] Windows Services</span></font>
<o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Yes...thats
what I meant. I typed my message in a hurry trying to get out</span></font> <br>
<font size=2><span style='font-size:10.0pt'>the door at work :-)</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Jeremy </span></font><o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-----Original
Message-----</span></font> <br>
<font size=2><span style='font-size:10.0pt'>From: delphi-bounces@ns3.123.co.nz
[<a href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
On</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Behalf Of Dennis Chuah</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Sent: 22 November 2006 18:05</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>To: <st1:PersonName w:st="on">NZ
Borland Developers Group - Delphi List</st1:PersonName></span></font> <br>
<font size=2><span style='font-size:10.0pt'>Subject: Re: [DUG] Windows Services</span></font>
<o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Its not
you, but the user that the service runs under. By default, this is</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>the SYSTEM user, which does not
have many rights. Try changing the</span></font> <br>
<font size=2><span style='font-size:10.0pt'>configuration of the service to a
user with more rights.</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-----
Original Message -----</span></font> <br>
<font size=2><span style='font-size:10.0pt'>From: "Eion McIntosh (<st1:City
w:st="on"><st1:place w:st="on">Christchurch</st1:place></st1:City>)"
<e.mcIntosh@ppcs.co.nz></span></font> <br>
<font size=2><span style='font-size:10.0pt'>To: "<st1:PersonName w:st="on">NZ
Borland Developers Group - Delphi List</st1:PersonName>"
<delphi@ns3.123.co.nz></span></font> <br>
<font size=2><span style='font-size:10.0pt'>Sent: Wednesday, November 22, 2006
5:02 PM</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Subject: RE: [DUG] Windows Services</span></font>
<o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>I do have
rights to my pc, but it must be something else, because I managed </span></font><br>
<font size=2><span style='font-size:10.0pt'>to get a simple service running
earlier this afternoon, but now I have made </span></font><br>
<font size=2><span style='font-size:10.0pt'>my main program I am getting the
error.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>I have tried commenting everything
out so it appears to be the same as </span></font><br>
<font size=2><span style='font-size:10.0pt'>earlier this afternoon, but still
getting an error.</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-----Original
Message-----</span></font> <br>
<font size=2><span style='font-size:10.0pt'>From: delphi-bounces@ns3.123.co.nz
[<a href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]On
</span></font><br>
<font size=2><span style='font-size:10.0pt'>Behalf Of Jeremy Coulter</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Sent: Wednesday, 22 November 2006
4:49 p.m.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>To: '<st1:PersonName w:st="on">NZ
Borland Developers Group - <st1:place w:st="on">Delphi</st1:place> List</st1:PersonName>'</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Subject: RE: [DUG] Windows Services</span></font>
<o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>its the
old windows services permissions issue.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>All you need to do is run the
service as someone with administrator rights, </span></font><br>
<font size=2><span style='font-size:10.0pt'>or atleast with read access to the
folder where the ini file is stored, and </span></font><br>
<font size=2><span style='font-size:10.0pt'>you should be ok.</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Jeremy</span></font>
<o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>
_____</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>From:
delphi-bounces@ns3.123.co.nz [<a href="mailto:delphi-bounces@ns3.123.co.nz">mailto:delphi-bounces@ns3.123.co.nz</a>]
On </span></font><br>
<font size=2><span style='font-size:10.0pt'>Behalf Of Eion McIntosh (<st1:City
w:st="on"><st1:place w:st="on">Christchurch</st1:place></st1:City>)</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Sent: 22 November 2006 16:39</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>To: delphi@ns3.123.co.nz</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Subject: [DUG] Windows Services</span></font>
<o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Hi</span></font>
<o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>I am
creating a new windows service for checking if some specific programs </span></font><br>
<font size=2><span style='font-size:10.0pt'>are running. When the service
starts I want to read in a ini file with a </span></font><br>
<font size=2><span style='font-size:10.0pt'>list of programs to look for, but I
am getting an Error 5 Access Denied when</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>is
starts.</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Can you
read of text file for a service program and if so were should it be </span></font><br>
<font size=2><span style='font-size:10.0pt'>stored to be read? I've tried it
under the WinNT and System32 and C: but </span></font><br>
<font size=2><span style='font-size:10.0pt'>still am getting the error? Running
on Win2k.</span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>Regards</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Eion McIntosh</span></font> <br>
<font size=2><span style='font-size:10.0pt'>PPCS Ltd</span></font> <o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>--</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>No virus found in this incoming
message.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Checked by AVG Free Edition.</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Version: 7.1.409 / Virus Database:
268.14.12/544 - Release Date: 21/11/2006</span></font> <o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
<br>
<br>
<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>--</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>No virus found in this outgoing
message.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Checked by AVG Free Edition.</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Version: 7.1.409 / Virus Database:
268.14.12/544 - Release Date: 21/11/2006</span></font> <o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
<br>
<br>
<o:p></o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>----------------------------------------------------------------------------</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>----</span></font> <o:p></o:p></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>>
_______________________________________________</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> <st1:place w:st="on">Delphi</st1:place>
mailing list</span></font> <br>
<font size=2><span style='font-size:10.0pt'>> Delphi@ns3.123.co.nz</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> <a
href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a></span></font>
<br>
<font size=2><span style='font-size:10.0pt'>> </span></font><o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>_______________________________________________</span></font>
<br>
<st1:place w:st="on"><font size=2><span style='font-size:10.0pt'>Delphi</span></font></st1:place><font
size=2><span style='font-size:10.0pt'> mailing list</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Delphi@ns3.123.co.nz</span></font> <br>
<font size=2><span style='font-size:10.0pt'><a
href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a></span></font>
<o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-- </span></font><br>
<font size=2><span style='font-size:10.0pt'>No virus found in this incoming
message.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Checked by AVG Free Edition.</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Version: 7.1.409 / Virus Database:
268.14.12/544 - Release Date: 21/11/2006</span></font> <br>
<font size=2><span style='font-size:10.0pt'> </span></font> <o:p></o:p></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>-- </span></font><br>
<font size=2><span style='font-size:10.0pt'>No virus found in this outgoing
message.</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Checked by AVG Free Edition.</span></font>
<br>
<font size=2><span style='font-size:10.0pt'>Version: 7.1.409 / Virus Database:
268.14.12/544 - Release Date: 21/11/2006</span></font> <br>
<font size=2><span style='font-size:10.0pt'> </span></font> <o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>_______________________________________________</span></font>
<br>
<st1:place w:st="on"><font size=2><span style='font-size:10.0pt'>Delphi</span></font></st1:place><font
size=2><span style='font-size:10.0pt'> mailing list</span></font> <br>
<font size=2><span style='font-size:10.0pt'>Delphi@ns3.123.co.nz</span></font> <br>
<font size=2><span style='font-size:10.0pt'><a
href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi</a></span></font>
<o:p></o:p></p>
</div>
</body>
</html>