Posted by Marek.Z on 3 July 2009
Did you ever wonder how to add some custom events to your computer system or application log? I always have but never really had the time to look it up. I was browsing the Windows Server 2008 command reference guide at Microsoft TechNet Windows Server TechCenter and I found the EventCreate.exe command. So, let’s give it a try.
C:\>EventCreate.exe /L Application /T Success /SO Script /ID 1 /D “The script completed successfully”
This command will create a success event with ID 1 from the source script in the Application log of your local machine and the description will be “The script completed successfully”.
Type EventCreate.exe /? at the command prompt for more options. You can even send events to remote computers! This is a great way to implement some error logging to your scripts. Tested on Windows XP, Vista and Server 2008.
Posted in Microsoft, Tools & Utilities, Windows Server 2008, Windows Vista, Windows XP | Leave a Comment »
Posted by Marek.Z on 25 June 2009
Have you ever wondered how to list all performance counters that are present on your computer? Well, I have and after some research I discovered the TypePerf.exe command. Believe it or not, TypePerf.exe is installed by default on all Windows versions after Windows 2000. The syntax looks like this (tested on a Vista machine):
C:\>TypePerf.exe –q > counters.txt
This command will list all performance counters on your computer and save it to a text file named counters.
Posted in Microsoft, Tools & Utilities, Windows Vista | Leave a Comment »
Posted by Marek.Z on 29 May 2009
This quick step guide describes how to unhide the OEM/Recovery partition on your hard drive. It was tested on a Windows Vista machine with a Basic disk.
- Start Disk Management (diskmgmt.msc) on your computer and take a closer look at your hard disk. Note the disk number and the partitions.
- Start DiskPart and select your disk: DISKPART> select disk 0
- List all partitions: DISKPART> list partition
- Now, select the hidden partition (see step 1) DISKPART> select partition 1
- Type DISKPART> detail partition and verify that it is hidden. Remember the Type value, this will be handy if something goes wrong.
- Set the type of the hidden partition to 07. Type DISKPART> set id = 07 override
- If everything goes ok, you will receive the following message “Diskpart successfully set the partition ID.“
- All done. Type Exit to close DiskPart.
- Check the Disk Management to see witch drive letter has been assigned to the recovery partition.
List of partition types:
07 = Windows NT NTFS, 17 = Hidden, 27 = OEM Recovery
Posted in Microsoft, Windows Vista | 14 Comments »