Jump to content

Unable to open Add or Remove Programs using autoIT


shankhs
 Share

Recommended Posts

Hi,

This is my first day with AutoIt scripting.I am trying to write a script that automatically uninstalls a program , here is what I have done :

Send("#r")
Send("Control Panel{ENTER}")
ControlClick("Control Panel","","Edit1")
Send("Add or Remove Programs{ENTER}")

As its clear from the script I am trying to open "Add or Remove Programs" and its not opening :D Whats wrong Please help me?

Link to comment
Share on other sites

I think the way they do uninstallation of programs over here is by detecting the uninstall path defined in the registry for the programs in Add/Remove Programs.

Try the forum search. I think I saw a thread asking about that some time ago.

Edited by omikron48
Link to comment
Share on other sites

I think the way they do uninstallation of programs over here is by detecting the uninstall path defined in the registry for the programs in Add/Remove Programs.

Try the forum search. I think I saw a thread asking about that some time ago.

Thanx man

I got the thread http://www.autoitscript.com/forum/index.php?showtopic=57576&st=0&p=435995&hl=automate%20uninstall&fromsearch=1&#entry435995

but i am unable to automate the suggestion

Take a look in the registry under

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

There you will find a uninstall sting just plug it into a run() file and place the proper swich i.e... ad-aware is (my version) MsiExec.exe /X{E31C358B-63A9-4CBF-8D7F-D932ABB63244}. Change the /X to what ever for silent. Also to test it paste it into the start run command.

Any help will be highly appreciated , thanx.
Link to comment
Share on other sites

Hi,

This is my first day with AutoIt scripting.I am trying to write a script that automatically uninstalls a program , here is what I have done :

Send("#r")
Send("Control Panel{ENTER}")
ControlClick("Control Panel","","Edit1")
Send("Add or Remove Programs{ENTER}")

As its clear from the script I am trying to open "Add or Remove Programs" and its not opening :D Whats wrong Please help me?

You need to wait for the window to appear after your SEnd("Control Panel{ENTER}")

Use WinWaitACtive(...

There is an easier way to get the window though.

$RUNDLL32 = @SystemDir & "\rundll32.exe"
$cpl = 'appwiz.cpl'
Run($RUNDLL32 & " shell32.dll,Control_RunDLL " & $cpl)
#cs
To Do this Run this
To Access…. Run Command

Accessibility Controls      access.cpl

Add Hardware Wizard         hdwwiz.cpl

Add/Remove Programs         appwiz.cpl

Administrative Tools        control.exe admintools

Automatic Updates           wuaucpl.cpl

Bluetooth Transfer Wizard   fsquirt

Calculator                  calc

Certificate Manager         certmgr.msc

Character Map               charmap

Check Disk Utility          chkdsk

Clipboard Viewer            clipbrd

Command Prompt              cmd

Component Services          dcomcnfg

Computer Management         compmgmt.msc

Date and Time Properties    timedate.cpl

DDE Shares                  ddeshare

Device Manager              devmgmt.msc

Direct X Control Panel (if installed)* directx.cpl

Direct X Troubleshooter     dxdiag

Disk Cleanup Utility        cleanmgr

Disk Defragment             dfrg.msc

Disk Management             diskmgmt.msc

Disk Partition Manager      diskpart

Display Properties          control.exe desktop

Display Properties          desk.cpl

Display Properties (w/Appearance Tab Preselected) control.exe color

Dr. Watson System Troubleshooting Utility drwtsn32

Driver Verifier Utility verifier

Event Viewer                eventvwr.msc

File Signature Verification Tool    sigverif

Findfast                    findfast.cpl

Folders Properties          control.exe folders

Fonts                       control.exe fonts

Fonts Folder                fonts

Free Cell Card Game         freecell

Game Controllers            joy.cpl

Group Policy Editor (XP Prof) gpedit.msc

Hearts Card Game            mshearts

Iexpress Wizard             iexpress

Indexing Service            ciadv.msc

Internet Properties         inetcpl.cpl

Java Control Panel (if installed) jpicpl32.cpl

Java Control Panel (if installed) javaws

Keyboard Properties         control.exe keyboard

Local Security Settings     secpol.msc

Local Users and Groups lusrmgr.msc

Logs You Out Of Windows     logoff

Microsoft Chat              winchat

Minesweeper Game            winmine

Mouse Properties            control.exe mouse

Mouse Properties            main.cpl

Network Connections         control.exe netconnections

Network Connections         ncpa.cpl

Network Setup Wizard        netsetup.cpl

Nview Desktop Manager (if installed) nvtuicpl.cpl

Object Packager packager

ODBC Data Source Administrator odbccp32.cpl

On Screen Keyboard          osk

Opens AC3 Filter (if installed) ac3filter.cpl

Password Properties password.cpl

Performance Monitor perfmon.msc

Performance Monitor perfmon

Phone and Modem Options telephon.cpl

Power Configuration powercfg.cpl

Printers and Faxes          control.exe printers

Printers Folder             printers

Private Character Editor eudcedit

Quicktime (If Installed) QuickTime.cpl

Regional Settings intl.cpl

Registry Editor regedit

Registry Editor regedit32

Removable Storage ntmsmgr.msc

Removable Storage Operator Requests ntmsoprq.msc

Resultant Set of Policy rsop.msc

Resultant Set of Policy (XP Prof) rsop.msc

Scanners and Cameras sticpl.cpl

Scheduled Tasks control.exe schedtasks

Security Center wscui.cpl

Services services.msc

Shared Folders fsmgmt.msc

Shuts Down Windows shutdown

Sounds and Audio mmsys.cpl

Spider Solitare Card Game spider

SQL Client Configuration cliconfg

System Configuration Editor sysedit

System Configuration Utility msconfig

System File Checker Utility sfc

System Properties sysdm.cpl

Task Manager taskmgr

Telnet Client telnet

User Account Management nusrmgr.cpl

Utility Manager utilman

Windows Firewall firewall.cpl

Windows Magnifier magnify

Windows Management Infrastructure wmimgmt.msc

Windows System Security Tool syskey

Windows Update Launches wupdmgr

Windows XP Tour Wizard tourstart

Wordpad write
#ce

The registry entries you need might be included in this post.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...