6

I have created a C# application that I've been testing on my other computer throughout the developing phase. However now that I've completed the app with few recent things that I added, the app is detected as virus (AVG doesn't show what kind of virus). Here are a few changes I did:

  1. Added a registry setting to allow user to start the app at Windows Startup.
  2. Changed the Assembly Name and Assembly Information (Because I wanted to rename the app).
  3. Went into signing settings and clicked on Sign the ClickOnce manifests.
  4. Went into security and clicked this is a full trust application.

The app is just a simple weather application. It reads data from an XML and displays it. I never had a false positive until I did these changes. So what would be the problem here and how do I resolve it?

I added the following settings:

RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (startupCheck.Checked) {
    rk.SetValue("WeTile", "\"" + Application.ExecutablePath.ToString() + "\"");
} else {
    rk.DeleteValue("WeTile", false);
}
2
  • Which registry setting did you add? If it does not go to HKCU but HKLM, I think your app asks for too much. Besides, why do you need to make it a full trust app? A simple app should never ask for that.
    – Lex Li
    Feb 28, 2015 at 3:06
  • RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); if (startupCheck.Checked) { rk.SetValue("WeTile", "\"" + Application.ExecutablePath.ToString() + "\""); } else { rk.DeleteValue("WeTile", false); } Is what I used. And the full trust app is just for the sake of it, honestly I don't even know what it does. Feb 28, 2015 at 4:53

1 Answer 1

2

Many antivirus programs and Windows itself will complain about new/untrusted applications. Signing with a code signing certificate will improve your "ranking" greatly and allow your program to run, but self-signing via ClickOnce will not help at all.

There are many other posts about trying to get around these filters. You may want to contact antivirus companies such as AVG and see what can be done, and if they can "whitelist" your application. (AVG - Report a false positive) Submitting false detection reports and removing tasks that need full trust (or activities that seem "suspicious" to AV) will help you application run.

1
  • Don't forget that the certificate isn't that cheap either.
    – Greg
    Feb 27, 2015 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.