PDA

View Full Version : How to uninstall other s/w....


intellogo
04-01-2007, 01:17 PM
Hi,

My s/w package consists of two parts:
1. Install a pre-required .MSI package
2. Main S/W

The installation of both these two parts are perfect. But NOT the uninstallation part.
The Main S/W uninstallation is fine becoz its managed by SF7.
But this issue is about uninstalling the topics at point: 1

I need to uninstall the .MSI package which was embedded into my SF7 project.

MY ISSUE:
=======
When i install my main s/w, then both points: 1 & 2, get installed. But when i uninstall, then only the mains/w gets uninstalled and NOT the first .MSI file.
I can uninstall it via the Windows Control Panel....but i dont want to allow this since it can create complications for the end user, if an event of re-installation ever takes place.
So, i want to uninstall the .MSI package also when my Main S/W is uninstalled.

How do go abt this....

I dont know any code in SF7....

Awaiting urgent reply....

----
Regards,
intellogo.

JXBURNS
04-01-2007, 04:18 PM
You are probably better off reading this (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/msiexec.mspx?mfr=true) which explains how to use the command line to install/remove MSI files.

John

intellogo
04-02-2007, 05:30 AM
Hi,

Well, thanks for providing a reponse...

I am not asking for removal of s/w creatad by me, except the .MSI fils that have beenm packed into the setup installer.

Please could u provide me a solution with respect to CR 11

JXBURNS
04-02-2007, 06:35 AM
Don't forget that SUF7 will only uninstall files it knows it has installed. So if you added a MSI via an Action then you need to tell the Uninstaller to remove that by another action within that part of the project.

But if you are trying to have the MSI uninstall the application automatically then you need to use the MSIEXEC solution I already advised you about and call it from a FILE.RUN command.

As for CR11 I have no idea. If it came with a MSI installer then use MSIEXEC to uninstall it.

John

intellogo
04-02-2007, 09:01 AM
I used this Action for installing my MSI file being embedded into my SF7 project....

File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe"), "/i \""..SessionVar.Expand("%TempLaunchFolder%\\Merge Modules.MSI").."\"","", SW_SHOWNORMAL, true);
.
.
.
.
Now, should i use the DELETE action to remove it, when SF7 uninstalls my normal s/w.....???

File.Delete(SessionVar.Expand("%SystemFolder%\\msiexec.exe"), "/i \""..SessionVar.Expand("%TempLaunchFolder%\\Merge Modules.MSI").."\"","", SW_SHOWNORMAL, true);

Awaiting reply eagerly....

JXBURNS
04-02-2007, 09:06 AM
If you are trying to delete just the MSI file then a normal FILE.DELETE will do it without the requirement to run MSIEXEC.

But if you are trying to uninstall the software installed by the MSI then you need to do another FILE.RUN but with /x instead of /i as the parameter to MSIEXEC. Try typing MSIEXEC /? at a command prompt for list of valid commands.

John

intellogo
04-02-2007, 11:05 AM
Please read very carefully, then u'll get my point...

With ur reply, now this issue is bubbled up with a new angle.

Lets get the deletion conecpt out of this case. I dont wanna delete the file. But i want to properly uninstall it...meaning all its related files will get removed.

Yesterday, i noticed that if i uninstall it manually, by dbl clickking the the same .msi file, then it pops up a dialog box. This dialog box detects that the msi file is already installed, so it provides a couple of radio button options to REPAIR INSTALL, MODIFY INSTALL or UNNISTALL. I dont want to provide the user this dialog box becoz it can lead to some complications in the event of the re-installation of my s/w.

NOTE: The .msi file contains the inbuilt Word Viewer 2003.

For Example: If the user, supposedly, has installed my s/w (made with SF7 and containing the extra .msi file) already on his PC..once. And he does not remember that or whatever...hence he installs my s/w again, then what will happen is that, since this .msi file was already installed before, and is again being re-installed, then he will get a pop-up box with those 3 options that i have stated above (in CAPS)...now he gets confused...and does not know what to do..with so many options.
So what i did to make the installation process simple...is that i used the ORCA tool from the Windows SDK package and deleted some tables which giev these pop-up boxes that have options.
So what happens now is that, if a re-installation event occurs by chance, then the .msi file is forcefully installed everytime (without those 3 options)..thus making the end-user's installation xperience simple.

But, i want to uninstall the s/w along with that embedded .msi file, as a good practice of removing left over debris. And the only way i found to a successfull uninstallation of that .msi file was by clicking the REMOVE button of this .msi item in the Windows Add/Remove Programs tool. This way, no pop-up happens, and the .msi file is simply & successfully uninstalled...but this is a manual process...
Can i incorporate this command/concept into SF7, so that it triggers the REMOVE button of this .msi item in the Windows Add/Remove Programs tool
for an automated uninstall of this .msi embedded file ???

I hope u could understand....my explanation ??
Awaiting ur vital replies....

JXBURNS
04-02-2007, 11:24 AM
Have you actually tried using msiexec /x nameofmsi.msi /quiet within a FILE.RUN statement (or even manually)as described in my earlier post where I pointed you to the Microsoft Product Documentation article?

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/msiexec.mspx?mfr=true

I understand what you are trying to do but that is what MSIEXEC is designed to do and normally works OK without prompting the user to do anything.

The same procedures can be used to reinstall an application without user intervention as well (by use of the /quiet parameter) and not having to use ORCA at all.

John

jcuster
04-02-2007, 11:45 AM
1. Look in this registry key for the installed programs {GUID}

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Uninstall

2. Use msiexec /x{GUID} /q[bn+-]

GUID is the package ID of the software.

[bn-+] are optional parameters that may be used.

b = basic dialog (Progress only)
n = silent
+ = cancel button (default option)
- = no cancel button

intellogo
04-02-2007, 01:39 PM
JXBurns this is to u..
This issue relates to the non-ORCA edited file...meaning actual stuff...and to test the CLI things...before i use it in SF7.

I have been trying the uninstall CLI stuff...
and it seems to work....but see...

My .msi file is named as "Merge Modules.msi", which was made with
Microsoft Visual Studio Installer tool.
When i am installing it then i have to browse a path to install it. Normally i dont change this and it states that it will get installed at path..."C:\Program Files\Merge Modules".

But after i have installed it, There is no sub-folder as "Merge Modules" in the Program Files folder. And at the same time it appears as an item "Merge Modules" in the Windows Control Panel Add Remove list.

But when i do a registry search, then i get to know that it is being stored in the path...."C:\WINDOWS\Installer" with a file name as xxxxxx.msi.
Now if i uninstall this file and install it again, then it stores as yyyyyy.msi. So everytime i install it, it is stored with a different name in the path...."C:\WINDOWS\Installer".
.
.
Now with reference to ur cli syntax....

u have given me this syntax: msiexec /x nameofmsi.msi /quiet
Ur syntax is working perfectly. But if i have to put this into SF7, with the same File.RUN code as i showed u earlier, then how do i put the correct file name for the part..."nameofmsi.msi"..becoz this is changing everytime for every install.

I have attached 2 images with this post, to show u the different names that are bieng taken up by installing this .msi file:
================================
image 1: "first instance of install.jpg"
image 2: "second instance of install.jpg"
================================

Awaiting ur informative and progressive response....

intellogo
04-02-2007, 02:07 PM
jxburns and jcuster..this is to u ...

Do u know by means of orca or any equivalent tool, how can I delete the CANCEL button and he CROSS (on window top) that appears duing the installation progress of any .MSI file ??

This would be also extremely helpfule..thanks in advance for u both guys to spare some valueable time for me to help me solve my issues.
Awaiting status....

jcuster
04-02-2007, 02:24 PM
Would it be an Idea to use the .MSI as a Primer file?

Then just copy it to where it you need it?

Then You could use the file.run?

I noticed in both of those pictures the MSI showed the same Package GUID.

After you are sure that the MSI has completed then do a File.search to find all the 1c5210a.MSI files. Delete all the found entries.

intellogo
04-02-2007, 02:48 PM
jcuster..

I am also noticing that the GUID is same for every install instance...
Then probably i could use it in SF7.

I did a full PC search and found that its getting installed only in that Installer folder and no where else.


see...i have embedded this .msi file into SF7 installer setup.exe as a Primer file, so that it gets installed auto at the destination pc, before any of my remaining s/w files get installed. Becoz this .msi file gives support for CR 11 (Crystal Report 11 reporting toolkit) in my project.

So, now can u tell me what is the exact syntax to be used in the Action: POST-UNINSTALL to uninstall that .MSI file ??

I have used this code and also get an error msg for which i have attached a pic again...."error msg.jpg":
================================================== =====
File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe"), "/i \""..SessionVar.Expand("%C:\WINDOWS\Installer%\\msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /passive").."\"","", SW_SHOWNORMAL, true);
================================================== =====


this cli comand works fine in the command prompt window but not in SF7:
----------------------------------------------------------------------
msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /passive

Awaiting ur help eagerly...and is it possible to get in touch with u now in YAHOO messenger ...??

JXBURNS
04-02-2007, 05:09 PM
Try putting the whole command in the first parameter something like this:

File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe") .. " /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /passive","","", SW_SHOWNORMAL, true);

John

intellogo
04-02-2007, 06:12 PM
JXBurns buddy,

I am trying that thing out..and will let u know after 8 hrs...coz its midnite now..

Do u know by means of orca or any equivalent tool, how can I delete the CANCEL button and the CROSS (on window top) that appears during the installation progress of any .MSI file ??

