Windows Update Agents Vs WMIC QFE GET [closed] - winapi

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am exploring the reliability of the following two ways to get the Windows Patch Information.
Using Windows Update Agent - IUpdateSearcher Interface with COM.
Using WMIC QFE GET (Either through client or WMI Interfaces with
COM)
Below are the queries I have for the above two methods
Using Windows Update Agent - IUpdateSearcher Interface with COM.
Does IUpdateSearcher navigates through the following registry and provides the information?
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Component Based Servicing
Are there any other registry paths IUpdateSearcher looks for to give Update information?
Does IUpdateSearcher give a super set of what WMIC QFE gives?
Using WMIC QFE GET (Either through client or WMI Interfaces with COM)
Does WMIC QFE search the following registry path and provides the
information?
HKEY_LOCAL_MACHINE\Software\Microsoft\Updates (OR)
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Updates
Are there any other registry paths WMIC QFE GET looks for to give Update information?
Also, Of the above two ways,
Which method is the best way to get the Update Information without
data loss?
Which method performs faster?
Could someone provide answers for all my queries?

When you uses the WMIC QFE GET command is equivalent to execute a query with the Win32_QuickFixEngineering WMI class, since with Windows Vista, this class returns only the updates supplied by Component Based Servicing, in olders windows versions uses the
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates registry keys to enumerate the updates.
The IUpdateSearcher interface which is part of the Windows Update Agent API (WUA), can be used to enumerate all the fixes including the installed via the CBS, Updates supplied by Microsoft Windows Installer (MSI) or the Windows update site, and so on.
So the more reliable way to get the installed windows updates is using the WUA API.

Related

