Archive for the ‘Tips’ Category

List Users who have logged on to XenApp

Friday, October 7th, 2011

Want to know who has logged on to your Citrix server ?

You can just look in the security log in event viewer and filter down but it’s so much easier using the command line. Just open up a cmd prompt and enter

auditlog (all one word)

This will let you list all the sessions from the event log and even pipe them out to a text file for later analysis or reporting.

Changing the icon used for folders

Friday, September 23rd, 2011

When building a desktop image you may want to have some corporate folders which you want to “stand out” from the others and also let users know what the folder should be used for. For example, you may place folders in the “All Users” menu folder or within the users “My Documents” folder.

This can be accomplished by changing the folders icon and adding a tool tip so that a hint appears if a user hovers their mouse over the folder. This is relatively simple to achieve.

  1. Create the folder. I have create done called “RegistryTemplates”


  2. Mark the folder as a system folder. Open a command prompt and mark the folder as a system folder using attrib +s Path\FolderName



  1. Create a text file and name it Desktop.ini. Use Notepad to create this file and ensure it is saved in Unicode format. Also, enclose the file name in quotation marks to ensure that the.txt extension isn’t applied.

  1. Edit the Desktop.ini file created (by double clicking on it). Add a section header




  2. Then enter values to inform the file system how to display the folder.




Set this entry to 0 to avoid a “You Are Deleting a System Folder” warning when deleting or moving the folder.


Not supported under Windows Vista or later. Set this entry to 1 to prevent the folder from being shared.


If you want to specify a custom icon for the folder, set this entry to the icon’s file name. The .ico file name extension is preferred, but it is also possible to specify .bmp files, or .exe and .dll files that contain icons. If you use a relative path, the icon is available to people who view the folder over the network. You must also set the IconIndex entry.


Set this entry to specify the index for a custom icon. If the file assigned to IconFile only contains a single icon, set IconIndex to 0.


Set this entry to an informational text string. It is displayed as an infotip when the cursor hovers over the folder. If the user clicks the folder, the information text is displayed in the folder’s information block, below the standard information.


  1. A typical set of entries would look like the below.





    InfoTip=”Registry templates for updating standard settings within the operating system”



  2. The above will set the icon to be that used by Regedit. The icon index is the index number of the icon within the icon file. If a bespoke icon is to be used, this can be placed within a hidden folder underneath the folder being displayed (use attrib +h FolderName to hide the folder).


  3. Save the file.


  4. Now open a command prompt and set the desktop.ini file to be a hidden system file using the command attrib +s +h Path\FileName.



  5. The folder will now display with the regedit icon to provide a visual queue that the folder contains items relating to the registry.



  6. Hovering the mouse over the folder displays the tooltip.


Connect to SysInternals files over the Internet but from within explorer

Saturday, September 17th, 2011

Want to connect to and run the SysInternals tools locally but don’t want to install them on your server or workstation ? Just use explorer to connect to \\\tools and there they are.


How to create masses of data for testing

Tuesday, January 25th, 2011

If you ever want to test something that requires lots of files to be created, whether it is is configuring Robocopy of writing files to disk to test throughput or for alert generation then HP have a great free tool you can use, CreateData.exe. Download it here.

If you want a similar tool to generate “read” type access then the ReadTool can be downloaded here.

Create your own Event Viewer Entries

Thursday, January 13th, 2011

There’s a little known tool that sits on your computer called eventcreate.exe. Its a command line tool and it lets you create your own event log entries in the event viewer (but not the security log for obvious reasons). You can create any event with an event ID up to 1000 (events above that value tend to be used by Microsoft).

To use the tool simply go to a command prompt and create an event with appropriate switches – you can get a list of all these and an example of how to use the tool by entering

eventcreate /? at the command prompt.

Why would you want to do this ? Well, one thing is to test any monitoring tools you have. The other thing is you can call the tool to easily write to the event log from any scripts you create, for example when deploying software from a batch file you can write an event to the log showing that the software was deployed.

My favourite use is around April Fools Day. A typical example would be:

EVENTCREATE /T ERROR /ID 69 /L APPLICATION /SO iexplore.exe /D “<username> has now spent a total of 465 hours browsing this calendar year”

Just run the command using a remote command prompt on the users machine and then ask them and why you have received an alert about their browsing then point them to the event log.

How to format GPResult

Tuesday, April 6th, 2010

You probably know how to run GPResult to see which policies etc are being applied to an end user workstation or server but did you know for Windows 2008 / R2 and Windows 7 there is now an easy way to format those results ? Just run the command below:

GPResult /H GPResult.html

and the results will be held in a html formatted page. Run the command below and it will display the page automatically for you.

GPResult /H GPResult.html & GPResult.html

How to duplicate entries in Excel

Monday, November 2nd, 2009

You know how it is. You are filling out an Excel spreadsheet and you need to copy the value above. Now, everyone knows the two ways to do this (copy /paste and to “drag and fill” the data down). Well, I was shown a third way today and thought I’d share it with you.

Simply select the cell where you want the data to be copied into and press CTRL + D (for Duplicate) and that’s it.

Before and After

Piping out to the clipboard

Sunday, November 1st, 2009
We all know how to pipe out to text files, right ? From a command prompt type in your command followed by > and then the name of the file to output the result to.
For example
ipconfig /all > c:\myfiles\ipconfigresults.txt
will put the results of ipconfig /all into a text file called ipconfigresults.txt in the myfiles folder and the more advanced ones among us know how to not only pipe the command out but also open that text file automatically after the command has completed.
For example
ipconfig /all > c:\myfiles\ipconfigresults.txt & c:\myfiles\ipconfigresults.txt
Well, that leaves a permanent file on your hard drive which you might or might not want. Plus, if you want the text in another file you have to open the text file as above, select it all and then copy it to the clipboard.
Now, you can doo all of that in one go without leaving that pesky file behind – just pipe the command to the clipboard !
For example
ipconfig /all | clip
will put the output of the ipconfig / all command on your clipboard. You can now either paste it into notepad for a temporary file or paste it into any more permanent file, as part of producing customer documentation for example.