Scripting Add/Remove Programs via control panel

Hi Experts!  

I am trying to simplify something that is already pretty simple -- but humor me, please!
We take advantage of the Control Panel option to install programs from the network. (See attached screen shot.)  I would like to automate the kick off of such available installations through scripting, such as VBScript.  I just don't know how to address such controls.  I would even consider a crafty macro capturing program if it would work, however we are deploying this to mixed XP and Windows 7 environments and the different nuances might make this tricky.

Help!

Thanks in advance,
JeremyMorel
screenshot.gif
LVL 1
Jeremy MorelSenior ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sr75Commented:
I have attached a script I used once to bounce a nic using vbscript and the control panel.  I don't know how to do what you want to do, but the attached may help point you down the right path.

'########################################################################################
'#											#
'#	Name:		RepairNIC.vbs							#
'#	Version:	1.0.0								#
'#	Created:	February 26th, 2007						#
'#	Modified:	n/a								#
'#	Author:		Martin Roeske							#
'#											#
'#	Description:	This script will run the repair utility on the defined NIC	#
'#											#
'#	Modified:	N/A								#
'#											#
'#	Notes:		This script uses the Control Panel via the shell.application	#
'#			Namespace.  It searches for the Network COnnections folder	#
'#			Then searches for the defined NIC.  It can then perform just 	#
'#			about action that you would normally get when you right-click	#
'#			defined NIC (including Enabling/Disabling the NIC)		#
'#											#
'#			Verb				Script Command			#
'#			----------------------------------------------------------	#
'#			Enable 				En&able (if disabled)		#
'#			Disable				Dis&able (if enabled)		#
'#			Status				Stat&us				#
'#			Repair				Re&pair				#
'#			Bridge Connections		Brid&ge Connections		#
'#			Create Shortcut			Create &Shortcut		#
'#			Delete				???				#
'#			Rename				Rena&me				#
'#			Properties			P&roperties			#
'#											#
'########################################################################################
'---------------------------------------------------------------------------
'
'				Main Function
'
'---------------------------------------------------------------------------
On Error Resume Next


'================================
'      Define Constants
'================================
Const ssfCONTROLS = 3
Const conVerb = "Re&pair"


'================================
'        Set Variables
'================================
strConnection = "External"

Set WShell = CreateObject("Wscript.Shell")
set Shell = CreateObject("Shell.Application")
set objCP = Shell.Namespace(ssfCONTROLS)
set objNetCon = Nothing
set objLanCon = Nothing


'================================
'       Get Object
'================================
For Each Folder in objCP.items
	If Folder.Name = "Network Connections" then
		set objNetCon = Folder.GetFolder: Exit For
	End If
Next

If objNetCon is Nothing then
	wscript.quit
End If


'================================
'         Perform NIC Repair
'================================
For Each Connection in objNetCon.Items
	If lcase(Connection.Name) = lcase(strConnection) then
		set objConnection = Connection
		strStatus = ObjConnection.invokeverb(conVerb)
		Wshell.popup strstatus,30

	End If
Next


'================================
'        Perform Clean Up
'================================
Set WShell = Nothing
set Shell = Nothing
set objCP = Nothing
set objNetCon = Nothing
set objLanCon = Nothing

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
abelenkiyCommented:
Msiexec /I blah.exe /q
Msiexec /uninstall blah.exe
You can check hklm/software/Microsoft/windows/currentversion/uninstall
Look for your applications uninstall string
Better off using autoitscript for this kind of stuff.
Its a free environment.
WWW.autoitscript.com
check out my blog http://nyitsupport.blogspot.com
For some samples
0
abelenkiyCommented:
For example HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90110409-6000-11D3-8CFE-0150048383C9} contains a DisplayName Microsoft Office Professional Edition 2003.
UninstallString value is MsiExec.exe /I{90110409-6000-11D3-8CFE-0150048383C9}
So you would just script MsiExec.exe /I{90110409-6000-11D3-8CFE-0150048383C9} /quiet to facilitate uninstall of Microsoft Office Professional Edition 2003.
What you see in the DisplayName field is what is seen in Add Remove Programs.
http://support.microsoft.com/kb/314481
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.