Scripts (PS or VBS) have a history with being blocked either by antiviruses or other group policy management solutions.
My recommendation would be to re-write your code into a C# custom action
. This way you will end up with a DLL as custom action which should save you from all the headaches of troubleshooting blocked installers.
I don't know of any easy way to detect if a script is blocked by an AV or by some group policies, maybe someone else around here can help with this. But as I said, a bulletproof solution is to simply go the C# route and don't worry anymore about being blocked.