If you are planning to work with System.Management Namespace in the .NET framework, especially with ManagementObjectSearcher, ManagementObjectCollection, and ManagementObject classes, to perform different Windows Management Instrumentation (WMI) queries, take a look on WMI Code Creator tool by Microsoft.
Without this free utility, you'll spending lots of time to test your WMI queries via console or other debugging methodology.
Using the WMI Query Builder you can browse WMI namespaces, execute methods and receive WMI events. Also you can automatically generate a working source code to perform WMI queries, either C# or Visual Basic.
Moreover, you can modify and run these management scripts by pressing a single button! Visual Studio is not required for that 🙂
If you are a website developer you are familiar with ready-to-use web templates, programming frameworks, and content management systems (CMS).
Such solutions "out of the box" make the web-mastering a convenient and simple process.
But very often there is a task to add custom scripts to a web-site bypassing CMS or other non-standard way.
Especially if you do not have full access to the source code of the system.
The task becomes very difficult if the website is built using an outdated code or an abandoned framework.
The best principle in software development is the same as for medicine:
Primum non nocere (Do not harm)
Therefore, the best way is to make your own code independent of the environment. Then add small and simple (in one line) injections to the working code base. In the embedded code, check the existence of your own variables, try to call only the standard language functions.
Choose the proper method to change the website context. You should select from simple to complex:
PHP developers often need to print value of different variables directly to the HTML code.
But very often PHP variable is out of the current scope, so the echo(); function doesn't help.
This PHP function prints any global (or external scope) variable by its name:
function print_var($var = 'domain', $url = '')
global $$var, $$$var;
if ($url != '')
If you pass some URL as a second parameter you'll get a clickable link: