How do you find out the domain name,the user name of currently logged in user and the path where user profile is stored using just a single command?
Well,this can be done because of the very helpful set command available from Windows command prompt.
In one of my earlier posts,I had described using the set command to check the domain controller availability in a domain based environment.
Here,let's find out the other useful functions of set.
Open command prompt ( Start > Run > cmd)
Type - "set u" and hit Enter.

In fact,if we want to see environment variables starting with a particular letter,the same command can be applied as set followed by the letter like set a.

Typing set a will show variables beginning with a,in this case it will point out useful info of All Users in Windows as well as the path of Application Data.
For getting a quick look at what set command is all about,type set /? :

Feel free to try out different combinations of set,it will be a time saver.
Peace.
Posted in
how to use set command,
set a,
set u,
windows environment variables,
Windows tips
by AVP
Any external USB drive connected in Windows Vista by default is optimized for quick removal and not quick performance.
This is because it is assumed that any plugged in external drive will be removed at some point of time and a quick removal from the computer may result in data loss.
What if you use an external USB disk that is always connected to your computer?
In this case,we can optimize the USB disk performance by simply enabling "write caching" in Vista.
Fire up Device Manager by going to Start > Run > devmgmt.msc

Drill down to Disk drives and locate your external USB disk.Double click on disk icon and go to Policies.

Here,change the option from Optimize for quick removal to Optimize for performance.
Hit Ok,and restart Vista for changes to take full effect.
Hope this has been an informative post.
Peace.
Posted in
device manager,
enable write caching,
tweak performance of external USB drives,
Vista tips
by AVP
Vista has this service turned on by default called "Superfetch".What this does is keep track of user patterns like which are the most commonly used applications and on startup,load these frequently used applications first for logged in user.
Just like all the Windows services,this too can be turned off or on if you want to explore the performance difference of your Vista system.
Let's take a look at how to turn this service off from command prompt.
Go to Start > Run > cmd
To turn the service off,type :
net stop superfetch
And to turn it back on :
net start superfetch

Feel free to experiment the enabling and disabling of this service and check if it makes a difference in speed of Windows Vista.
Peace.
Posted in
disable superfetch,
enable superfetch,
superfetch from command prompt,
Vista service pack tips,
Vista tips
by AVP
On surfing the web,we often come across email addresses as hyperlinks which on clicking will launch email client with the clicked address as the recipient.
Is there any way,we can do the same on demand by making a desktop shortcut of any intended recipient and also copying some one else's email address in one go ?
Yes,there is an easy way to do this.We just need to extend the web based email strings in our shortcut creation.
The email links that are used on webpages use format like this :
mailto:toaddress?cc=ccaddress&bcc=bccaddress
This same thing can be put up as a desktop shortcut,let's take a look how.
Right click on desktop where the shortcut needs to be placed,select New > Shortcut.
I will assume I need to create a shortcut that will send email to recipent avp@mail.org and copying recipient avp@support.org.

In the box where location of the item needs to be filled,following is entered :
mailto:avp@mail.org?cc=avp@support.org
Clicking next will prompt for saving the shortcut which can be given any sensible name.
Once the shortcut is saved,double clicking it will open the default email client with already filled email addresses.


This can be extended further if you are sending daily emails with a fixed subject line,the procedure for creating the shortcut remains the same,the syntax will change as :
mailto:email@address.com?cc=email2@address.com?subject=some subject
This will pop up a blank email message with to,cc and subject fields already filled up.
Hope this has been an informative post.
Posted in
email shortcut,
pre-filled email addresses,
reporting in Windows Vista,
sending emails in Windows Mail
by AVP
Having correct time is important,be it in life in general or Windows in particular.
In a domain based environment,there is something called as a time skew which means that if system clock on a client Windows machine is not in sync with the time on domain controller by more than 5 minutes,kerberos authentication will fail and domain user can't logon to that system anymore.
There are few useful commands that can be used quickly to see what time zone is being used and synchronizing the time on local Windows system to that of any of the internet time servers.
First we take a look at what time zone our Windows machine is in by going to command prompt and typing : w32tm / tz

Synchronizing our Windows machine to the accurate time of any internet time server (of course,the computer needs to be connected to internet for this),can be done by typing - w32tm /resync.
All done,remember time is precious :)
Peace.
Posted in
checking Windows time zone from command prompt,
internet time servers,
sync windows clock online,
w32tm,
windows time
by AVP
In my earlier post on security features in Windows Vista,I had described how to turn off User Account Control.
What if we want to run applications with normal user rights but only need the command prompt to be launched with elevated administrator rights?
There are two ways that I have come across to launch command prompt with administrator access,as usual there is the graphical click way and the other is a keyboard combo that does that.
For making command prompt run with administrator access,the simplest way is the graphical way.
Right click the command prompt icon and select 'Run as administrator" option.

