Question on CW app as an NT service, running Command Line PGP 
Author Message
 Question on CW app as an NT service, running Command Line PGP

Hi all,

I'm testing an app that runs the command line version of PGP 6.5.8 using the
clarion RUN command.  The Clarion app works fine when run interactively, but
when runs as a service, doesn't seem to run PGP at all.  I'm move the
PGPClient and PGPGroup files to the default profile folder, but doesn't
work.  I have run a .BAT file (with the PGP command) from an nt scheduler
(which is an NT service), and the PGP executes properly.  Any ideas if this
should or shouldn't work from CW's RUN.  Command is as follows

    RUN(CmdLine, 1)

where command line contains a valid PGP encryption command string which
works intereactively.

Thanks,

John



Fri, 28 Oct 2005 04:18:13 GMT  
 Question on CW app as an NT service, running Command Line PGP


Quote:
> I'm testing an app that runs the command line version of PGP 6.5.8 using
the
> clarion RUN command.  The Clarion app works fine when run interactively,
but
> when runs as a service, doesn't seem to run PGP at all.  I'm move the
> PGPClient and PGPGroup files to the default profile folder, but doesn't
> work.  I have run a .BAT file (with the PGP command) from an nt scheduler
> (which is an NT service), and the PGP executes properly.  Any ideas if
this
> should or shouldn't work from CW's RUN.  Command is as follows

>     RUN(CmdLine, 1)

> where command line contains a valid PGP encryption command string which
> works intereactively.

John,

Just a WAG, but in a program running as a service I'm not sure if your RUN
command is even happening.  Try doing something visible to determine this.
Also it may be a case of some DLL needed by PGP not being visible to the
program.  I think it depends on how you have the service set to run.  Been a
while since I messed with this stuff <g>.

HTH,

Charles Edmonds

LANSRAD - "Intelligent Solutions for Universal Problems"
www.lansrad.com



Fri, 28 Oct 2005 04:54:51 GMT  
 Question on CW app as an NT service, running Command Line PGP
If you're running as a service then the service isn't running as the current
logged-on user, it's running as the user you specified when you installed
the service. Unless you jump through some hoops a service can't interact
with the current user, primarily because there might not be one - that's the
reason you write a service in the first place :)

--
Paul Attryde
www.attryde.com/clarion


Quote:
> Hi all,

> I'm testing an app that runs the command line version of PGP 6.5.8 using
the
> clarion RUN command.  The Clarion app works fine when run interactively,
but
> when runs as a service, doesn't seem to run PGP at all.  I'm move the
> PGPClient and PGPGroup files to the default profile folder, but doesn't
> work.  I have run a .BAT file (with the PGP command) from an nt scheduler
> (which is an NT service), and the PGP executes properly.  Any ideas if
this
> should or shouldn't work from CW's RUN.  Command is as follows

>     RUN(CmdLine, 1)

> where command line contains a valid PGP encryption command string which
> works intereactively.

> Thanks,

> John



Fri, 28 Oct 2005 22:13:26 GMT  
 Question on CW app as an NT service, running Command Line PGP
Paul,

I agree, that the CW NT Service should be free standing and not dependent on
any user.  That is why I'm trying to do a service.  I have some CW apps that
do some house-keeping chores, but they require a user to be logged in.
Periodically, there is a shut-down due to maintenance, or some network
problem, and the op guys forget to log this nt workstation back in so the CW
app will run again.  So I thought a service would be more dependable.
However, can't get PGP working from CW Run command when run as a service.
I'm not sure if PGP is running, or if it's a problem with where the PGP
files are located.  Using PGP 6.5.8 command line program, and I moved the
PGPGroup.dat and PGPClient.dat files under the profile of an nt account
setup to be used by services.  I set my CW NT Service to use this account.

Pause to catch breath........

If I run the app from a DOS prompt, it calls up PGP and does the
encryption/decryption using the PGP command line.  When I run this as an NT
service, it starts ok, I see the DOS window (from the run command) pop up
and quickly go away.  Can't tell what part didn't work.  The CW run command
uses the complete path for PGP, so it should always find the program.

I looked at interfacing to the PGPSDK, but quickly realized that was over my
head.  I've seen a CW interface to the SPGP library (which is a wrapper to
PGP 6.5.8).  Anyone have an opinion on this product?  I've receive some
responses about prototypes to use PGP5.x, but haven't had any success yet.
I'm trying to accomplish a simple task of polling a folder for files, then
either encrypting or decrypting based on a control file of parameters.  I'm
just having a heck of a time interfacing to PGP through CW.

Thanks for your input,

John Farmer



Quote:
> If you're running as a service then the service isn't running as the
current
> logged-on user, it's running as the user you specified when you installed
> the service. Unless you jump through some hoops a service can't interact
> with the current user, primarily because there might not be one - that's
the
> reason you write a service in the first place :)

> --
> Paul Attryde
> www.attryde.com/clarion



> > Hi all,

