[python-win32] pywin32 services
Tim Roberts
timr at probo.com
Tue Jul 20 01:08:50 CEST 2010
Michael Mileusnich wrote:
> This is all local to my C drive. I opened up win32serviceutil and
> printed out fname and it is the directory where my app is running out
> of which is on C. It is longer than 8 characters I'm not sure how
> FindFiles works.
FindFiles returns a tuple of interesting things about the data. The 8th
thing in that tuple is the official file name.
fname should not be a directory. "fname" should be the full path to the
executable. "path" should be the path part of that -- everything up to
the last backslash. The join reads the directory to find the full file
name, and tacks that on to the path. 99.99% of the time, "fname" should
end up the same coming out as it was going in. It would be nice to know
whether the "index" it's complaining about is the [0] (meaning FindFiles
found no matches) or the [8] (meaning FindFiles returned something
unexpected). Perhaps you should add
print win32api.FindFiles(fname)
and see what it returns.
Do you have an extension on your service script?
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list