Hi,

I'm trying to create a package for uninstallation of installed EXE. I wrote a vbscript to delete registries, files and folder. The script is working fine manually. when i tried the same with Custom Action ("Excute Program From Files"), its throughing an error of This action is only valid for products that are currently installed.

Sequence: After InstallFiles
In-Script Option: Defferred Excution - System Context
Processing: Synchronous, Ignore exit Code

Can any one help to solve this?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Are you sure it's the script which throws the error?

It seems overkill to create a script inside an MSI to do a job which the MSI itself can handle natively. You can use the RemoveFiles and RemoveRegistry tables to achieve what you want.
Answered 12/11/2008 by: VBScab
Red Belt

Please log in to comment
0
No Errors... But Script is also not working.

Anyother ideas to do the same?
Answered 12/11/2008 by: honeydee.psv
Senior Yellow Belt

Please log in to comment
0
Er...yes...use the RemoveFiles and RemoveRegistry tables.
Answered 12/11/2008 by: VBScab
Red Belt

Please log in to comment
0
This action is only valid for products that are currently installed.

I can only guess what this cryptic message means...are you trying to uninstall something that is is not installed? Then you should add something to your script to check if it is installed, if not, do nothing...
Answered 12/11/2008 by: pgiesbergen
Orange Belt

Please log in to comment
0
Did you add the script as a file?
Please post the CustomAction table entry for this custom action.
Answered 12/11/2008 by: AngelD
Red Belt

Please log in to comment
0
This is the script i'm using. Can you tel me how can i include this with custom action. Is any thing mistake with the type of Custom Action or Sequence??

ON ERROR RESUME NEXT
'********************************************************************************************
'DELETING FOLDER UNDER WINDOWS FOLDER and QUEST SOFTWARE Folder UNDER PROGRAM FILES FOLDER
'********************************************************************************************
QuestToad="C:\Program Files\Quest Software"
LOGS="C:\Windows\Logs"
DelFolder(QuestToad)
DelFolder(LOGS)
Sub DelFolder(folder)
Dim objFso
Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.DeleteFolder(folder)
set objFso = Nothing
End Sub
'**************************************************
'DELETING SHORTCUTS UNDER STARTMENU and DESKTOP
'**************************************************

'QuestToad="C:\Documents and Settings\All Users\Start Menu\Programs\Quest Software"
'DelFolder(QuestToad)
Sub DelFolder(folder)
Dim objFso
Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.DeleteFolder(folder)
set objFso = Nothing
End Sub
Set objWshShell = WScript.CreateObject("WScript.Shell")
User_Profile = objWshShell.Environment("PROCESS")("UserProfile")
desktop_shortcut = User_Profile & "\Desktop\TOAD.lnk"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile desktop_shortcut
'***********************
'DELETING REGISTRIES
'***********************

set oShell = CreateObject("WScript.Shell")
const REMOVE_REGISTRY0 = "HKEY_CURRENT_USER\Software\Quest Software\SQLab\Preferences\Tuning Lab\"
const REMOVE_REGISTRY1 = "HKEY_CURRENT_USER\Software\Quest Software\SQLab\Preferences\"
const REMOVE_REGISTRY2 = "HKEY_CURRENT_USER\Software\Quest Software\SQLab\"
const REMOVE_REGISTRY3 = "HKEY_CURRENT_USER\Software\Quest Software\"
const REMOVE_REGISTRY4 = "HKEY_LOCAL_MACHINE\Software\Quest Software\SQLab\"
Const REMOVE_REGISTRY5 = "HKEY_LOCAL_MACHINE\Software\Quest Software\TOAD\"
const REMOVE_REGISTRY6 = "HKEY_LOCAL_MACHINE\Software\Quest Software\Schema Manager\"
Const REMOVE_REGISTRY7 = "HKEY_LOCAL_MACHINE\Software\Quest Software\"
Const REMOVE_REGISTRY8 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FmtPlus.exe\"
Const REMOVE_REGISTRY9 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\sqlab.exe\"
Const REMOVE_REGISTRY11 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Formatter Plus V1.3\"
Const REMOVE_REGISTRY12 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Quest Software TOAD Xpert Edition 7.4\"
Const REMOVE_REGISTRY13 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SQLab 4.6\"
oShell.RegDelete REMOVE_REGISTRY0
oShell.RegDelete REMOVE_REGISTRY1
oShell.RegDelete REMOVE_REGISTRY2
oShell.RegDelete REMOVE_REGISTRY3
oShell.RegDelete REMOVE_REGISTRY4
oShell.RegDelete REMOVE_REGISTRY5
oShell.RegDelete REMOVE_REGISTRY6
oShell.RegDelete REMOVE_REGISTRY7
oShell.RegDelete REMOVE_REGISTRY8
Answered 12/11/2008 by: honeydee.psv
Senior Yellow Belt

Please log in to comment
0
One of my friend gave me an idea to use Wise Script to cal vbscript..

I'm calling above vbscript in Wise Script. but Desktop Shortcut is not removing... else is working fine...Can you please help?
Answered 12/11/2008 by: honeydee.psv
Senior Yellow Belt

Please log in to comment
0
you should probably just use the RemoveFile table for that, as I believe others have suggested. much easier.
Answered 12/11/2008 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
0
You really are making this MUCH harder than it needs to be. Use the tables as I suggested.

If you want to persist (and I have every reason to suspect you will, since any reasonably intelligent person would by now have take the advice [of people whose advice was sought], researched the tables mentioned and abandoned the tortuous route outlined)...

Set objWshShell = WScript.CreateObject("WScript.Shell") Apart from the dreadful construction, this is your problem, specifically the 'WScript' directive.

The Windows Installer engine has its own VBScript runtime and doesn't 'understand' the reference to the Windows Scripting Host (which is what defines the 'WScript' object). Change that line to 'Set objWshShell = CreateObject("WScript.Shell")' and any other references to WScript and it should work. Note that this refers ONLY to the directive, NOT object names (which is why my edited line still refers to "WScript.Shell")
Answered 12/12/2008 by: VBScab
Red Belt

Please log in to comment
0
Change that line to

Yes its working now. Thank you

Thank you all.
Answered 12/12/2008 by: honeydee.psv
Senior Yellow Belt

Please log in to comment
0
You went ahead with an MSI custom action that calls a Wisescript that launches a vbscript ???

Crazy!
Answered 12/12/2008 by: Jamie B
Orange Senior Belt

Please log in to comment
Answer this question or Comment on this question for clarity