Delete Empty Components

Related Posts
12 Comments
shashi patil

Hi,

i have tried using this script to remove empty component, but its not removing them, i am not getting any error it say just processing MSI.

WriteLog “Deleting Empty Components”

WriteLog “Processing: “ & MSIPath.Name

 

i have updated the script with

Dim Test : Set Test = dataView.Fetch ‘after line 51.

Script is deleting some components with file along with empty components.

Kindly Help.

Many Thanks,

Shashi

Hmmm. I’ve just repositioned ’emptyComponent = True’. Try again – perhaps use WriteLog to debug the code. Let me know how you get on.

shashi patil

Still no luck 🙁

If the MSI isn’t too big you can zip it and mail it to me. If it is big, strip out all the cabs/streams first…. Give me an example of a component that it is not removing.

shashi patil

My Test MSI has some empty components i tried using the write log, the script is not going in to the below condition.

If emptyComponent  Then
WriteLog ” component name: ” & tempComponent
WriteLog “Deleting empty component: ” & tempComponent
End If

shashi patil

its just a simple MSI i have created with some random .dll, .exe and empty component

shashi patil

If i add the below after line 51 in the script,

Dim Test : Set Test = dataView.Fetch

Script enters the loop :

If emptyComponent  Then
WriteLog ” component name: ” & tempComponent
WriteLog “Deleting empty component: ” & tempComponent
End If

Log Output:

9/27/2016 4:39:49 PM: Deleting Empty Components
9/27/2016 4:39:49 PM: Processing: Test.msi
9/27/2016 4:39:49 PM: component name: NewComponent2
9/27/2016 4:39:49 PM: Deleting empty component: NewComponent2
9/27/2016 4:39:49 PM: component name: NewComponent1
9/27/2016 4:39:49 PM: Deleting empty component: NewComponent1
9/27/2016 4:39:49 PM: component name: LendingBBLOracleConnect_old.dll
9/27/2016 4:39:49 PM: Deleting empty component: LendingBBLOracleConnect_old.dll
9/27/2016 4:39:49 PM: component name: OraOps10.dll
9/27/2016 4:39:49 PM: Deleting empty component: OraOps10.dll
9/27/2016 4:39:49 PM: component name: gacutil.exe
9/27/2016 4:39:49 PM: Deleting empty component: gacutil.exe
9/27/2016 4:39:49 PM: component name: LendingBBLOracleConnect_SELEX.dll
9/27/2016 4:39:49 PM: Deleting empty component: LendingBBLOracleConnect_SELEX.dl

Sorry, I can’t debug without seeing the MSI Tables. All I can suggest is that you use WriteLog to debug the SQL queries and the Loops/If statements…

I have one query component having ini table entry I want move to different component   and then want delete that component ,

For example ;

A&B having two components

A component having exe file

B component having ini table entry

Just I want to move ini file to A component

Then I want delete B component

Can you please add this point to delete component script

I have one query component having ini table entry I want move to different component and then want delete that component ,

For example ;

A&B having two components

A component having exe file

B component having ini table entry

Just I want to move ini file to A component

Then I want delete B component

Can you please add this point to delete component script

but it’s not working for my logic

Empty component having entry in create table, then that empty component will not be able to delete form the script, could please help

Leave a Reply
Send us a message

Send your message any time you want.

Our usual reply time: 2 Business Hours
Send us a message

Have a question? Send us a message.

Our usual reply time: 2 Business Hours