Subject: | Win32::Daemon::CreateService() must be run with administrator privileges on Windows 7 |
Date: | Tue, 3 Jan 2012 14:02:33 -0800 |
To: | <bug-Win32-Daemon [...] rt.cpan.org> |
From: | "Tyler Riddle" <triddle [...] voiceconnect.com> |
Hello,
I'm new to working with Windows and hit some problems trying to install a
Perl script as a service under Windows 7. Specifically CreateService() would
return false indicating an error but the error string from
Win32::FormatMessage( Win32::Daemon::GetLastError() ) indicated there was no
error, like this: Failed to add service: The operation completed
successfully.
This was difficult to troubleshoot but ultimately I was able to successfully
install a service once I ran CreateService() inside a cygwin instance that
was launched "as administrator" - it wasn't immediately obvious in the docs
that this is a requirement but it probably should be.
Cheers,
Tyler