wrender
(Fresh Scripter)
2006-10-03 01:00 AM
Add/Remove software with kixtart

Hello,

I've looked around and I can't seem to find information on adding/removing software using kixtart. Does anyone know of any how-to's for this? What I need to do is remove Netop Remote Control from all of our computers, and install Crosstec Remote Control.

I want to be able to uninstall Netop Remote Control with a login script that has Administrative privilages. A lot of the computers on our network are down at different times during the day.

I'm going to deploy the new crosstec remote with Active Directory, GPOs and an MSI Package.


Witto
(MM club member)
2006-10-03 01:32 AM
Re: Add/Remove software with kixtart

I think many consider it bad practice to use alternate credentials with admin privileges during logon.
I have never done this, but I think you can use
- KiXCrypt
- Kix2Exe
- AdminScriptEditor
- ...
You would pack the script together with the kix32.exe or wkix32.exe in an executable. The exe will unpack the script to a temp folder and launch it with the alternate credentials you provided.
But at that very moment, your users would be able to catch that script and get your admin credentials.


Les
(KiX Master)
2006-10-03 04:02 AM
Re: Add/Remove software with kixtart

Or use a GPO Startup script.

NTDOCAdministrator
(KiX Master)
2006-10-03 05:36 AM
Re: Add/Remove software with kixtart

As Les says. Use a GPO with the appropriate calls to remove the software just as you're planning on installing software with it, it can be removed as well.

Sealeopard
(KiX Master)
2006-10-03 05:57 AM
Re: Add/Remove software with kixtart

Code:

msiexec /I"NetOp Remote Control.msi" /qr REMOVE="ALL"


will uninstall Netop Remote Control


Björn
(Korg Regular)
2006-10-03 12:16 PM
Re: Add/Remove software with kixtart

using the guid for the specific applications is prefered, tho - usage of your way makes recognizing what program refering to easier.
And the way you're calling the uninstall is for me a uncommon method.



Björn
(Korg Regular)
2006-10-03 12:18 PM
Re: Add/Remove software with kixtart

since your'e planning to do this via ad and gpo and with msi, add a package install for the new package, and in that add a script for removal, or even better, add the uninstallation of the old package in the new one.

wrender
(Fresh Scripter)
2006-10-03 05:35 PM
Re: Add/Remove software with kixtart

We have two version of Netop, 8 and 9. Only with 9 where they installed with MSI packages.... the others were just installed using a regular setup.exe file. Will this make a difference if I create a GPO to remove the netop 8 and 9?

Witto
(MM club member)
2006-10-03 06:47 PM
Re: Add/Remove software with kixtart

IIWY, I would try it interactive on one computer to see that the V8 or even the V9 MSI would be able to remove the software.

wrender
(Fresh Scripter)
2006-10-03 07:46 PM
Re: Add/Remove software with kixtart

Ok thanks Witto. I am trying to use the latest Netop V9 MSI to uninstall the older versions.

wrender
(Fresh Scripter)
2006-10-03 10:01 PM
Re: Add/Remove software with kixtart

No luck with uninstalling using a GPO and MSI. This is what I tried....

Created a test workstation within the OU I am testing GPOs with. Install Netop 7.5 from a non msi setup. (This probably the case for a lot of workstations on our real network)

Added the Netop 9 MSI Package to the policy, and set to assigned.
Added the new Crosstec MSI Package to the polciy, and set it to replace/upgrade Netop 9 Msi.

Crosstec installs, but nothing happens with the Netop Stuff. Is there anyway I could use a script that would just check for any versions of netop, and then uninstall them silently?


Mart
(KiX Supporter)
2006-10-03 10:07 PM
Re: Add/Remove software with kixtart

You could have a look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, find the stuff you need to uninstall and read the value of UninstallString. Unfortunately this most likely requires admin privileges and therefore can not be run at logon if the user does not have admin privs. You could schedule a task on each machine to run a script or something that uninstalls the app. The task could even be scheduled by a remote admin script so the users will never know and can keep working.

Witto
(MM club member)
2006-10-03 10:50 PM
Re: Add/Remove software with kixtart

Les was talking about a Startup script. Not about a assigned installation.
I think he was talking about something like described here:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=137939&an=0&page=0

What I wanted to say was:
I would first install the V8.exe on a workstation and see if I was able to remove it with the v8.msi as suggested by sealeopard. Not directly implement a GPO Installer Package.
I am sorry if you misunderstood me.


Les
(KiX Master)
2006-10-04 01:00 AM
Re: Add/Remove software with kixtart

Huh? I don't think there is anything in that link about Startup scripts, only logon scripts.

Witto
(MM club member)
2006-10-04 10:20 AM
Re: Add/Remove software with kixtart

Les,
Maybe I am wrong but this is a quote from the link
Quote:


Computer Configuration/Windows Settings/Scripts (Startup/Shutdown) << This should be by machine




I thought startup scripts had to be defined there?


Les
(KiX Master)
2006-10-04 03:41 PM
Re: Add/Remove software with kixtart

Ja, that one liner does make reference to Startup scripts, but 99% of the thread is devoted to logon GPO and removing legacy scripts.

So, I stand corrected. I don't think there is MUCH OF anything in that link about Startup scripts, only logon scripts.


wrender
(Fresh Scripter)
2006-10-04 05:42 PM
Re: Add/Remove software with kixtart

So... I guess I am in a bad situation for this scenario.. We have multiple versions of netop on the workstations, and they were all installed different ways..
Looks like we will have to manually go to each site and remove the software from add/remove programs.


Witto
(MM club member)
2006-10-04 05:50 PM
Re: Add/Remove software with kixtart

I just did a quick search on the board about startup scripts in policies.
This was one of the first links I found. It helps to locate where they are situated.
I never wanted to say that the text itself was about startup scripts. Sorry if I was not clear.
There is other valuable info on the same link about startup scripts
Quote:


Note: a per-machine script (computer configuration - Startup/Shutdown) runs under SYSTEM context (meaning admin privs).




and
Quote:


But not network access unlesss SYSTEM is specifically granted network access, so I remember.





NTDOCAdministrator
(KiX Master)
2006-10-04 06:59 PM
Re: Add/Remove software with kixtart

Just create your own MANUAL uninstaller. Often can be even performed remotely.

Kill the running process with WMI and then delete the Files and Folder, and remove any of the Registry entries.


wrender
(Fresh Scripter)
2006-10-05 07:14 PM
Re: Add/Remove software with kixtart

Quote:

I think many consider it bad practice to use alternate credentials with admin privileges during logon.
I have never done this, but I think you can use
- KiXCrypt
- Kix2Exe
- AdminScriptEditor
- ...
You would pack the script together with the kix32.exe or wkix32.exe in an executable. The exe will unpack the script to a temp folder and launch it with the alternate credentials you provided.
But at that very moment, your users would be able to catch that script and get your admin credentials.




Ok, Thanks again for all the info. Witto, I just wanted to comment on this security issue. I'm guessing when the script is decrypted before it is run, the script is then run in clear text? Is this really a big worry? The user would have to know exactly when and where to look to get the password, wouldn't they?


Witto
(MM club member)
2006-10-05 07:56 PM
Re: Add/Remove software with kixtart

The executable will unpack, most probably in the %TEMP% folder, and will be there while the script runs.
Maybe you can test with something that gives you the time to see what happens:
Code:

Break On
Get $RC


Wil open a Command Prompt, and as long as you don't give any input, I presume you can see in %temp% what happens.


NTDOCAdministrator
(KiX Master)
2006-10-05 09:27 PM
Re: Add/Remove software with kixtart

Quote:

The user would have to know exactly when and where to look to get the password, wouldn't they?




Well whether you know it or not, there might actually be someone working there that actually does know or play with computers at an advanced level.

Does that mean that someone is going to find it, no. However it is just NOT a good Best Practice to employ some technique that has a potential to allow someone to obtain Domain Admin rights.

There have been suggestions to help you achieve your task with minimal risk.

You may get away with it many times but if some day someone did locate it and use it against you in a destructive manner then you would really be sorry you didn't follow stricter safety precautions.


Les
(KiX Master)
2006-10-06 02:10 AM
Re: Add/Remove software with kixtart

Quote:

Is this really a big worry? The user would have to know exactly when and where to look to get the password, wouldn't they?



Security by ignorance is not security and could get you fired.


Gargoyle
(MM club member)
2006-10-06 02:54 AM
Re: Add/Remove software with kixtart

Or as one my instructors has pointed out many times..

It would be considered an RGE
Resume Generating Event


Björn
(Korg Regular)
2006-10-06 09:03 AM
Re: Add/Remove software with kixtart

Well, to be able to uninstall something with the 'new' package, you will have to repackage the msi you wish to install to 'upgrade' existing packages (you'll add the gui for that package, and thus it will be removed if it exists). What do you mean with a non msi-setup? does the earlier versions use installshield? aaah, it's to seperate programs, now I follow (reading your line at the same time). Well, you could always build your on uninstaller and bundle it up with the msi (as a mst perhaps) for the new program.

How ever, you you're gonna do something that does not involve repackaging the msi, I suggest that you first see to that you uninstall the programs you mention seperate, then via a gpo install the msi later on.

EDIT: Packeting and repacking in my text is refering to doing it with Wise or another program..
EDIT2: I should be quiet - you're looking for ways to do this with kixtart, not wise or any other (re)packeting-programs.
EDIT3: What you could do, is simply in your gpo for the new program write a script that checks and if exists, uninstall the non-wanted programs.