Ever wanted to send someone a search term ? Well, here’s a fun way to do it. Simply use http://lmgtfy.com/?q= followed by your search term. For example:
Category: Tips
Quick Access to System Properties
Tired of having to go around the houses to look at the system properties on a server or workstation ? The quickest way to gain access is to use the built-in shortcuts. Just enter the below at the start menu search box to gain fast access:
Advanced Tab – systempropertiesadvanced
Remote Tab – systempropertiesremote
Hardware Tab – systempropertieshardware
Computer Name Tab – systempropertiescomputername
System Protection Tab – systempropertiesprotection
Data Execution Prevention – systempropertiesdataexecutionprevention
Performance Options – systempropertiesperformance
Of course, you don’t have to remember all of the above, just using systempropertiesadvanced will get you straight to a single tab so that you can navigate from there.
List Users who have logged on to XenApp
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
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.
-
Create the folder. I have create done called “RegistryTemplates”
-
Mark the folder as a system folder. Open a command prompt and mark the folder as a system folder using attrib +s PathFolderName
- 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.
-
Edit the Desktop.ini file created (by double clicking on it). Add a section header
[.ShellClassInfo]
- Then enter values to inform the file system how to display the folder.
Entry |
Value |
ConfirmFileOp |
Set this entry to 0 to avoid a “You Are Deleting a System Folder” warning when deleting or moving the folder. |
NoSharing |
Not supported under Windows Vista or later. Set this entry to 1 to prevent the folder from being shared. |
IconFile |
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. |
IconIndex |
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. |
InfoTip |
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. |
-
A typical set of entries would look like the below.
[.ShellClassInfo]
IconFile=C:WindowsRegedit.exe
IconIndex=0
InfoTip=”Registry templates for updating standard settings within the operating system”
-
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).
-
Save the file.
-
Now open a command prompt and set the desktop.ini file to be a hidden system file using the command attrib +s +h PathFileName.
-
The folder will now display with the regedit icon to provide a visual queue that the folder contains items relating to the registry.
-
Hovering the mouse over the folder displays the tooltip.
Connect to SysInternals files over the Internet but from within explorer
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 \live.sysinternals.comtools and there they are.
Enjoy
How to create masses of data for testing
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
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 http://www.facebook.com 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
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
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