intellogo
04-02-2007, 06:49 PM
sorry ..this went blank by mistake

intellogo
04-02-2007, 06:52 PM
JXBurns..

I tried this on the POST-UNINSTALL ACTION and nothing happend...


File.Run(SessionVar.Expand("%SystemFolder%\\msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /passive.exe"), "/i \""..SessionVar.Expand("%TempLaunchFolder%\\Merge Modules.MSI").."\"","", SW_SHOWNORMAL, true);


I have put the whole thing in the 1st parameter...

What to do now....??

jcuster
04-03-2007, 11:43 AM
Try this for a no cancel, I'm thinking the passive won't allow a no cancel.

File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe") .. " /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /qb-","","", SW_SHOWNORMAL, true);

I've had it working on msi installs with a /qb- I have not had an opportunity to test it on an uninstall except for this thread.

intellogo
04-03-2007, 03:36 PM
JCUSTER & JXBURNS....I will have to thank u guys a billion times...now:cool :cool :cool

THANK YOU so much...ur syntaxes and continued plus willingness to help has finally worked...
I can now uninstall my embedded .MSI file after the uninstallation process....successfully

WOOOFF MEEOW..THANKS....hahhah

But the issue is not yet over, becoz there is something corny going on.
See, I actually have embedded two .MSI files into my main SF7 s/w.

1. A customized .MSI file
2. Microsoft Office Word Viewer 2003 (is also a .MSI file but has an
additional .CAB file with it)


Now....point (1) has been successfully uninstalled after my main s/w is uninstalled but point(2) is not. There's no error rmsgs, nothing for point (2).


I am able to get the GUID's by this way:
==============================
{GUID} can be obtained by Right-Clicking the .MSI file and selecting Properties. Then on the Summary tab, look below for REVISION NUMBER.
You may need to click the advanced button.


I also tried this for uninstalling both the .MSI files from the command prompt...for test purposes.
================================================== ======
1.for the customized .MSI file:
msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /qb-
msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /qf
msiexec /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /passive

2. for the Microsoft Office Word Viewer 2003 file:
msiexec /x{A90C621A-B6CF-4F4E-A00D-A8EFAE684CCB} /qb-
msiexec /x{A90C621A-B6CF-4F4E-A00D-A8EFAE684CCB} /qf
msiexec /x{A90C621A-B6CF-4F4E-A00D-A8EFAE684CCB} /passive


CONCLUSION:
All three options worked perfectly for point (1)
All three options FAILED for point (2)..STRANGE!!
================================================== ======

Could u pls pls check this crazy thing out...

Microsoft Office Word Viewer 2003:
site--> http://www.orbitfiles.com/download/id1338701714

You may need to download WinRAR to extract the contents of the file that u would be downloading.

Awaiting ur interesting reply....

JXBURNS
04-04-2007, 02:44 AM
The official source for the viewer is HERE (http://www.microsoft.com/downloads/details.aspx?familyid=95E24C87-8732-48D5-8689-AB826E7B8FDF&displaylang=en).

Why not try the logging option (described if you type MSIEXEC /? at a command prompt)?

So for example:

File.Run(SessionVar.Expand("%SystemFolder%\\msiexec.exe") .. " /x{BD558A59-CCEB-4F19-9E17-96124D11F75C} /q /log c:\logfile.txt","","", SW_SHOWNORMAL, true);

Note I removed the b- as then this should (in theory) have no GUI displayed at all.

I don't know whether this will work as do not want to install the Viewer to avoid changes to my system but worth a try. The logfile.txt may then show you what happened.

John

intellogo
04-04-2007, 06:11 AM
JXBurns...firstly, tell me that did u read the thanking acknowledgemnts from me, in my previous post ?;) ;)

Now comming down to the new angle....
You have replied with reference to this GUID, which is of the
"1. A customized .MSI file"
{BD558A59-CCEB-4F19-9E17-96124D11F75C}
This is uninstalling perfectly. And this is not my issue any more.


My issue is now regarding the Word Viewer's uninstallation. Please read my previous post on the crazy Word Viewer not being uninstalled.
I also tried ur trick with that monitor via a log. I tried this syntax at command prompt for uninstalling the Word Viewer and generating a txt log:

C:\WINDOWS\Installer>msiexec /x{A90C621A-B6CF-4F4E-A00D-A8EFAE684CCB} /qf /log c:\log.txt

I also tried this ove syntacx on the original source Word Viewer file directory.
In both cases, I landed up with an empty txt file. But when i created a log for the..."1. A customized .MSI file"...then i got a detailed logged file.

How should i get this Word Viewer to get uninstall by SF7, after my main s/w is uninstalled ??

Please test it at ur PC, too
Awaiting status....