Click here to Skip to main content
Licence CPOL
First Posted 25 Jan 2009
Views 41,424
Downloads 214
Bookmarked 61 times

47 Useful Windows Vista Command-Line Utilities

By rspercy65 | 25 Jan 2009
47 of the most used Vista apps are just 1 click away. NOTE: Vista users only.
Prize winner in Competition "Best VB.NET article of January 2009"
1 vote, 4.3%
1

2
4 votes, 17.4%
3
6 votes, 26.1%
4
12 votes, 52.2%
5
4.20/5 - 23 votes
1 removed
μ 4.06, σa 1.87 [?]
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:

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)

About the Author

rspercy65

Other

United States United States

Member
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)

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralNo action at 'Display settings' Pinmemberdherrmann13:02 27 Mar '09  
GeneralRe: No action at 'Display settings' Pinmemberrspercy5815:03 27 Mar '09  
GeneralRe: No action at 'Display settings' Pinmemberdherrmann23:15 27 Mar '09  
GeneralRe: No action at 'Display settings' Pinmemberrspercy5823:55 27 Mar '09  
GeneralNice PinmemberJared James Sullivan12:49 16 Mar '09  
GeneralRe: Nice Pinmemberrspercy5814:55 16 Mar '09  
GeneralGood Article -some advice PinmemberTino121:30 23 Feb '09  
GeneralRe: Good Article -some advice Pinmemberrspercy581:36 24 Feb '09  
GeneralVery Educantional Pinmemberpennyjp1:56 22 Feb '09  
Generalgood article PinmemberDonsw15:40 19 Feb '09  
GeneralNew Control panel app is complete. Pinmemberrspercy5813:17 28 Jan '09  
GeneralHardcoded System Path PinmemberTapsnapper8:10 28 Jan '09  
GeneralRe: Hardcoded System Path Pinmemberrspercy588:33 28 Jan '09  
GeneralRe: Hardcoded System Path PinmemberTobiasP10:43 29 Jan '09  
GeneralRe: Hardcoded System Path PinmemberTapsnapper12:05 29 Jan '09  
GeneralRe: Hardcoded System Path Pinmemberrspercy5813:51 29 Jan '09  
GeneralRe: Hardcoded System Path PinmemberTapsnapper5:04 30 Jan '09  
GeneralRe: Hardcoded System Path Pinmemberrspercy586:01 30 Jan '09  
GeneralRe: Hardcoded System Path PinmemberTapsnapper7:16 30 Jan '09  
GeneralRe: Hardcoded System Path Pinmemberrspercy588:06 30 Jan '09  
GeneralRe: Hardcoded System Path PinmemberShane Story5:15 6 Feb '09  
GeneralRe: Hardcoded System Path Pinmemberrspercy585:23 6 Feb '09  
GeneralNice concept PinmemberRick Hansen5:44 28 Jan '09  
GeneralRe: Nice concept Pinmemberrspercy588:29 28 Jan '09  
GeneralMy vote of 1 PinmemberCPAV8:56 27 Jan '09  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120209.1 | Last Updated 25 Jan 2009
Article Copyright 2009 by rspercy65
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid