I am building an installer for an MSI file and I want to install it as a package without any modification by placing the package in the post-install within the prerequest page, but after installing the package the application shortcuts appear in the Context Menus and I do not want that! , and I like the package to be installed and then I need to delete The registry keys responsible for creating shortcuts in the Context Menus, so I tried to add custom actions and add a new value removel (in the registry page), to delete the registry keys in:
HKEY_CLASSES_ROOT\Directory\shell\AAA
HKEY_CLASSES_ROOT\Directory\background\shell\AAA
HKEY_CLASSES_ROOT\Drive\shell\AAA
HKEY_CLASSES_ROOT\*\shell\ AAA
But all my attempts failed, as I tried to run "PowerShell Inline Script" in the following way:
Code: Select all
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
Remove-Item -Path HKCR\Directory\shell\AAA,HKCR\Directory\background\shell\SentinelOneScan,HKCR\Drive\shell\AAA,HKCR\*\shell\AAA -Force -VerboseSo I created an "Execute Inline Script code" with the Visual Basic Script VBA type with the following values:
Code: Select all
Dim WshShell, cal1
Set WshShell = WScript.CreateObject("WScript.Shell")
cal1 = "HKEY_CLASSES_ROOT\Directory\shell\SentinelOneScan\"
WshShell. RegDelete cal1
cal1 = "HKEY_CLASSES_ROOT\Directory\background\shell\SentinelOneScan\"
WshShell. RegDelete cal1
cal1 = "HKEY_CLASSES_ROOT\Drive\shell\SentinelOneScan\"
WshShell. RegDelete cal1
cal1 = "HKEY_CLASSES_ROOT\*\shell\SentinelOneScan\"
WshShell. RegDelete cal1So,Can you help me solve this problem?? Thank you all
FOLLOW US
Get the latest news in Application Packaging