Re: Error 1053 starting Win32::Daemon service
Title: Message Mark, Michael, Thanks for the ideas. The account that this defaults to if the -user parameter is not used, is shown in the SCM as the Local System account. First up, tried installing this with fully qualified -l, -d and -t parameters, but no change. I didn't really expect anything dramatic here because the defaults generated by DIRMON looked pretty valid. Next up, added the redirection of stderr in a BEGIN block (good idea!). However, no luck there, as nothing is ever written to the log file. In fact, the log file is only created on the install, but if then removed, is not recreated when the SCM attempts to start the service. It appears to me that it never gets as far as loading the script. I can run the script interactively, but to tell the truth, I'm not really sure what to expect when this is done. Is it then still visible andcontrollable via the SCM? I suspect not, as the install is what adds most of the SCM specific information. For what its worth, the script appears to run once through its main service loop (Daemon::State() first returns a state value of 0 which DIRMON treats as unknown, then a STOPPED state (1) which causes it to exit. Andrew ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Error 1053 starting Win32::Daemon service
Title: Message Got it! Thanks for all the help. The problem was simply that there was a space in part of the fully qualified dirmon.pl file specification. When dirmon installs itself, it does this without enclosing the path name to itself in quotes, and haven't found a way of forcing this. With any parameters to dirmon, any quotes enclosing these are transferred into the ImagePath entry, but it generates the pathname for the dirmon.pl script itself (using Win32::GetFullPathName), and doesn't quote this. I manually patched the Dirmon entry in the registry, and this is all working fine. As I was initially running the script that started this from the same location, and I had used exactly the same mechanism as dirmon to figure out who I was, it certainly suffers from the same problem. Thanks also to the pointer to the sysinternals website - it all looks interesting. I had never come across this previously (I'm more or less just a dumb user on the Win32 side!). Thanks again Andrew ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Error 1053 starting Win32::Daemon service
Title: Message Ive been having a battle getting a simple perl script to start as a Win32 service (using Win32::Daemon) on XP. In frustration Ive reverted to the DIRMON script from David Roths website, which is touted as the example, and Im having exactly the same problems with that. Methinks the problem is with me, and a lack of something in the Win32 knowledge department (my background is primarily VMS Unix) hopefully someone can point me in the right direction. I have no problems installing the DIRMON script via a simple perl DIRMON.pl install Ive done this without any account or other parameters, but from looking at the installed service, it seems to add sensible defaults. If I now try and start this through the SCM, it immediately returns with Could not start the directory monitoring service on the local computerError 1053: The service did not respond to the start or control request in a timely fashion Thinking that this could be a privilege issue with running outside an account context, Ive tried to start this with an account and password perl DIRMON.pl install user xxx pass xxx I actually set up an account called xxx with the same password, so this is literally what was entered. This returns with; Failed to add the Directory Monitoring Service.Error: The account name is invalid or does not exist, or the password is invalid for the account name specified Ive then tried installing this as a system service, then manually adding the account and password to the logon details in the services console, and starting this again. This still returns with the 1053 error above. I have found the SCM events logged for the startup failures, and these are all of the form Timeout (3 milliseconds) waiting for the Directory Monitoring Service service to connect. This implies that the SCM waited for 30 seconds for something to happen, but in all cases I have seen the failure was reported immediately the start request was made What am I missing??? How do you debug problems at the service level? Thanks for any help or pointers Andrew ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Unnotified errors using FileOp to copy to a CD
Title: Message I have been attempting to use the FileOp Copy interfaceto copy file structures to a CD-ROM. Where this hits an error, a dialogue is popped up (for instance if there is an unwritable disk in the drive). However, if this dialogue is cancelled, the Copy still returns with a successful status. From the documentation, I understand the dialogue is a result of the FOF_NOERRORUI option omissionfrom the Copy. I have also tried CopyEx with this option - the call thenfails silently, but there is still a successful status returned (for this I have just looked at the return status from the Copy - I understand that until I detect a failure here, $OS_ERROR,and $EXTENDED_OS_ERROR are meaningless. Can anyone shed any light on this? Am I on the right track, orare Copy/CopyEx calls not the right mechanism for copying to a CD? What I need to achieve is to copy some structures to a CD (ideally I'd like to manage the full burn from code, but if I need to do the final step manually to physically write the CD, that would be OK. However, it is vital that I understand the success or otherwise of the operations. Thanks for any pointers Andrew ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs