Sign in to follow this  
Followers 0
sudarkrao

How to open the control panel using RUN

11 posts in this topic

Hi,

How to open th control panel using RUN function ?

We can open notepad by using this function

I am not able to open the control panel using this

and I want to add or remove any program available in the list automatically

please share some script to do the same

Thanks in advance

Rama

Share this post


Link to post
Share on other sites



For Control Panel I use in XP:

Run("control.exe")oÝ÷ ØZ+×Z^Þ>º ­©¬"ëuÏjëh×6Run("control.exe appwiz.cpl")

Share this post


Link to post
Share on other sites

For Control Panel I use in XP:

Run("control.exe")oÝ÷ ØZ+×Z^Þ>º ­©¬"ëuÏjëh×6Run("control.exe appwiz.cpl")
Hi,

Great!

Please share some code to add or delete a program

Howto find out a program in the list of installed programs and thereby i have to click on remove button

Thanks

Rama

Share this post


Link to post
Share on other sites

For Control Panel I use in XP:

Run("control.exe")oÝ÷ ØZ+×Z^Þ>º ­©¬"ëuÏjëh×6Run("control.exe appwiz.cpl")
Hi,

Great!

Please share some code to add or delete a program

Howto find out a program in the list of installed programs and thereby i have to click on remove button

Thanks

Rama

Share this post


Link to post
Share on other sites

Hi

once you open control panel...how do you open "display" for instance

or any other function in the control panel...is there a list of commands (cpl)?

like the one for "add/del programs" ShellExecute("control.exe", "appwiz.cpl") ???

thanks in advance

Al

Share this post


Link to post
Share on other sites

I found this on the interweb some years ago. Haven't thought about it until today. :)

Control Panel Applets

access.cpl - Accessibility Applet

appwiz.cpl - Add/Remove Programs Applet

console.cpl - Console Applet

timedate.cpl - Date and Time Applet

desk.cpl - Display Applet

fax.cpl - Fax Applet

hdwwiz.cpl - Hardware Wizard Applet

irprops.cpl - Infrared Port Applet

intl.cpl - International and Regional Applet

inetcpl.cpl - Internet Settings Applet

joy.cpl - Joystick Applet

liccpa.cpl - Licensing Applet

main.cpl - Mouse and Keyboard Applet

mlcfg32.cpl - Mail Applet

mmsys.cpl - Sound and Multimedia Applet

modem.cpl - Modem and Phone Applet

ncpa.cpl - Network and connectivity Applet

netcpl.cpl - Network and Dial-up Connectivity Applet

nwc.cpl - Netware Client Applet

odbccp32.cpl - ODBC Applet

devapps.cpl - PC Card Applet

ports.cpl - Ports Applet

powercfg.cpl - Power Management Applet

sticpl.cpl - Scanner and Camera Applet

srvmgr.cpl - Server Manager Applet

sapi.cpl - Speech Properties Applet

sysdm.cpl - System Applet

telephon.cpl - Telephony Applet

tweakui.cpl - TweakUI Applet

nusrmgr.cpl - User Manager Applet

wspcpl32.cpl - WSP Client Applet

quicktime.cpl - QuickTime Applet

S32LUCP1.cpl - Norton Live Update Applet

cpqmgmt.cpl - Compaq Insight Agents Applet


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites

ksmith

thanks a lot..very useful info

Al

Share this post


Link to post
Share on other sites

you don't need to open control panel for uninstalling/Removing a Program, just uninstall it using the direct uninstall command. if you are trying to uninstall a windows installer program then try the following commands for it.

msiexec /Option <Required Parameter> [Optional Parameter]

Install Options

</package | /i> <Product.msi>

Installs or configures a product

/a <Product.msi>

Administrative install - Installs a product on the network

/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]

Advertises a product - m to all users, u to current user

</uninstall | /x> <Product.msi | ProductCode>

Uninstalls the product

Display Options

/quiet

Quiet mode, no user interaction

