Pages

Labels

Showing posts with label WindowsVista. Show all posts
Showing posts with label WindowsVista. Show all posts

NirCmd - Free command line tool for Windows XP and Vista

NirCmd - Free command line tool for Windows XP and Vista

Are you scared of using the Windows command prompt to accomplish tasks? If so, you’re definitely missing out on some cool stuff you can do on your computer. However, it’s understandable as the syntax can be quite technical and you really don’t want to mess something up if you don’t know what you’re doing.

Luckily, there is a free utility called NirCmd that you can use that extends the functionality of the command prompt and makes it a little bit easier to use DOS commands without having to know DOS.

NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any command prompt user interface.

You can use it to do all kinds of useful stuff for you such as writing and deleting values registry keys, writing values into INI file, dialing your Internet account or connecting to a VPN network, restarting windows or shutting down the computer, creating a shortcut to a file, chaning the created/modified date of a file , changing your display settings, turning off your monitor (this we want ) , opening the door of your CD-ROM drive, and lots more!

The best thing about this program is that you can create a scheduled task to simple run any command you want at a set interval. So you can create a scheduled task to turn off your monitor or turn off your computer every day at midnight or to mute the volume on your computer every morning.




Now you could simply run any of the commands by going to the Windows command prompt and typing something in. For example, go to Start, then Run and then type in CMD. Now type in any command that was listed in the command list.

OR Just Create a Shortcut Like This.



Thats It ... Now You not only Tech Savvy ... Now You are Eco Savvy Too There is another utility called "WizMo" also serves the same purpose both are free, you can get them by (what I can say just ) google .





Here is High Tech Way - Recommended For Power Users only

PROGRAMMATICALLY



Code:

// console application
#include

#define SCREENSAVER_START 1
#define MONITOR_OFF 2

int main( int argc, char** argv )
{
int cmd = SCREENSAVER_START; // default when run
// is to start screensaver.

// if passed command line argument (no matter
// what it is), just turn off the monitor instead.
if( argc > 1 )
{
// could check argv,
cmd = MONITOR_OFF;
}

switch( cmd )
{
case SCREENSAVER_START:
SendMessage( HWND_TOPMOST,
WM_SYSCOMMAND,
SC_SCREENSAVE,
0 ); // send message to top most window
// for screensaver to start. that's just
// how you programmatically start the screensaver
// under windows!
break;

case MONITOR_OFF:
SendMessage( HWND_BROADCAST,
WM_SYSCOMMAND,
SC_MONITORPOWER,
(LPARAM)2 ); // turn off the monitor.
break;
}
}


Compile This and Make MonitorControl.EXE

Keep this Executable in Start Menu (or wherever you want ). And create 2 shortcuts:

One called “Monitor OFF” that has target

C:\Documents and Settings\All Users\Start Menu\Programs\Monitor Control\MonitorControl.exe” off

The other is called “ScreenSaver Start” and has target:

C:\Documents and Settings\All Users\Start Menu\Programs\Monitor Control\MonitorControl.exe”

because running the executable with no arguments starts the screensaver.

How can I add a Command Prompt option to the Default Explorer Right Click Context Menu?

If you find that you frequently open a Command Prompt window and change to a specific directory, you can add the Command Prompt to your shortcut menu. This option enables you to right-click on a folder within Windows Explorer and choose the Command Prompt - which opens a Command Prompt window with that folder as your active directory.

To add the Command Prompt option to the default right click context menu in Windows Explorer you can do one of the following:

Method #1: Through the Registry

This is the simplest, easiest and most idiot-proof method.

Create a text file, type in the following lines and save it as addprompt.reg.



Code:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Command]
@="Command Prompt:"

[HKEY_CLASSES_ROOT\Directory\shell\Command\Command]
@="cmd.exe /k cd %1"


Save this out and double click the file. Note this will modify the registry but I promise it is safe. Your anti-virus software might ask you to confirm the registry change and it is safe to allow it.

This adds Command Prompt to the Windows Explorer right click menu. Just right click on a folder, click Command Prompt and you will be at the command prompt in the selected folder. No need to type CD and the full path anymore.


Method #2: Manually add the context menu

  • In explorer, open Tools, Folder Options.


  • Select the File Types tab.


  • For Windows XP: Go to NONE / Folder.


  • For Windows 2000: Press n to scroll to the N/A section.


  • For Windows NT/98/95: Press f to scroll to the Folders section.


  • Select the entry labeled Folder


  • For Windows 2000/XP: Press Advanced button.


  • For Windows NT/98/95: Press Edit button.


  • Select New


  • In the action block type "Command Prompt" without the quotes.


  • In the app block type "cmd.exe" without the quotes.


  • Save and exit Folder Options.



Now right click on Start, you should have a new drop down option. Open explorer and right click on a folder, select Command Prompt and a command window opens in that folder.

Method #3: Through batch file


  • Begin by creating a batch file. For example, you could create a batch file named StartPrompt.cmd. Add the following commands to your batch file:




    Code:

    @echo off
    cd /d %1
    Title %~f1



  • Save this batch file to your Windows NT/2000/XP root directory (which is usually C:\WINNT or C:\WINDOWS for XP).


  • Open Windows Explorer.


  • Choose View | Options to display the Options dialog box.


  • Select the File Types tab.


  • In the list of Registered File Types, select Folder then click Edit.


  • Click New to display the New Action dialog box.


  • In the Action text box, type Command Prompt.


  • In the Application Used To Perform Action text box, type:




    Code:

    cmd.exe /a /k c:\winnt\StartPrompt "%l"




  • Click OK to close the New Action dialog box, then click Close twice.

What is svchost.exe And Why Is It Running?

You are no doubt reading this article because you are wondering why on earth there are nearly a dozen processes running with the name svchost.exe. You can't kill them, and you don't remember starting them… so what are they?

So What Is It?

According to Microsoft: "svchost.exe is a generic host process name for services that run from dynamic-link libraries". Could we have that in english please?

Some time ago, Microsoft started moving all of the functionality from internal Windows services into .dll files instead of .exe files. From a programming perspective this makes more sense for reusability… but the problem is that you can't launch a .dll file directly from Windows, it has to be loaded up from a running executable (.exe). Thus the svchost.exe process was born.

Why Are There So Many svchost.exes Running?

If you've ever taken a look at the Services section in control panel you might notice that there are a Lot of services required by Windows. If every single service ran under a single svchost.exe instance, a failure in one might bring down all of Windows… so they are separated out.

Those services are organized into logical groups, and then a single svchost.exe instance is created for each group. For instance, one svchost.exe instance runs the 3 services related to the firewall. Another svchost.exe instance might run all the services related to the user interface, and so on.

So What Can I Do About It?

You can trim down unneeded services by disabling or stopping the services that don't absolutely need to be running. Additionally, if you are noticing very heavy CPU usage on a single svchost.exe instance you can restart the services running under that instance.


If you are curious what we're talking about, just open up Task Manager and check the "Show processes from all users" box:





Checking From the Command Line (Vista or XP Pro)


If you want to see what services are being hosted by a particular svchost.exe instance, you can use the tasklist command from the command prompt in order to see the list of services.



Code:

tasklist /SVC



Disable the UAC feature in Vista

Are you tired of those User Account Control (UAC) prompts that appear whenever you're trying to run some admin tool on your Vista computer? They appear even if you're user account is a member of the Administrators group on your machine. That's because Protected Admins (PAs) normally run with the privileges of a standard user on Vista, which means to perform some administrative task or use an admin tool you have to first elevate your privileges to admin level, which is what the UAC prompt is designed to do.

Well, UAC is there for a reason--if your computer got infected by some malware and this malware tried to run an admin tool, the UAC prompt would appear to warn you that someone (you? malware?) is trying to run a tool designed only for administrators. And a UAC prompt when you don't expect it would be a sure sign that something's gotten into your machine's innards.

Still, some users (especially sysadmins) are likely to find these UAC prompts annoying at best, so here's how to disable UAC on your machine:

1. Open Administrative Tools in Control Panel

2. Double-click on System Configuration

3. Click Continue to accept the UAC prompt

4. Select the Tools tab

5. Scroll down and select Disable UAC

6. Click Launch

7. Reboot your machine

Note that you may not be able to disable UAC if Group Policy configured for enforcing UAC on your computers.

Note: This tip is based on a pre-release version of Windows Vista and may not reflect functionality in the final product.

  

Microsoft cutting price of Vista


Windows Vista
Microsoft is hoping more users will switch to Vista
Microsoft has said it plans to cut the cost of its Windows Vista operating system sold at retail outlets.

Although no exact date has yet been given, Microsoft said price cuts would be introduced in 70 countries.

In the US, the cost of the most expensive version, Vista Ultimate, will be reduced to $319 (£161) from the current retail price of $399.

Analysts said Microsoft was aiming to boost the number of customers upgrading to Vista, which was introduced in 2007.

'Greater opportunities'

The price cuts apply to the packaged versions of Vista, which account for less than 10% of its sales.

By contract, 90% of Vista sales are to PC manufacturers, where the operating system is pre-installed on their computers.

"We anticipate these changes will provide greater opportunities... to sell more stand-alone copies of Windows," said Brad Brooks, a Microsoft corporate vice president.

Microsoft says it has now sold 100 million Vista licences since it was launched.

Make Vista Start, Run and Shutdown Faster.