Automatic deployment of Windows Service - tools [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am looking for recommendations on tools for automatic deployment of Windows Service to several machines. The tool should be able to:
- Stop/Start service
- Copy files
- Modify configuration files on each destination server according to some CSV/Excel file
Advantages: Web interface, notification via email, compression/decompression
Here are the tools I heard of, and I am starting to evaluate, but I would like to hear from people who actually applied one of these (or some other tools) in their automatic deployment process.
Chef http://wiki.opscode.com/display/chef/Home
ayehu AKA eyeShare http://www.ayehu.com/
Puppet http://puppetlabs.com/
Nolio http://www.noliosoft.com/
Octopus Deploy http://octopusdeploy.com/
Kwatee http://www.kwatee.net/
P.S. There is a similar question on SO, but it does not answer my question:
WCF service deployment - tools
Answering
Q: How many servers do you plan to deploy to?
A: Currently 20 servers in 2 data centers. The numbers might grow in the future
Q: How many users will be involved in designing and executing the deployment?
A: One would design the deployment, and somebody else (a single person) will execute it
Q: Does your deployment require Cross-tier synchronization?
A: I need to deploy only a single Windows Service, no database changes, no IIS or any other web tier
Q: How important are auditing and reports to you?
A: I would like the tool to be able to report whether its succeeded or not. It would be also nice to see a complete dashboard of all the deployed servers with their versions and recent changes.
You can try Jenkins (http://jenkins-ci.org/)
This tool provides a nice UI to configure automatic build and deploy any project. Also it have rich set of plugins available on internet.
You could add kwatee to your list. It's lightweight with a web interface for configuration and CLI tools to automate the deployment process. You can handle your target-specific parameter with built-in deployment variables but there might also be a way for you to do your own parsing of CSV files and inject them. Note that you must enable either ssh or telnet/ftp on your target computers.

Hooking the windows COM runtime [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there an available tool which hooks the windows COM runtime?
I want to be able to see all the instances which get created, view queries to their interfaces, method calls, etc.
Thanks!
You could try Jonas Blunck's COMTrace -- I'm not sure if it works on Windows 7, but it's worth a try.
Check out http://www.nektra.com/products/com-spy-console, it's free.
to monitor the things you want you'll need to hook into system dlls and inject your blind delegators on interfaces queried. Needless to say how complex and error prone this task is, especially if consider that many implementors do not follow COM principles accurately. Though, some applications do that for their own purposes, without exposing this functionality.
If you really want to go this way - take a look at these:
MS Detours will help you with DLL hooking (http://research.microsoft.com/en-us/projects/detours/)
"House of COM" article on blind delegation (http://www.microsoft.com/msj/0399/com/com0399.aspx). Written by Don Box (or should I say "the world's greatest COM expert Don Box"? :-)
With in-proc COM servers there's almost nothing to hook - the consumer calls CoCreateInstance() or CoGetClassObject() and that's all it does. All the rest is done inside the COM object implementation. You might want to look at ATL sources to see how it usually works inside - for example when the consumer calls QueryInterface() the call directly goes to the corresponding object and the object itself is the only entity to observe the call.
This is not very fortunate but is a direct consequence of how in-proc COM servers are implemented. The developer can use Process Monitor to notice the registry accesses corresponding to ClassId->Dll mapping discovery and extensive tracing inside the COM object to see what's going on. ATL has a bunch of useful stuff (like COM_INTERFACE_ENTRY_FUNC_BLIND macro) to incorporate tracing.

What is the best installer? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 13 years ago.
Poll: What is the best and easy to use installer to use with .NET 3.5 SP1 windows applications?
My vote is for:
Nullsoft Scriptable Install System - it's popular, easy to use and FREE
Nullsoft Scriptable Install System
(NSIS) is a script-driven Windows
installation system with minimal
overhead backed by Nullsoft, the
creators of Winamp. NSIS has risen to
popularity as a widely used
alternative to commercial and
proprietary products like
InstallShield. - Wikipedia
There is rich plugins directory for NSIS, where you can find for example a plugin for installing windows services.
http://nsis.sourceforge.net/Category:Plugins
Commercial alternatives:
InstallShield - probably the most popular one and the most expensive option
Wise - also very popular
Advanced Installer - new and nice, not that popular yet, but trending
Other:
WiX - could be very good if you can spent some time on the learning curve. It is used by many Microsoft products.
Inno Setup
List of Installation Software at Wikipedia
My personal preference is Advanced Installer, it has a nice GUI for creation and editing of projects which are XML files so fits into source control easily.
Innosetup is the fastest one I've used to make setup files quickly and easily (out of Nullsoft and VS), providing you get the designer that is a separate download.
In the past I've used both InstallShield and Wise. I wouldn't say that using either of them is a joy, but they get the job done for large Windows applications.
Of the two, I would generally favour InstallShield.
I very much like WiX, which is said to be the installer used by MS internally for Office.
I used NSIS on my first-and-last Windows project, and was quite happy with it.
You could use ClickOnce deployment, if your environment allows you to do so. (If it's convenient).
Actually any answer could apply to your question here, choosing the "right" installer never possible for "a windows application".
How many different machines are your going to install to?
How large is your application?
Does it have many dependencies? (Databases etc.)
What is the "level" of the users who are going to install your app? Are they system administrators who install apps for a living, or are they joe-random "Hey lets click install because it looks cool" types.
just my 2ct.
The one out of the box from Visual Studio 2008.
Nullsoft Scriptable Install System anytime... simply because of it's ease of use and more than that, it's free!

How to best implement software updates on windows? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to implement an "automatic update" system for a windows application.
Right now I'm semi-manually creating an "appcast" which my program checks, and notifies the user that a new version is available. (I'm using
NSIS for my installers).
Is there software that I can use that will handle the "automatic" part of the updates, perhaps similar to Sparkle on the mac? Any issues/pitfalls that I should be aware of?
There's now a Windows port of Sparkle, see http://winsparkle.org.
There is no solution quite as smooth as Sparkle (that I know of).
If you need an easy means of deployment and updating applications, ClickOnce is an option. Unfortunately, it's inflexible (e.g., no per-machine installation instead of per-user), opaque (you have very little influence and clarity and control over how its deployment actually works) and non-standard (the paths it stores the installed app in are unlike anything else on Windows).
Much closer to what you're asking would be ClickThrough, a side project of WiX, but I'm not sure it's still in development (if it is, they should be clearer about that…) — and it would use MSI in any case, not NSIS.
You're likely best off rolling something on your own. I'd love to see a Sparkle-like project for Windows, but nobody seems to have given it a shot thus far.
Google Chrome auto-update is based on Omaha:
http://code.google.com/p/omaha/
Their overview has a great section on why it was needed:
The browser typically prompted the user with a long series of techy, confusing and scary dialogs all trying to convince the user not to install. Then the user was prompted with a wizard filled with choices that they did not need to or know how to decide amongst. These factors combined to form a bad user experience and large drop-off during the app installation process
It's a good idea to use a third-party solution, cause autoupdates can be a pain, especially with Windows Vista/7 (UAC). For what it's worth, the product my company uses is AutoUpdate+ and it seems to work fairly well.
For .NET, a while back Microsoft Patterns + Practices published the Application Updater Block. This was (to my mind) rather overblown and over-engineered, but did the job quite well.
In essence it used a "stub loader" to check a manifest and a Web service to see if a later version of the program than the one installed was available, then used the BITS background downloader technology to download a new version if one was available on the server.
Once the new version was downloaded and installed (with .NET this is as simple as an xcopy to the relevant folder), the application would update the manifest. The next time the program was loaded the new version would be launched.
While the Patterns + Practices code is .NET specific, there's nothing there that couldn't be copied for a non-.NET application, especially if you have the ability to silently run the install process in the background.
If your application is written in .Net, you could try ClickOnce. However, it's difficult to perform administrative or custom actions during install using this approach.
wyUpdate looks really nice. See video here:
http://wyday.com/wybuild/help/automatic-updates/
For .NET applications you might want to have a look at NetSparkle, a Sparkle variant for .NET programs. It is pretty new (from 2011) and developed actively.
Just came here from an answer to my own question on the same subject - I mention one other updating solution in my question. It uses a stub loader, and an xml file to point to the latest executable.

What is good server performance monitoring software for Windows? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for some software to monitor a single server for performance alerts. Preferably free and with a reasonable default configuration.
Edit: To clarify, I would like to run this software on a Windows machine and monitor a remote Windows server for CPU/memory/etc. usage alerts (not a single application).
Edit: I suppose its not necessary that this software be run remotely, I would also settle for something that ran on the server and emailed me if there was an alert. It seems like Windows performance logs and alerts might be used for this purpose somehow but it was not immediately obvious to me.
Edit: Found a neat tool on the coding horror blog, not as useful for remote monitoring but very useful for things you would worry about as a server admin: http://www.winsupersite.com/showcase/winvista_ff_rmon.asp
For performance monitor - start it on the server (Win+R and enter
"perfmon"). Select "Performance Logs and Alerts" and expand. Select "Alerts". Select "Action" & then "New Alert". Give the alert a name, click "Add" to add a counter (there are hundres of counters, for example CPU %), then give it some limits.
Select the "Action" tab, and then decide what you want to do. You may need a third party program - for example Blat to send emails - but basiaclly any script can be run.
I've been experimenting with munin for monitoring around 8 Windows 2003 servers.
http://munin.projects.linpro.no/
Its a free linux-based system and the Windows agent works well & is easily extensible. Setup is simple if you have some minimal linux knowledge.
If you want something free, try Nagios.
http://www.nagios.org/
You can configure you perfmon to collect specific counters to "Trace Logs" files on your hard drive. We usually keep daily logs for important counters:
Vital signs (CPU, Memory, HDD space)
Application specific (ASP.Net counters / SQL Counters)
Custom counters if your applicaiton exposes such
You can add "Alerts" for specific counters / counters groups and define actions when these alerts fire.
A list of monitoring tools from the High Scalability blog
I kind of like Perfmon myself. It comes with windows out of the box and has support for a lot of different measurements.
MS's solutions used to be called MOM. It looks like it's been redesigned a bit since I last used it.

Resources