Srai
Please pardon us as we continue to "steal bandwidth from your thread"! And please post any time to give us an update on how your problem is doing!!! (so we can re-direct our attention - as you will always get our top priority in this thread!
) And with that said.... back to kimsland...
Now i'm not sure that i'm understanding...We're talking about opening a command window, yes? (vs. opening a desktop)??
Also, fyi... Don;t know just when it started (if something i did or maybe some script i downloaded/ran/was playing with) BUT at some point at least 4+ weeks back, whenever i open a command prompt window
- It opens to a directory under C:\Program Files
- I've already checked and, yes, my userprofile variable is still set to my home directory
- I haven't taken the time to figure out why this happening as yet as hasn't been on my priority list
- In part, as i always use %userprofile% whenever i reference my desktop
- PLUS, also note!, NOT using %userprofile% still assumes that a user is opening a NEW command window before running the command vs. a user seeing no reason why not to simply run it from an existing command window where they may have already changed the current directory and then they are stumped why the command fails with The system cannot find the path specified.
- Odds are we're stumped as well.. not learning till much later they used an existing vs. new command window that just happens to point to other then home directory
As for other points, i think we're beginning to get into personal opinion when one tries to strike the balance between
=> Making the command as short and slick as possible for "us geeks"
vs.
=> Making the command reasonably bullet proof for users to use
And as for whether cscript command should precede eventquery or not on the command line:
One good reason for including cscript on the command line (vs explicitly invoking and changing to cscript) is exactly so one need not be manually setting/changing their Windows Script Host and then knowing how to set it back to what it was
(seems vaguely familiar as i say that )
And as far as whether the command can run outside of cscript entirely, I dunno. I stick to cscript just because that's what the Windows KB said to use.