If you want to keep your plugin deactivated, put this code in your activate function:
I have this used in my "Recount User Posts" plugin, since I only want the users' posts to be recounted when the admin wants (eg. when it's activated), the plugin has no function while activated, so I found a way to make it always deactivated, so that the next time the admin wants the posts recounted, the button will say "Activate" and they wouldn't have to deactivate and reactivate the plugin to recount the posts.
global $active_plugins, $codename;
unset($active_plugins[$codename]);
I have this used in my "Recount User Posts" plugin, since I only want the users' posts to be recounted when the admin wants (eg. when it's activated), the plugin has no function while activated, so I found a way to make it always deactivated, so that the next time the admin wants the posts recounted, the button will say "Activate" and they wouldn't have to deactivate and reactivate the plugin to recount the posts.