Share via


How to determine a given file as executable file?

Is your application accepting files and writing them to the disk? How do you determine if the file extension is an executable file on the server? Fortunately with the use of SaferiIsExecutableFileType function you can determine if a given file is an executable or not. This allows the application to make runtime decisions on whether to accept a file or reject a file. You can also use functions such as AssocGetUrlAction or AssocIsDangerous to determine whether a file extension is of High Risk or Medium Risk or Low Risk.

SaferiIsExecutableFileType function is part of the SRP/App Locker functionality of windows, which drives the result provided by this function. More information about AppLocker functions can be found at https://technet.microsoft.com/en-us/library/ee844173(WS.10).aspx. AppLocker and SRP are the respective features in Windows 7 and XP to restrict the user from running specific types of files based on defined policies. More information about AppLocker can be found here https://technet.microsoft.com/en-us/library/ee424365(WS.10).aspx.

Thanks
Anil RV