Probelm with startup script in c#
===

My application need to start when windows start. so i writed a batch file for running the application.

This is the code for writing the batch file path entry to registry.

    private void RegisterInStartup(bool isChecked)
    {
        RegistryKey registryKey = Registry.CurrentUser.OpenSubKey
                ("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
        if (isChecked)
        {
            registryKey.SetValue("ApplicationName", Application.StartupPath+"\\autorun.bat");
        }
        else
        {
            registryKey.DeleteValue("ApplicationName");
        }
    }

And this is my batch file code.

    start File.exe
    exit


When i restart my system the batch file is executing but the application File.exe is not executing.

Can anyone tell me why this happening?

Best regards.
