DeleteFileAssociation – Unregister a file extension

DeleteFileAssociation – Unregister a file extension

Private Declare Sub SHChangeNotify Lib "shell32.dll" (ByVal wEventId As Long, _    ByVal uFlags As Long, ByVal dwItem1 As Long, ByVal dwItem2 As Long)Const SHCNE_ASSOCCHANGED = &H8000000Const SHCNF_IDLIST = 0' Destroy a file association'' NOTE: requires the GetRegistryValue and DeleteRegistryKey functionsSub DeleteFileAssociation(ByVal Extension As String)    Dim ClassName As String        Const HKEY_CLASSES_ROOT = &H80000000        ' ensure that there is a leading dot    If Left(Extension, 1) <> "." Then        Extension = "." & Extension    End If    ' read the associated class name    ClassName = GetRegistryValue(HKEY_CLASSES_ROOT, Extension, "")    ' exit if there is no extension association    If Len(ClassName) = 0 Then Exit Sub        ' delete this key    DeleteRegistryKey HKEY_CLASSES_ROOT, Extension    ' delete the other key where registration data is found    DeleteRegistryKey HKEY_CLASSES_ROOT, ClassName    ' notify Windows that file associations have changed    SHChangeNotify SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0End Sub

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of