cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
soumya6_b
Level 4

Uregnt!!! Can't Add Registry During Uninstallation...

Please Tell Me How To Add Resgistry During Uninstallation.........urgently Help Please......
Labels (1)
0 Kudos
(12) Replies
ChandanOmkar
Level 8

What is your project type? is it install script project?
0 Kudos
soumya6_b
Level 4

it's basic msi type
0 Kudos
soumya6_b
Level 4

please help.need the solution urgently.........
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

It is not possible in an MSI based installation to have a component be installed during an uninstall process, which would allow for using the standard MSI registry functionality. Therefore, it will be necessary to use a custom action to create or set any registry data needed during uninstall (the custom action can be conditioned with 'REMOVE="ALL"' to only run it during uninstall).
0 Kudos
soumya6_b
Level 4

I have used a VBscript in Custom Action which pushes the registry in HKLM during the uninstallation action.This seems to work in XP machines but fails in VISTA,although during uninstallation it is throwing the regedit prompt.I have also tried with Nested MSI and an EXE in the custom actions which also failed in VISTA.So please provide me some alternatives as to how we can push a registry in HKLM during uninstallation breaking the UAC of VISTA .please help urgently.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Your custom action needs to be scheduled in the execute sequence between InstallInitialize and InstallFinalize, with an in-script execution setting of "deferred in system context". Any custom action (EXE, VBScript, DLL, etc.) that does not follow this sequencing requirement will not run with elevated privileges and will not be able to write to machine-wide locations in the registry or on the file system.
0 Kudos
soumya6_b
Level 4

The custom Action is being carried out as the script runs during uninstallation,but again it fails to incorporate the registry in HKLM due to the UAC feature of VISTA.So the problem persists.....please help.....
0 Kudos
soumya6_b
Level 4

please help urgently.........i need the solution by today badly.........
0 Kudos
Reddy611
Level 6

Write the code in a application language.like C#.
create .exe to the c# code.

And call the .exe file in the uninstallaiton time.and keep the .exe in the Support dir location only.

i think this is help to you.

Regards

Reddy
0 Kudos
soumya6_b
Level 4

i have tried this also.but it's not working.
0 Kudos
soumya6_b
Level 4

guys please help!!!!!!!!!!!!
0 Kudos
Reddy611
Level 6

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
'Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Symphony\IMS\WEA"
strValueName = "Eclipse"
strValue = "Installed"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue


I added the above code into .vbs file and i created a .bat file ,inside the .bat file i simply kept the .vbs file name .

the both .vbs and .bat file added to the ISM.if you want you can keep these files in INSTALL DIR or SUPPORT location .i KEPT in SUPPORT DIR.

then i written the install script like this .

function MyFunction(hMSI)
STRING szName,szKey;
NUMBER nResult; // To Do: Declare local variables.
begin
szName = SUPPORTDIR^"r.bat";
szKey = "";
MessageBox(szKey,INFORMATION);
nResult = LaunchAppAndWait(szName, szKey, WAIT);

end;

i called this installscript function at sequence--Installation-Execute-AfterRemoveRegistry files in while uninstalling the application.

Install exe condition REMOVE="ALL"

the above process is working fine.and i can able to create the registry entries while uninstallation the application.

Regards
Reddy.Chilakam
0 Kudos