| Edwin Daniel's profileMicrosoft technologies a...BlogLists | Help |
Creating Windows Vista Sidebar Gadgets (for infrastructure guys...and gals)As Windows Vista has been being pushed by OEM vendors in both the desktop and mobile computers, application developers are leveraging on the platform to build applications. Windows Vista introduced the Sidebar – an anchored panel on the Windows desktop that can host mini-applications known as gadgets. Gadgets are “mini-applications” presenting functionality and are small, lightweight specialized, residing on the local computer which responds to user interaction They can be created using HTML/DHTML, JavaScript and CSS. Now you might be thinking why I had this under the .NET Development category when I only need HTML to create gadgets. This is because there are .NET APIs which can be accessed by these gadgets. Windows Vista ships with gadgets that can track stock prices, display news feeds, and deliver weather forecasts. Of course, application developers can think of just about anything these gadgets can do like communicating with an aggregated web service and stuff like that. You can check out these references on how to create Windows Sidebar gadgets
As an infrastructure guy, I am more concerned about leveraging gadgets to make my life a bit easier as a systems engineer. This is when I created a gadget that uses WMI. Since I do regular auditing of all our servers within our domain, I created a script which automates just that. I had this initially in VBScript which writes information in a text file (see my previous blog post on this topic). What I simply did was to convert my existing script to a gadget. Do take note that gadgets only run on Windows Vista and not not previous Windows versions. Below is a snippet from my script
This simply displays hardware information from the local machine and displays it in an HTML page (with a little monitor on the available memory resource). Next thing I would probably do is query Active Directory for the registered servers in the domain and execute the same set of functions to retrieve hardware information. This highlights how we can take advantage of Windows Vista as an application platform - not just for developers but also for infrastructure guys who simply want to make their lives a lot easier. Scripting skills are definitely a must here :) May 11 Need to script your SQL Server Database schema with data?This used to be one of my problems before. Whenever we do some tests on custom applications which require backend SQL Server databases, we had to generate the script to create the database schema and populate the database. The problem is that SQL Server does not have this feature. Either you create the database schema script and use DTS to import the data from the old database to the new one. The problem most of the time is that the old and the new databases are not in the same network - probably being deployed to a hosting service provider. There's no way you can do this in DTS. I created a .NET/VB application to do this for me. My application generates a text file which contains INSERT statements for all the data in all of the tables inside the database. This output, together with the script generated by SQL Server has to be both executed on the target database server. Microsoft came up with the Microsoft SQL Server Database Publishing Wizard 1.1. This enables the deployment of SQL Server databases into a hosted environment on either a SQL Server 2000 or 2005 server. It generates a single SQL script file which can be used to recreate a database (both schema and data) in a shared hosting environment where the only connectivity to a server is through a web-based control panel with a script execution window. If supported by the hosting service provider, the Database Publishing Wizard can also directly upload databases to servers located at the shared hosting provider. I wish Microsoft had something like this 7 years ago. It would have probably made my life and a lot of developers' and DBAs' life a lot easier. May 09 Need a new face for your Remote Web Workplace?Remote Web Workplace is one of those cool features in Windows that only Small Business Server has. Using the Remote Web Workplace, you can access your company's server from any Internet-enabled computer such as a home computer, Internet kiosk, or laptop. By default, all users created using a Windows Small Business Server 2003 user template can access the Remote Web Workplace. There are a lot of people who wanted to customize how the Remote Web Workplace looks like when users have successfully logged in. If you're comfortable with HTML and ASP.NET coding, you can modify the admin.aspx (for administrators logging in) and/or client.aspx (for anybody else) inside C:\Inetpub\Remote folder. The web.config file also includes some of the configuration settings for these pages so you might want to have a look at it as well. Just make sure you backup these files before you start making modifications so that you can always revert back to the originals if things screw up. WSUS client not updating? Here's a script to testOne prerequisite for your Windows Update to work is for the Automatic Updates and BITS services to be both started and set to automatic. In some cases, these may be configured not to run due to some security policies being implemented internally. One way to find out is to go to the Services applet and check whether they are started and set to automatic. Being a lazy guy as I am, I always find ways to make life a lot easier (even if doing this is jus a few mouse clicks away). So I wrote a script to do this for me. The script checks if both these services are stopped and if they are will start them. It also includes forcing the group policy just in case something was changed with respect to the GPO for WSUS and forcing the WSUS client to detect new updates. Checking for either Windows 2000, Windows XP and Windows 2003 is also included. Of course, if your WSUS client is totally screwed, you will have to re-register some of the DLLs in order for it to work.
|
|
|