On selecting this,command prompt will open with elevated rights (if UAC is not turned off,you will be required to enter admin credentials).

Now the other way.
Go to Start > Run,type cmd.
Don't hit Enter yet,instead use the keyboard combination of Ctrl+Shift+Enter.
This too will have the same effect of launching command prompt with administrator rights.
Which way do you think is more cleaner and cooler ?
Peace.
Posted in
admin accessin Vista,
keyboard shortcut for command prompt admin rights,
using command promt in Vista,
Vista command prompt,
Vista tips
by AVP
When installing service pack 1 under Windows Vista,a way of uninstalling is also embedded by default should you at any later point of time need to remove the service pack.
What if we no longer need to uninstall service pack,the setup files in this case can be safely removed thereby freeing up disk space in Vista.
Go to Start > Run.
Type the following command :
vsp1cln.exe
This needs to be run under administrative privileges.

The following dialog box will pop up for confirmation :

On typing 'y',it will remove the associated uninstaller of service pack thereby making it permanent on your computer.
Once this command is executed,removal of service pack 1 will no longer be possible in Windows Vista.If you really are not sure whether to make service pack permanent or not,it is suggested that you leave the uninstaller as it is.
Hope this has been an informative post.
Peace.
Posted in
permanent SP1,
reporting in Windows Vista,
service pack 1,
Vista service pack tips,
vsp1cln
by AVP
It is possible to spawn a command prompt referencing a specific folder only in Windows Vista.What this means is if we want to open a command prompt that has the path of the specific folder we wish,we can do that which is quite cool.
To do this :
1. Select any folder whose path needs to be opened at command prompt path.Here,I will select a folder named Music!
2. Right click on the folder while holding down Shift key.

3. Select the Open Command Window Here option.This will launch a command prompt for the selected folder path with the privileges of the user logged in.

To make the command window open with privileges of Administrator,check out this link.
However,if you decide to tweak using the above link,then do keep in mind that this will elevate rights for any logged in user to gain access to command prompt with full Administrator rights.
Hope this has been an informative post.
Peace
Posted in
elevate command prompt,
folder specific command prompt,
open command windows here,
windows vista tips
by AVP
As the music collection on your hard drive increases,chances are there will be a lot of duplicate songs within the same playlist.
How do we go about trimming the music collection and find out which songs are duplicates or repeated?
Itunes helps in this regard.If we have a playlist in itunes,there is a nifty feature that will check for duplicates and using it is quite simple.
Here is how :
1. Fire up itunes.
2. Click on the Music tab and then,hit View > Show Duplicates in Windows or File > Show Duplicates in Mac.

3.This will show only the songs that are repeated in your entire collection.

4.Return back to the original list using Show All button.
Peace.
Posted in
apple itunes,
itunes tips,
pruning music collection,
show duplicates,
Windows itunes
by AVP
Windows Mail in Vista provides an in-built drag and drop functionality which makes it possible to simply drag text from any open document and drop it in any folder within Windows Mail except the outbox.
Let's take a quick tour on how to do this :
1. Launch Windows Mail (Start > Run > winmail.exe)
2.Open any text editor - wordpad (Start > Run > wordpad.exe) will also do just fine.
3.Type the desired text which needs to be sent as email in the text editor.
4.Highlight the text block,move the mouse pointer to Windows Mail,the pointer will change its appearance to a block.

5. Drop the text block in any folder except Outbox in Windows Mail.

6.The drop of the text block will pop up an email message with the selected text which can be sent in a jiffy to intended recipients.
Hope this has been an informative post.
Posted in
drag and drop text blocks,
sending emails in Windows Mail,
Vista,
Windows Mail,
Windows tips
by AVP
An old hack but is still useful to remove Windows Messenger from Windows XP.
By default,it can't be removed from XP but we can do it by changing a few attributes.
Windows Messenger doesn't show up by default as below :

First,we need to make the Windows Messenger component visible in Add/Remove Windows components.To do this :
1.Navigate to C:\Windows\inf\sysoc.inf

2.Change the line msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,7 to
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,7
3.Save the modified sysoc.inf file.(if needed you can first backup this file by copying and storing it somewhere else).

4.Go to Start > Settings > Control Panel> Add Remove Programs.Over there launch Add remove Windows components and scroll down to find Windows Messenger entry listed with it's size.

