Click here to Skip to main content
15,881,671 members
Articles / Desktop Programming / Win32

47 Useful Windows Vista Command-Line Utilities

Rate me:
Please Sign up or sign in to vote.
4.31/5 (25 votes)
25 Jan 2009CPOL2 min read 86.7K   734   64   37
47 of the most used Vista apps are just 1 click away. NOTE: Vista users only.
VistaCommands

Introduction

Have you ever tried to find a specific app in Vista, and when you did find it, how many mouse clicks did it take you to get there? 2, 3,...10? how many? If this has happened to you, then this is what you need. This app has 47 of the most commonly used command line functions(Example: RunDll32.exe, shell32.dll, Control_RunDll, appwiz.cpl, 0). This brings up the Add/Remove Programs dialog form. Copy and Paste this in your Start, Search box (and press the Enter key) to see what happens.

Typing these command lines and using multiple mouse clicks gets a little tiresome when trying to get to a specific point in the Vista arsenal of apps. So, I put all 47 commands in button click events.

Background

This program is not what I had intended. I was searching the net for a list of .NET DLLs and all their functions when I came across this site which can be viewed here. This site has a few tips-n-tricks and the 47 command lines that I use in the program.

All the command lines use 'RunDll32.exe' as a starting point, then the arguments list follows. The arguments consist of a few *.dll and *.cpl files that are all located in the 'C:\Windows\System32\' folder.

Problems... Always Problems

The first and only problem I came across was 'How do I execute these command lines in a button_click event?' I am not well versed in VB, but, I am learning. After a few failures and racking my brain, I decided to check out the Process Component in the tool box. I searched the properties and saw the 'Arguments, FileName, and Working Directory properties.' This was everything I needed to execute the command lines. The code is given below:

VB.NET
Public Class frmUtilities
    Inherits Form
    Dim fileArgs As String
    Dim path As String = "C:\Windows\System32\"

    Private Sub btnAddRemove_Click(ByVal sender As System.Object, ByVal e As 

System.EventArgs) Handles btnAddRemove.Click
        fileArgs = "shell32.dll,Control_RunDLL appwiz.cpl,,0"
        cmdProcess.StartInfo.Arguments = fileArgs
        cmdProcess.StartInfo.WorkingDirectory = path
        cmdProcess.StartInfo.FileName = "RunDll32.exe"
        cmdProcess.Start()
        cmdProcess.WaitForExit()
        Me.Focus()
        Me.Show()
    End Sub

    Private Sub btnContAdvisor_Click(ByVal sender As System.Object, ByVal e 

As System.EventArgs) Handles btnContAdvisor.Click
        fileArgs = "msrating.dll,RatingSetupUI"
        cmdProcess.StartInfo.Arguments = fileArgs
        cmdProcess.StartInfo.WorkingDirectory = path
        cmdProcess.StartInfo.FileName = "RunDll32.exe"
        cmdProcess.Start()
        cmdProcess.WaitForExit()
        Me.Focus()
        Me.Show()
    End Sub
    'Continues on
    'with the rest
    'of the 47 button-click events.
End Class 

CAUTION

All the Delete button click events 'DO NOT' bring up any dialog windows. They start automatically. Be careful when using these click events. Make back-ups of all your files and stuff you will want to keep. An ounce of prevention... you know the rest.

WINDOWS XP USERS: You will have to do some digging on your own to find the correct '*.cpl' files to use in some of these. Vista uses 'inetcpl.cpl' and XP might use 'inet.cpl'. I'm not sure about the exact file name so do some research on this subject before use.

UPDATES

I just added some message boxes for the delete buttons giving you a choice to delete or not to delete. I also fixed the Internet Options fileArgs to work correctly and I disabled the Open With button because it had no use in this program. Special thanks goes to Hans Dietrich for his idea on the message box implementation.

History

  • 25th January, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Retired
United States United States
I am currently retired.
I have no degree but I have some programming experience
when I was in college(Cobol, Pascal).

