I am trying to remove the Java folder under Start Menu for Java 7u71 but I´t wont work.
I am using Orca to edit my mst. 

Added a Custom Action table
Action : DeleteUpdateShortcut
Type: 1122        (have tried 98 also)
Source: SystemFolder
Target: cmd.exe /C rmdir "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Java" /S

And then in the InstallExecuteSequence table
Action : DeleteUpdateShortcut
Sequence:3183

In the in the InstallExecuteSequence table yhe"InstallFinalize" is  sequence 3185.

But it wont work. Am I choosing the wrong sequence numbers?

My other setting are:

AUTOUPDATECHECK - Java Update mechanism – till off {0}
JAVAUPDATE till 0
JU till 0

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0
You should run this custom action after InstallFinalise, as changes are not made to the system until InstallFinalize is reached (In a simplistic sense - I won't bore you with the details).  The other thing to check is whether the variable %PROGRAMDATA% is resolved correctly. You may need to hard code this value.
Answered 11/11/2014 by: EdT
Red Belt

Please log in to comment
0

It worked! Thanks EdT!

Changed to as follows:

Action : DeleteUpdateShortcut
Type: 1122

Source:SystemFolder
Target: cmd.exe /C rmdir
"C:\ProgramData\Microsoft\Windows\StartMenu\Programs\Java\Check For Updates.lnk" /Q

Andthen in the InstallExecuteSequence table
Action : DeleteUpdateShortcut
Sequence:3186

Answered 11/12/2014 by: Rain
Yellow Belt

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