/passive

Unattended mode - progress bar only

/q[n|b|r|f]

Sets user interface level

n - No UI

b - Basic UI

r - Reduced UI

f - Full UI (default)

/help

Help information

Restart Options

/norestart

Do not restart after the installation is complete

/promptrestart

Prompts the user for restart if necessary

/forcerestart

Always restart the computer after installation

Logging Options

/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>

i - Status messages

w - Nonfatal warnings

e - All error messages

a - Start up of actions

r - Action-specific records

u - User requests

c - Initial UI parameters

m - Out-of-memory or fatal exit information

o - Out-of-disk-space messages

p - Terminal properties

v - Verbose output

x - Extra debugging information

+ - Append to existing log file

! - Flush each line to the log

* - Log all information, except for v and x options

/log <LogFile>

Equivalent of /l* <LogFile>

Update Options

/update <Update1.msp>[;Update2.msp]

Applies update(s)

/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>

Remove update(s) for a product

Repair Options

/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>

Repairs a product

p - only if file is missing

o - if file is missing or an older version is installed (default)

e - if file is missing or an equal or older version is installed

d - if file is missing or a different version is installed

c - if file is missing or checksum does not match the calculated value

a - forces all files to be reinstalled

u - all required user-specific registry entries (default)

m - all required computer-specific registry entries (default)

s - all existing shortcuts (default)

v - runs from source and recaches local package

Setting Public Properties

[PROPERTY=PropertyValue]

Consult the Windows ® Installer SDK for additional documentation on the

command line syntax.


Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel

Share this post


Link to post
Share on other sites

I found this on the interweb some years ago. Haven't thought about it until today. :)

Control Panel Applets

access.cpl - Accessibility Applet

appwiz.cpl - Add/Remove Programs Applet

console.cpl - Console Applet

timedate.cpl - Date and Time Applet

desk.cpl - Display Applet

fax.cpl - Fax Applet

hdwwiz.cpl - Hardware Wizard Applet

irprops.cpl - Infrared Port Applet

intl.cpl - International and Regional Applet

inetcpl.cpl - Internet Settings Applet

joy.cpl - Joystick Applet

liccpa.cpl - Licensing Applet

main.cpl - Mouse and Keyboard Applet

mlcfg32.cpl - Mail Applet

mmsys.cpl - Sound and Multimedia Applet

modem.cpl - Modem and Phone Applet

ncpa.cpl - Network and connectivity Applet

netcpl.cpl - Network and Dial-up Connectivity Applet

nwc.cpl - Netware Client Applet

odbccp32.cpl - ODBC Applet

devapps.cpl - PC Card Applet

ports.cpl - Ports Applet

powercfg.cpl - Power Management Applet

sticpl.cpl - Scanner and Camera Applet

srvmgr.cpl - Server Manager Applet

sapi.cpl - Speech Properties Applet

sysdm.cpl - System Applet

telephon.cpl - Telephony Applet

tweakui.cpl - TweakUI Applet

nusrmgr.cpl - User Manager Applet

wspcpl32.cpl - WSP Client Applet

quicktime.cpl - QuickTime Applet

S32LUCP1.cpl - Norton Live Update Applet

cpqmgmt.cpl - Compaq Insight Agents Applet

Hi,

Thanks for such useful information

Actually i am trying to remove some programs that are listed in the add/remove programs list

Currently i am not able to get the number of programs available in the list and not able to search for a particular program

Can you please help me on this ?

I am using $iIndex=_GUICtrlListBox_FindInText($hListBox, "BaseTEST") to search for BaseTEST application in the lsit and thereby i want to click on that to remove

Thanks ,

Rama

Share this post


Link to post
Share on other sites

Hi sudarkrao,

1st Welcome to the AutoIt Forums! :idiot:

Some of the following tips may not apply to you, but it may make your life a bit easier here on the forum in the future.

