3

I make an application that, when you run it, will put the .exe in Startup. I have this code for that:

RegistryKey rkApp = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);

rkApp.SetValue("smartAppointment", Application.ExecutablePath.ToString());

Will creat a registery for the application to start with the Windows, but there is a problem, some antivirus will detect my application as a virus.

How I can stop the antivirus to detect my application as a virus ?

4

4 に答える 4

5

アプリケーションを起動時に自動的に実行しようとする方法は、アンチウイルスシステムによってウイルスのような動作としてフラグが立てられると思います。ソリューションのインストール時に変更を承認するようにユーザーに指示するだけです。

(もちろん)あなたがウイルスを書き込もうとしているのでなければ。

その場合は停止します。

于 2012-07-21T15:26:09.350 に答える
0

If you need to run at startup, the generally preferred way is to run it as a windows service.

If you need a gui as well, then you should have a gui that talks to the windows service that hosts your application.

于 2012-07-21T15:40:49.660 に答える
0

Typically your installer (MSI) would set the "launch application at startup" registry setting however I think that if your application is digitally signed with an authenticode signature then this problem will disappear.

于 2012-07-21T15:52:48.037 に答える
0

Is your application digitally signed? If not you should try signing your application (you need a public certificate, but that costs money)

Application signing/verification

于 2012-07-21T16:03:08.427 に答える