For a general user the first three are usually more than sufficient to make your Vista faster. The remaining are some more which a tweak enthusiast may wish to consider. Utilities like WinPatrol or Tune-Up Utilities can help you in most of the cases.


1. Restrict the no. of start-ups. Why have programs starting up when you dont really use them. Even those you use can always be started manually by clicking on the. I personally prefer not to have ANY starups. I click on my Internet Defense Suite manually, before connecting to the Internet. So decide for yourself which one's you really need as start-ups.

2. Disable services which one may not require. For example, if your pc is a stand-alone one, there may be sevral services which you can disable or switch over to manual mode. Auto-starting and closing down of services takes time & resources. These can be saved.
BlackViper's Vista Service Configurations is an excellent guide to follow.

3. Reducing visual effects (eye candy).

Right-click on “My Computer” > Properties > Advanced > Performance-Settings > Visual Effects > Adjust for best performance > Apply > OK.

To allow the themes and the glass effects, you may have to check on the boxes : enable transperant glass and use visual styles; this way atleast the spirit of Vista will be preserved- else be prepared for a really bland Vista ! Use your discretion. I know disabling all can actually negate the purpose of 'eye-friendly' Vista.

4. Ensure that boot defragmentation is enabled, so that files used during start-up are clubbed together.

Start Regedit. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Dfrg\BootOptimizeFunction . Select Enable from the list on the right.

Right Click on it and select Modify. Change the value to Y to enable and N to disable. Reboot.

5. Disable : "clear page file on shutdown" option. Cleaning the page-file on every shutdown means overwriting the data by zeros, and it takes time.

To clear/not clear page file you can apply this reg tweak. Back up registry before trying this.

Start->run->regedit [enter]

Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session Manager\Memory Management

Modify (if not present, rt click in open space and create) the Value Data Type/s and Value Name/s :

Data Type: REG_DWORD [Dword Value]

Value Name: ClearPageFileAtShutdown

Setting for Value Data: [0 = Clear Page File Disabled / 1 = Clear Page File Enabled]

Exit Registry and Reboot.

6. Defragment your System Disk & Fine Tune your Registry. If you find the Vista's in-built defragger slow, you can try
SysInternals Power Defragmenter which works on Vista too ! Use the freeware CCleaner to clear up your PC Junk and clean up the Registry. Compacting the Registry occasionally is a good idea too !

7. Generally people also recommend emptying the Prefetch directory once in a while. But Windows uses this directory to speed up launching

applications. It analyzes the files you use during startup and the applications you launch, and it creates an index to where those files and applications are located on your hard disk. Using this index, Windows can launch files and applications faster. Nevertheless clearing the Prefetcher say once a month is what I do !

8. Go to BIOS settings, by pressing del key during boot-up, and disable 'seek floppy drive' option. This saves time for those who do not use floppy drives. There are also some BIOS hacks like Enabling Quick Post, Disabling Boot Daly, etc but best to refrain from these.

9. Change Boot-Order Sequence : Normally, the bios is set to boot from floppy first, then CD and then Hard Disk. Changing the Boot-Order to be: Hard Disk first, then maybe CD/Floppy, could possibly "shave" a second, I guess !

10. Disable windows startup/shutdown/logon/logoff sounds. Go to control panel, sounds & audio devices, sound tab, in program events select 'no sound' for these events.

11. Disable the ScreenSaver if you dont need it. Rt-Click desktop>ScreenSaver>None>OK.

12. Fonts take time to load. Removing some can save on resources. But one must be careful in deciding which fonts to remove. If you delete some system fonts, you may b in for trouble. Tweak VI Pro is a good shareware to manage fonts. It uninstalls fonts without physically removing them. Open its help file. It lists down the system fonts which must not be deleted ! use the list; and then decide what to delete and what to keep.

13. To REALLY reduce your shutdown time.

Start Regedit. Navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control.

Click on the "Control" Folder. Select "WaitToKillServiceTimeout"

Right click on it and select Modify. the default value is ( i think) 12000.

Setting it to a lower 4 digit value,( say 1000) will make your PC shutdown faster, but you could end up losing data, so use this tweak judiciously.

14. Get rid of all the extra programs Windows Vista installs. You may not be using some like WLM, Calculator, Games, Meeting Space, Fax, etc. Go To Control Panel\Programs\Programs and Features > Turn windows On or Off and do the needful.

15. Go To Control Panel\System and Maintenance\Performance Information and Tools. On the LHS you will see options to Adjust Indexing options, visual effexts, power Settings, etc. These all help directly and indirectly.

http://www.winvistaclub.com/tips.html

Do remember that your Vista-based machine will tend to run a little faster, after the first few weeks after it's installed, thanks to its new feature called "SuperFetch"; which basically studies the programs that the user frequently runs and loads them into memory automatically.