Solved

Writing a script

Posted on 2006-11-03
8
295 Views
Last Modified: 2010-03-18
I need to write a script that removes an old version of software and installs a new version of software. I STINK at writing scripts and it has finally caught up to me.. Advice would be greatly appreciated.
0
Comment
Question by:Sharkgrill
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 22

Expert Comment

by:mcsween
ID: 17867980
This is a simple vbscript.  You will have to change the variables for uninstallPath and installPath.  Change these to the commands to remove the application (uninstall program or msiexec command to remove the app) and to install the new (make sure it's got the correct switches to make the install silent.)  My sample uninstalls TN3270 and installs a program on \\someserver\someshare

'~~~~~~START~~~~~~~~
Option Explicit
Dim wShell, uninstallPath, installPath

Set wShell = CreateObject("WScript.Shell")

uninstallPath = "C:\WINDOWS\IsUninst.exe -f"C:\Program Files\SDI\TN3270 Plus\Uninst.isu"
installPath = "\\SomeServer\Someshare\Setup.exe /s"

wShell.Run uninstallPath,,True
wShell.Run installPath,,True

WScript.Echo "Upgrade complete"
'~~~~~~~~~END~~~~~~~~~~~~~
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17869568
Just out of curiosity what is the software you are pulling/pushing?  It might be easier to mange with group policy.
0
 
LVL 1

Author Comment

by:Sharkgrill
ID: 17869833
I am trying to uninstall the old sprint broadband wireless software and install the newer version. There is not an upgrade
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17869932
Does the installer package come with an MSI installer file? (Usually in the root of the CD or install folder)
0
 
LVL 1

Author Comment

by:Sharkgrill
ID: 17870018
Yes it does.. I have a MSI creator so if it didn't I could create it
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17870096
You might consider removing the old software via script as mcsween mentioned and installing the new package via group policy.  This way the next time a package comes out you can delete the old policy (there is a setting that will remove the software if the policy is removed) and push out the new package.
0
 
LVL 22

Accepted Solution

by:
mcsween earned 500 total points
ID: 17870386
I agree with SamuraiCrow, if you have a msi then I would deploy the new one via GPO.

Alternatly:

Create a GPO to deploy the OLD version (the one that's currently installed)
Wait a week or so untill all clients have installed the old package (should install right over current install)
Add the New package to the GPO and on the Upgrades tab click Add, and select the OLD package
Check the box that says "Uninstall the existing package, then install the upgrade package"

You may want to test this method on a test machine before allowing it to propogate to all of AD.
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17870567
Can you provide a link to where the software can be downloaded?  I'ld like to take a look at the install options.
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question