5.Uncheck it and click Next to remove.
6.All done.
Hope it has been an informative post.
Peace.
Posted in
change hidden attributes,
sysoc.inf,
uninstalling Windows messenger,
Windows messenger,
Windows XP components uninstall,
XP tips
by AVP
Here is a registry hack useful for XP machines that are used in lobby or for some display purposes that use internet explorer.
Let's take a look at how to always run Internet Explorer 6 in full mode:
1. Open registry editor (Start>Run>regedt32.exe)
2. Navigate to HKEY_CURRENT_USER>Console, find 'fullscreen' change the value from 0 to
1.

3. Navigate to HKEY_CURRENT_USER>Software>Microsoft>InternetExplorer>Main, change 'fullscreen' value from no to yes.

4.Reboot and launch IE 6,it will now be in full screen mode.

Peace.
Posted in
change internet explorer to full screen,
cool XP tricks,
full screen IE6,
XP registry hacks
by AVP
Suppose we need to find out quickly what all sub directories with their files are under a directory without going to Windows explorer to do that or even using the dir command.Is it possible?
Yes indeed.We can find out the details from the beloved command prompt using the "tree".
This command comes in handy when we want to list only a particular file or similar file types from a lot of files under some directory.
Let's take a look to clarify this :
1.Like most online users,I download a lot of stuff,finding what I want in the default Downloads folder can be a pain sometimes.
2.Let's say I want to find out if I have downloaded some .txt files in Downloads folder.(Of course the graphical way here would be to double click Downloads folder and then list files by type or by doing a cd to that directory and then listing file type with wildcards,but remember we want to complete this just from the command prompt with least effort and from the current directory we are in).
3.I launch the command prompt (Start>Run>cmd).
4.Tree comes into play - listing the path I want to scan files for (C:\Users\AVP\Downloads) in this case with the /f switch in command prompt to list all the files too within the sub directories.
5.Since I want to see if I have any text files that I had downloaded recently,the next step would be to use find command to filter our output so that files with only the .txt extension will be listed.
The command which will do all of the above will be :
C:\Users\AVP\Downloads>tree "c:\Users\AVP\Downloads"
/f|find ".txt"
I see the following output once I give the above command :

As seen tree can be very useful,I will give one more example to make this clear.
Suppose I want to see what files I have within a nested sub folder of a main folder from the command prompt.
Here is what I do :

Hope this has been an informative post.
Peace.
Posted in
cool command prompt tricks,
cool XP tricks,
listing files and directories,
sort files,
tree command,
using find command,
Windows commands
by AVP
Windows Vista comes with some really neat features and systems diagnostics report is one of them.
Periodic monitoring of system helps us in determining it's bottlenecks and resolving potential problems that it might face.
Reliability and Performance Monitor in Windows Vista gives us a neat detailed view of our system - its potential bottlenecks and the stuff that is already configured / optimized.
One feature of Reliability and Performance Monitor is the system and health report functionality.
It works by basically collecting data on various parameters of Vista for 60 seconds and then displays a report indicating what is lacking or what is already present from a performance tuning perspective.
Let's take a look at how to get this report :
1. Navigate to Control Panel > Performance Information and Tools > Advanced Tools.

2. Select the Generate a system health report.
3. Once launched,it will for 60 seconds collect information about the system.

4. Once the diagnostics is finished,a report is displayed showing areas of concern and areas that require no tune up.

5. It is advisable to save this somewhere so that it serves as a baseline for future diagnostics to ensure that Vista is running as expected.
Hope this has been an informative post.
Peace.
Posted in
generating system snapshot in Vista,
performance monitor,
reporting in Windows Vista,
systems diagnostics report,
Vista
by AVP
In one of my earlier posts,I had described the way to backup registry through the system state data backup.
Let us take a look on how to go about if we only need to backup registry and nothing else.
1.Open registry editor (Start>Run>regedt32).

2.We will export the current registry settings and save it as a .reg file somewhere.
To do this,click File>Export.

3.Choose a suitable location to store this exported registry file,you may never know when it can come in handy :)

4.If possible,store multiple copies of this file in multiple storage devices to improve redundancy.
For Vista,administrator privileges will be needed to open registry editor.The procedure for backup remains the same as in XP.
If more information on what .reg file is and how to use it,check this post on it.
Peace.
Posted in
backups,
exporting registry,
registry backups,
Vista registry,
XP registry
by AVP
User Account Control is a new security feature in Windows Vista to prevent execution of unauthorized applications.
If tired of annoying popups that seem to come when you try to run any application in Vista,it means UAC is in charge of your access.
I will show two ways to disable UAC in Windows Vista -the graphical or clicking way and of course the command prompt way.
Let's first take a look at the graphical way :
Access Control Panel>User Accounts.
Click on Turn User Account Control on or off.