My accomplishments thus far are;
Best VB.Net article for January(2009)
Best VB.Net article for July(2009)

Comments and Discussions

 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey24-Feb-12 2:05
professionalManoj Kumar Choubey24-Feb-12 2:05 
GeneralNo action at 'Display settings' Pin
dherrmann27-Mar-09 12:02
dherrmann27-Mar-09 12:02 
GeneralRe: No action at 'Display settings' Pin
rspercy6527-Mar-09 14:03
rspercy6527-Mar-09 14:03 
GeneralRe: No action at 'Display settings' Pin
dherrmann27-Mar-09 22:15
dherrmann27-Mar-09 22:15 
GeneralRe: No action at 'Display settings' Pin
rspercy6527-Mar-09 22:55
rspercy6527-Mar-09 22:55 
GeneralNice Pin
J Sullivan16-Mar-09 11:49
J Sullivan16-Mar-09 11:49 
GeneralRe: Nice Pin
rspercy6516-Mar-09 13:55
rspercy6516-Mar-09 13:55 
GeneralGood Article -some advice Pin
Tino123-Feb-09 20:30
Tino123-Feb-09 20:30 
GeneralRe: Good Article -some advice Pin
rspercy6524-Feb-09 0:36
rspercy6524-Feb-09 0:36 
GeneralVery Educantional Pin
pennyjp22-Feb-09 0:56
pennyjp22-Feb-09 0:56 
Generalgood article Pin
Donsw19-Feb-09 14:40
Donsw19-Feb-09 14:40 
GeneralNew Control panel app is complete. Pin
rspercy6528-Jan-09 12:17
rspercy6528-Jan-09 12:17 
I just finished a new version of this app with a new UI. It has a MDI Parent form w/ 6 MDIchild forms categorized. The first 5 forms are the most commonly used apps and the CompleteList form Is a complete list of all the control panel apps. I cant upload it as it exceeds the upload limit. It is 8.18 meg in size because of all the jpeg files that are used in picture boxes.

If you would like to examine it, please leave your e-mail and I will upload it to you.

THNX everyone for such a good response to this article, over 4000 views in 4 days.

rspercy
1 + 1 = 186,440....Depending on the species.

GeneralHardcoded System Path Pin
Euhemerus28-Jan-09 7:10
Euhemerus28-Jan-09 7:10 
GeneralRe: Hardcoded System Path Pin
rspercy6528-Jan-09 7:33
rspercy6528-Jan-09 7:33 
GeneralRe: Hardcoded System Path Pin
TobiasP29-Jan-09 9:43
TobiasP29-Jan-09 9:43 
GeneralRe: Hardcoded System Path Pin
Euhemerus29-Jan-09 11:05
Euhemerus29-Jan-09 11:05 
GeneralRe: Hardcoded System Path Pin
rspercy6529-Jan-09 12:51
rspercy6529-Jan-09 12:51 
GeneralRe: Hardcoded System Path Pin
Euhemerus30-Jan-09 4:04
Euhemerus30-Jan-09 4:04 
GeneralRe: Hardcoded System Path Pin
rspercy6530-Jan-09 5:01
rspercy6530-Jan-09 5:01 
GeneralRe: Hardcoded System Path Pin
Euhemerus30-Jan-09 6:16
Euhemerus30-Jan-09 6:16 
GeneralRe: Hardcoded System Path Pin
rspercy6530-Jan-09 7:06
rspercy6530-Jan-09 7:06 
GeneralRe: Hardcoded System Path Pin
Shane Story6-Feb-09 4:15
Shane Story6-Feb-09 4:15 
GeneralRe: Hardcoded System Path Pin
rspercy656-Feb-09 4:23
rspercy656-Feb-09 4:23 
GeneralNice concept Pin
Rick Hansen28-Jan-09 4:44
Rick Hansen28-Jan-09 4:44 
GeneralRe: Nice concept Pin
rspercy6528-Jan-09 7:29
rspercy6528-Jan-09 7:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.