Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.scripting.vbscript > #11355
| From | "Mayayana" <mayayana@invalid.nospam> |
|---|---|
| Newsgroups | microsoft.public.scripting.vbscript |
| Subject | Re: Is it possible to create a custom global WMI event? |
| Date | 2016-08-11 09:18 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <nohu0d$lmr$1@dont-email.me> (permalink) |
| References | (2 earlier) <1lua92u37ohvl$.1894nbdxwqzgo.dlg@40tude.net> <57aadd04$0$843$e4fe514c@news.xs4all.nl> <4gr3m8ycwo5t.84esgior4f1v$.dlg@40tude.net> <57ab96c6$0$850$e4fe514c@news.xs4all.nl> <1f0cf93tk73wd$.f9l8tqj5wvue.dlg@40tude.net> |
"JJ" wrote: | I also forgot to mention that I need my scripts to work on all Windows | installations (at least Windows XP; i.e. WinXP and newer; with/without | service packs). It's an interesting issue. You never explained what you're trying to do, so it's hard to think about solutions. I've used IE windows before, tracking changes in things like status text. But then IE changes with every version, so that can be tricky. I've also used Ax EXEs, but of course that doesn't fit your requirement of no extras. Even if it did, VBScript getting events is awkward. WScript.CreateObject allows for specifying an object for event subs, but the script still has to loop in paralysis while it waits for that event. So I've only used that method where I absolutely have to, such as with an emailing component where I need to wait for the server's final "goodbye" before ending. So it's hard to see any advantage to WMI. You'd still be stuck with a looping script, even if you can get an event using WScript.CreateObject. And while WMI is well supported, it's not guaranteed. I would have the service disabled if I didn't use it myself. It's not of much use to the average person, except as the basis of hardware reporting utilities. For something shared across scripts it's hard to imagine anything better than a file used as flag. But I'd be interested if you find something better. :)
Back to microsoft.public.scripting.vbscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Is it possible to create a custom global WMI event? JJ <jj4public@vfemail.net> - 2016-08-08 20:22 +0700
Re: Is it possible to create a custom global WMI event? "R.Wieser" <address@not.available> - 2016-08-08 18:39 +0200
Re: Is it possible to create a custom global WMI event? JJ <jj4public@vfemail.net> - 2016-08-10 03:02 +0700
Re: Is it possible to create a custom global WMI event? "R.Wieser" <address@not.available> - 2016-08-10 09:54 +0200
Re: Is it possible to create a custom global WMI event? JJ <jj4public@vfemail.net> - 2016-08-11 01:30 +0700
Re: Is it possible to create a custom global WMI event? "R.Wieser" <address@not.available> - 2016-08-10 23:06 +0200
Re: Is it possible to create a custom global WMI event? JJ <jj4public@vfemail.net> - 2016-08-11 19:27 +0700
Re: Is it possible to create a custom global WMI event? "Mayayana" <mayayana@invalid.nospam> - 2016-08-11 09:18 -0400
Re: Is it possible to create a custom global WMI event? "R.Wieser" <address@not.available> - 2016-08-11 15:57 +0200
csiph-web