This will bring up a new window,remove the tick mark from the box which displays Use User Account Control (UAC) to help protect your computer.

Click Ok and reboot the machine once.
All done,no more annoying popups from UAC.
And now,the command prompt way - this is quicker and looks cool too :
Access command prompt (Start>Run>command prompt).
Copy paste the following command :
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
This has to be done after launching the command prompt with administrative rights else the error message Access denied will be seen.
Reboot and experience the freedom.
In case,if UAC needs to be turned back on,simply put a click in the UAC option box and hit OK.
For doing the same through command prompt,use the following command from command prompt :
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
Just to give an idea about why the command prompt way is much quicker - the command that is entered will basically use registry editor to change the value of registry key that controls UAC to either 0 (which is UAC disabled) or 1 (which is UAC enabled).
Isn't binary world wonderful - 2 choices for everything :) ?
Peace.
Posted in
command prompt,
enabling and disabling UAC,
UAC,
Vista tips,
Windows Vista
by AVP
Some of the best things in life are free.
CCleaner is one of them.
As Windows users,we find our machines getting slower and unresponsive even if there are antivirus apps which are updated and firewall secured.
One very basic reason for this is temporary files which over a period of time grow and make the computer slow.Apart from this temp files,there are orphan registry keys (Registry entries of applications which are uninstalled a long time ago,cookies and other stuff which add up in this slowness.
How much would you pay for an application that deletes temp files,scans and fixes registry problems and also provides a nice dashboard from where you can uninstall Windows applications in a jiffy plus manage startup services?
The answer in this case is zero bucks,CCleaner is the utility that you have been looking for.[I know I sure was for a long time,by the way the first C in CCleaner rightly stands for Crap,as in Crap Cleaner :)].
This utility is by far the most elegant system tune-up utility for Windows and being totally free doesn't hurt either.Do keep in mind this is a tune-up utility and not a virus/spyware/malware/adware cleaner.
The basic components of it's interface are : Cleaner,Registry,Tools and Options.

CCleaner does what it says - cleans up temp files from your browsers(both Internet explorer and Firefox),as well as the temp files left by Windows applications.

Registry will check for registry settings - basically scan for reg keys that are orphan or useless and remove them.Prior to removal,you will be prompted for backing up the registry which is very good.

Tools will have the list of all applications installed on the machine and will assist in uninstalling them as well as managing startup services (no need for msconfig).There is even a cool logging feature which will keep a list of all the installed applications in a text file.
Options have lot of things from removing of cookies to controlling how temp files are deleted,feel free to test it out.
Hope it has been an informative post.
Peace.
Posted in
CCleaner reviews,
deleting temp files,
fast Windows,
freeware,
Piriform,
removing cache cookies,
slow XP,
system optimization,
system tuneup
by AVP
In Windows Active Directory environment,domain users can either be enabled or disabled.
A disabled user can't access any network resources because he/she can't login or get authenticated by domain controller in first place.
A script that comes in handy for regular auditing of users can be used to cut down time for such housekeeping tasks.
Here it is :
' This script will find all disabled user accounts in a domain.
' ------ SCRIPT CONFIGURATION ------
strDomainDN = "" ' e.g. dc=avp,dc=net
' ------ END CONFIGURATION ---------
strBase = ";"
strFilter = "(&(objectclass=user)(objectcategory=person)" & _
"(useraccountcontrol:1.2.840.113556.1.4.803:=2));"
strAttrs = "name;"
strScope = "subtree"
set objConn = CreateObject("ADODB.Connection")
objConn.Provider = "ADsDSOObject"
objConn.Open "Active Directory Provider"
set objRS = objConn.Execute(strBase & strFilter & strAttrs & strScope)
objRS.MoveFirst
while Not objRS.EOF
Wscript.Echo objRS.Fields(0).Value
objRS.MoveNext
wend
It might look complex but is simple in what it does.By default,all disabled user objects have their attribute userAccountControl set to 2,the bit flag for this in case of a disabled user is 0010 (that's binary for numeral 2).
The script will establish a connection to LDAP/AD provider,a domain controller in this case,will parse for object class user and object category person and check if the attribute of userAccountControl is equalling 0010.
Once it does that,it will list the objects that have this condition set and you will see all the disabled users in your domain.
Peace.
Posted in
Active Directory,
bit flags,
LDAP stuff,
parse objects,
script for finding disabled users,
user auditing
by AVP