> > I'm testing an app that runs the command line version of PGP 6.5.8 using
> the
> > clarion RUN command.  The Clarion app works fine when run interactively,
> but
> > when runs as a service, doesn't seem to run PGP at all.  I'm move the
> > PGPClient and PGPGroup files to the default profile folder, but doesn't
> > work.  I have run a .BAT file (with the PGP command) from an nt
scheduler
> > (which is an NT service), and the PGP executes properly.  Any ideas if
> this
> > should or shouldn't work from CW's RUN.  Command is as follows

> >     RUN(CmdLine, 1)

> > where command line contains a valid PGP encryption command string which
> > works intereactively.

> > Thanks,

> > John



Sun, 30 Oct 2005 12:12:34 GMT  
 Question on CW app as an NT service, running Command Line PGP


Quote:
> If I run the app from a DOS prompt, it calls up PGP and does the
> encryption/decryption using the PGP command line.  When I run this as an
NT
> service, it starts ok, I see the DOS window (from the run command) pop up
> and quickly go away.  Can't tell what part didn't work.  The CW run
command
> uses the complete path for PGP, so it should always find the program.

John,

Here is an old DOS trick that may help (can't get rid of it can we?)

Use the redirect symbol to capture the output of the CMD session to a file.

Example: If your program is "ByteMe.bat" run it as:

ByteMe.bat > ByteMe.out

That shoud at least output what it thinks is going on so you can view the
results in Notepad.

Also you might try PowerRun (free at www.berthume.com ).  It is usually MUCH
better than the Clarion RUN and has other settings you can use too.

HTH,

Charles Edmonds

LANSRAD - "Intelligent Solutions for Universal Problems"
www.lansrad.com



Sun, 30 Oct 2005 14:07:14 GMT  
 Question on CW app as an NT service, running Command Line PGP
One thing I've found about services is that although you put the full path
to your service when you install it, the service actually runs in the
C:\WINNT folder (IE GetPath() returns C:\WINNT, not the folder your app is
in). Maybe that's the problem?

--
Paul Attryde
www.attryde.com/clarion


Quote:
> Paul,

> I agree, that the CW NT Service should be free standing and not dependent
on
> any user.  That is why I'm trying to do a service.  I have some CW apps
that
> do some house-keeping chores, but they require a user to be logged in.
> Periodically, there is a shut-down due to maintenance, or some network
> problem, and the op guys forget to log this nt workstation back in so the
CW
> app will run again.  So I thought a service would be more dependable.
> However, can't get PGP working from CW Run command when run as a service.
> I'm not sure if PGP is running, or if it's a problem with where the PGP
> files are located.  Using PGP 6.5.8 command line program, and I moved the
> PGPGroup.dat and PGPClient.dat files under the profile of an nt account
> setup to be used by services.  I set my CW NT Service to use this account.

> Pause to catch breath........

> If I run the app from a DOS prompt, it calls up PGP and does the
> encryption/decryption using the PGP command line.  When I run this as an
NT
> service, it starts ok, I see the DOS window (from the run command) pop up
> and quickly go away.  Can't tell what part didn't work.  The CW run
command
> uses the complete path for PGP, so it should always find the program.

> I looked at interfacing to the PGPSDK, but quickly realized that was over
my
> head.  I've seen a CW interface to the SPGP library (which is a wrapper to
> PGP 6.5.8).  Anyone have an opinion on this product?  I've receive some
> responses about prototypes to use PGP5.x, but haven't had any success yet.
> I'm trying to accomplish a simple task of polling a folder for files, then
> either encrypting or decrypting based on a control file of parameters.
I'm
> just having a heck of a time interfacing to PGP through CW.

> Thanks for your input,

> John Farmer



> > If you're running as a service then the service isn't running as the
> current
> > logged-on user, it's running as the user you specified when you
installed
> > the service. Unless you jump through some hoops a service can't interact
> > with the current user, primarily because there might not be one - that's
> the
> > reason you write a service in the first place :)

> > --
> > Paul Attryde
> > www.attryde.com/clarion



> > > Hi all,

> > > I'm testing an app that runs the command line version of PGP 6.5.8
using
> > the
> > > clarion RUN command.  The Clarion app works fine when run
interactively,
> > but
> > > when runs as a service, doesn't seem to run PGP at all.  I'm move the
> > > PGPClient and PGPGroup files to the default profile folder, but
doesn't
> > > work.  I have run a .BAT file (with the PGP command) from an nt
> scheduler
> > > (which is an NT service), and the PGP executes properly.  Any ideas if
> > this
> > > should or shouldn't work from CW's RUN.  Command is as follows

> > >     RUN(CmdLine, 1)

> > > where command line contains a valid PGP encryption command string
which
> > > works intereactively.

> > > Thanks,

> > > John



Sun, 30 Oct 2005 23:19:20 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. CW App as an NT Service

2. CW BUG: Clarion Apps / NT Services

3. Running a CW program as an NT Service

4. Running tcl/tk App as NT Service

5. running pyton on NT command lines

6. Using CW for NT Services

7. Windows NT Service in CW

8. Writing an NT Service in CW?

9. CW as an NT service

10. Running app as Service

11. packaged app as NT service?

12. How to install webconn app as NT service?

 

 
Powered by phpBB® Forum Software