[rt.cpan.org #73715] Win32::Daemon::CreateService() must be run with administrator privileges on Windows 7

[email protected] ("Tyler Riddle via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Tue Jan 03 17:02:49 2012: Request 73715 was acted upon.
Transaction: Ticket created by [email protected]
       Queue: Win32-Daemon
     Subject: Win32::Daemon::CreateService() must be run with administrator privileges on Windows 7
   Broken in: (no value)
    Severity: (no value)
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73715 >


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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.