Comments (7)
@miquelfire: so the id can be negative also?
according to the first post by [coreybutler] the expected data type is Uint32. So this shouldn't really work.
As the default is 1000, a custom value would be something other than 100, wouldn't it?
@coreybutler: future users will thank you for that :-)
from node-windows.
Truthfully, I'm not sure why this would be failing. The event logging code was written a very long time ago, and it worked with custom IDs... but I haven't tested it in a very long time.
The only thing I can think of is the encoding. The event ID may need to be a Uint32, which JS won't handle by default. That's just a guess though. Unfortunately, I do not have time to look into this, so I'll mark it as "help wanted".
from node-windows.
Looking at how events are created in the code, I saw it used eventcreate. Looking at the docs, I noticed something that might be key: It seems the ID can only be between 1 and 1000.
From here
/id <eventID> Specifies the event ID for the event. A valid ID is any number from 1 to 1000.
from node-windows.
Interesting, but very strange. In my event log, I see tons of event ids higher than 1000.
Maybe a limitation of eventcreate.
But for differentiaton purposes, the absolute value does not really matter, I guess, as the id is to be interpreted in relation to the event source, right?
I checked with 700, which worked fine.
You might consider adding to the documentation:
a) eventcreate is used under the hood
b) this limits a custom event id to an unsigned int < 1000
Thank you very much for your input!
from node-windows.
It would be int <= 1000
from node-windows.
I just added notes about this to the README.
from node-windows.
The valid values are 1 to 1000. I assume if there was direct access to the event log API instead of using eventcreate, we could use higher values.
from node-windows.
Related Issues (20)
- [11/11/22]: [Register with windows restart manager] HOT 1
- 12/23/2022: Setting service.install() verbosity HOT 1
- Pipe Stream Connection
- having windows authentication issue with Sequalize library HOT 4
- Execute npm start HOT 5
- 07/02/2023: Dependent on another service HOT 5
- Problem running git HOT 3
- My service is stopped but the program is still running HOT 1
- Service install silently fails on Windows 11 HOT 4
- Service created BUT NOT RUNNING HOT 5
- Needs windows restart before creating service HOT 1
- 03/30/2023: Please release a non-beta version HOT 2
- node-windows with babel and pkg HOT 1
- Question: Is it possible to split .exe creation and service creation HOT 1
- Comments in the XML file break the service executable
- Unsupported node: v19.0.0 HOT 1
- File path HOT 2
- 2023-07-13: React functionality HOT 1
- I need the source code for the binary files under "/bin" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-windows.