Page 1 of 1 1
Topic Options
#24146 - 2002-07-01 04:47 PM Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Is there a way to script the Removal of an installed application through a logon Script.

Without going into too much detail (unless asked), we were thinking of writing a script if possible to remove the Altiris client from all our 2000 machines. They claimed you need to go through the add/remove programs to do this. Can this be scripted? We run NT servers and 2000 machines and are using kix 4.02. If any of you can point me in the write direction, I would appreciated it.

THanks in advance. Also, thanks to all who have helped me so far. You people are wonderful.!

Top
#24147 - 2002-07-01 04:52 PM Re: Add/Remove Programs Question (The Remove Part)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Simple way is to find the uninstall key in the registry..

code:
$keyname = "keyname for Altiris"
$uninstall = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$keyname","UninstallString")
SHELL $uninstall

This may not do the uninstall silently, but you should be able to check Altiris for info on the uninstall process and add the appropriate info to the uninstall string.

(Someone may already have a polished version of this for Altiris, but this is the basic idea.)

Brian

Top
#24148 - 2002-07-01 07:53 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
That worked, however, I can not get it to uninstall quietly.

Altiris refered us to their users guide and the switches they listed were

-s -a /REMOVE /s

So, my script reads now as this, but I tried other variations of putting the switches and I can't get the script to run without a prompt to confirm removal. FYI, the above listed switches does not even run the uninstall.

This is my test script.

$keyname = "{92F2A534-C3E4-4B18-BEBD-329F5E848C8B}"
$uninstall = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$keyname","uninstallstring")
SHELL $uninstall + " -s -a /REMOVE /s"

Top
#24149 - 2002-07-01 08:32 PM Re: Add/Remove Programs Question (The Remove Part)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Ok.. so what does the registry actually say at that location? (the variable $uninstall) .. If it already has switches, etc, then you may need to just specify your own uninstall command or remove the switches before adding others. If it uses MSI installer, the /Q:A switch works nicely (sorry I'm not too familiar with altiris client).

Brian

[ 01 July 2002, 20:32: Message edited by: BrianTX ]

Top
#24150 - 2002-07-01 09:20 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
There are no switches listed with the uninstall.

Just points to a setup.exe program

Top
#24151 - 2002-07-01 09:51 PM Re: Add/Remove Programs Question (The Remove Part)
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Have you looked closely in the registry ?

Sometimes a program also have a value for QuietUninstallString

(Sometimes it only has a value for QuietUninstallString and none for UninstallString)

Look for valuename: QuietUninstallString
code:
$keyname = "{92F2A534-C3E4-4B18-BEBD-329F5E848C8B}"
$Quiet = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$keyname","QuietUninstallString")
If "$Quiet" ; You are lucky
Run "$Quiet"
EndIf

-Erik

Top
#24152 - 2002-07-01 10:03 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Double checked the registry, no QuietUninstallString listed. I put it in the script anyway, but alas, nothing happened.

Thanks for the suggestion though. I will have to remember that one.

Top
#24153 - 2002-07-02 05:24 PM Re: Add/Remove Programs Question (The Remove Part)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Did you run the uninstall script under administrative privileges?
_________________________
There are two types of vessels, submarines and targets.

Top
#24154 - 2002-07-02 07:48 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Yes, I have admin rights.
Top
#24155 - 2002-07-03 02:06 PM Re: Add/Remove Programs Question (The Remove Part)
Rocco Capra Offline
Hey THIS is FUN
*****

Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
You have your SHELL cmd like so...

SHELL $uninstall + " -s -a /REMOVE /s"

Try this...

SHELL '$uninstall + " -s -a /REMOVE /s"'

My 1 cent,
Rocco
_________________________
I Love this board!! -------------------- My DEV PC is running KIX 4.22 WINXP Pro

Top
#24156 - 2002-07-03 02:45 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Thanks for the 1 Cent. However, It did not work.

Thanks anyway all. I resigned to the fact that we will have to trust the users to hit 'OK'. I know it doesn't seem like a lot to expect of our users, but unfortunately, it is [Frown]

Thanks for all the help anyway guys/gals.!

Top
#24157 - 2002-07-03 02:58 PM Re: Add/Remove Programs Question (The Remove Part)
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hey don't give up!

how do you install that software?

if the uninstall uses setup.exe it should have same uninstall swithces for silent as in installation.

but:
$keyname = "{92F2A534-C3E4-4B18-BEBD-329F5E848C8B}"
$uninstall = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$keyname","uninstallstring")
SHELL $uninstall + " -s -a /REMOVE /s"

-s and /s???

if it's setup it's either one...
or even -q

cheers,
_________________________
!

download KiXnet

Top
#24158 - 2002-07-03 03:17 PM Re: Add/Remove Programs Question (The Remove Part)
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Failing the silent options, you could always do a SETFOCUS & SENDKEYS to click the Okie Dokie button.
Top
#24159 - 2002-07-03 05:29 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
According to another post, this should work also after running the setup -r command. Then I move the newly setup.iss file to the same directory that setup.exe is run. But it didn't work also.

$keyname = "{92F2A534-C3E4-4B18-BEBD-329F5E848C8B}"
copy "\\eb0q2\programs\setup.iss" "C:\Program Files\InstallShield Installation Information\{92F2A534-C3E4-4B18-BEBD-329F5E848C8B}\"
$uninstall = READVALUE("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$keyname","UninstallString")
SHELL $uninstall + " -s"

I am not sure how SENDKEY works in this situation.
The send key wont work until after the unstall finishes.

Top
#24160 - 2002-07-03 07:20 PM Re: Add/Remove Programs Question (The Remove Part)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
cond,
First of all, have you tried different combinations of '-s -a /REMOVE /s' from a DOS prompt rather than from KiX? It may just be the way you're doing the SHELL line. I prefer to compose the line in a var first.

$ShellCMD = Chr(34) + $WorkDir + "\symcdefsx86.exe" + Chr(34) + " /q /extract /vdb " + $TempDir
Shell '$ShellCMD'

If you want to SetFocus() and SendKeys() then you need to use RUN and not SHELL. A search on the board should give you plenty of examples.

[ 03 July 2002, 19:21: Message edited by: LLigetfa ]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24161 - 2002-07-03 08:21 PM Re: Add/Remove Programs Question (The Remove Part)
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Cond...

I have a different question. WHY Why are you removing Altiris from the systems in the first place. This product appears to be a very cool product. Its not cheap either... so why is your Company dumping it?

Are they the 30-90 day eval versions? or the full clients?

Top
#24162 - 2002-07-03 09:01 PM Re: Add/Remove Programs Question (The Remove Part)
condichiamnotanetworkguy Offline
Fresh Scripter

Registered: 2002-06-10
Posts: 18
Loc: Pittsburgh
Good Question.

Well, as I stated, I am not a network guy.

Many moons ago, we had a consultant in to look at products to push out software and updates. We got the Altiris eval. After a while, he recommended that we purchase this, so my boss did.
Anyway, to make a long story short, they (our network people), never got it to work right. So they wanted it clean off the machines. I do not know all of the details. But that is the story in a nutshell.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.072 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org