Closed coreybutler closed 11 years ago
are you running with elevated privileges? Like right click cmd.exe and run as an addministrator
Initially I thought I was, looks like I wasn't though.
It would be nice if there were a way to run this without having to right click on cmd.exe to do this. I realize that may be impossible, so alternatively it would at least be nice to have it kick out either an EACCES
or something indicating the issue is a problem of privileges. I'm more of a Windows user than a Windows developer, so seeing Signal 67
doesn't mean much to me.
yes! it would be nice why you closed?
Initially I use this more for windows service kind of project.. with my other project http://github.com/jfromaniello/winser those always have rights to write the event log
I closed it because the elevated privileges resolved the issue, but I guess that's not really a fix, eh? :smile:
I'll play around with winser... for my current use case I might be able to get away with setting up a service. In the meantime, I'll keep a keen eye on your progress with this library. Thanks for your efforts!
Just as a followup, I wrote a couple of small scripts to help with some of these permission issues (and some other stuff) into node-windows.
It looks excellent. I am not sure when the windows event log needs elevated access but AFAIK the behavior seems like you need to be elevated in order to create an Event Source but if you need to just write events you dont need elevated.
This module try to create an event source if it doesn't exist.
This is the reason i didn't check if the user is admin at the first place but I did this for my other project winser
https://github.com/jfromaniello/winser/blob/master/bin/winser#L55
As you said, the event log only requires elevated permissions when creating the event source... not for writing to it. The reason I added the elevate option in node-windows was primarily for building installers. However; with windows-eventlog now throwing an exception, it should be much easier to handle issues... either notifying the user or potentially attempting the command again by elevating the current user's privileges.
After a successful
npm install
on Windows 8, trying to execute the following code has an unexpected result:The console simply prints
Signal 67
. Upon looking in the Windows Event Viewer, I see nothing.I am using Visual Studio 2012 C++, which works for a number of other modules like iconv, bcrypt, etc. Could this be the problem?