CODE
  • Did you know that we have an awesome search feature?

    You can find many answers to your current questions, just by typing in the right search patterns.

  • A suggestion is to use the Advanced Search mode:

  • Type your specific search term in quotes.
  • Click the forum you want to search in (the one most likely to have your information would generally be the Example Script forum and or the General Help and Support Forum).
  • Click on "Search titles only" radio button.
  • Click perform search.
The above will help you narrow down your searches and prevent you from unneccesarily posting a new thread.

[*]Also, you should try to read the Sticky posts that are at the top of each of the AutoIt Forums you enter such as:

[*]Forum Etiquette:

  • Making a new thread:

    • Use the Search feature first to see if your question has already been answered.
    • Look in the help file as well before even thinking of posting (When what you want could be obtained by simply reading the help file, you don't generally get a good response from your AutoIt community).
    • Titles are very important here. 1 word titles or titles like "help me", "write something for me", "I'm a noob" etc... aren't tolerated.
    • Use common sense when creating a new thread.

      Ask yourself if the title is descriptive enough to even interest someone (preferably those that know what they are talking about) to even look at your thread, let alone reply in it.

    • Think about how it would show in the search feature if someone were to look for something just like you are looking for (think of the keywords you used yourself and obviously didn't find anything (because we know you used the search feature :) ) and use those types of keywords in your title as well).
  • Thread content:

    • Be descriptive with your query. (Make sure we actually know what you want to do).
    • Show you've made an effort in coding what you want (provide the reproducer code (generally no more than 50 lines as people lose interest in debugging someones script for free)).
    • Don't talk in ebonics. A lot of the forum members are adults, and a lot of them know how to help you, but talk like a child, you'll be treated as such.
    • Don't ask for help making keyloggers, spam (even if it's to do as a prank), or anything that can be thought of as malicious. You'll more than likely have the thread locked by a moderator, and take a bashing from your fellow AutoIt community.
    • When posting code, use code boxes. This can be accomplished by using [code ]<content here>[/code ] (No spaces between the brackets []).

      Using code boxes will keep the indentation and make it easier to read for others to help you.

  • Bumping your threads:

    • Use common courtesy here.

      Keep in mind every time you bump your thread to the top of the forum, you knock the other threads down a notch.

      Everyone posting for help has just as much right for their threads to get read as you do.

      Because of that, do not bump your post more than once in a 24 hour period.

      A Bump is simply posting in your thread with nothing that pertains to your query with the sole purpose of moving it up.

      Deleting previous bumps, and posting new ones is not tolerated, and the moderators can find those deletions, so do yourself a favor and don't cross that line >_< .

  • Rude or obnoxious content:

    This falls pretty much under the common sense thing. If you use it (common sense) before posting, you won't have issues.

    • Don't use foul language, remember, a lot of the community is at work when they read these threads.
    • Don't provoke or instigate an argument with someone.
  • Double Posting:

    • It's understood that sometimes there's a lag in the system, and sometimes people don't see their post go up right aways so they post again.

      If this happens to you, simply notify a moderator with the report feature in the post, and politely ask them to delete it.

    • If you're just creating another topic because your original topic is not being answered the way you want or at all, this is not tolerated. You could lose your posting privileges all together over it.
  • Non-English languages

    • If English is not your primary language, please make an attempt to interpret (yourself or online) and post that interpretation.

      We have wonderful users from around the world, so after you've done your post in English, back it up with your question also in your native tongue (You may find your answer much quicker using both).

That's it for now, I hope you have a wonderful learning experience, and hope to see you contribute to the community as your knowledge grows.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Have you read ChromeFan's post above? Unless you are just looking for a challenge there is generally no reason to build a GUI to uninstall an application. Look in the registry HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall and find the app you want to remove. There should be a value named UninstallString. If the original install was an MSI it gets real simple. Run the value data from UninstallString from a command line. Be sure to change 'msiexec /i' to 'msiexec /x' though.

Edit: Clarification

Edited by ksmith247

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0