i use advanced installer to Create .exe package i tried My app To many times onSimulator and it worked very well meanwhile i advanced installer and setup my app from Setup.exe i did not work .. and i can only see it on startup tap from Task Manger i use this code to make may program run on window startup
RegistryKey registryKey = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
[DllImport("user32.dll")]
static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);
public Form1()
{
registryKey.SetValue("Control Online !", Application.ExecutablePath.ToString());
InitializeComponent();
}
And i edited start page from Program.cs with this code :
Form1 Get = new Form1();
if (Get.WhichRun == true)
{
Application.Run(new Connected());
}
else
{
Application.Run(new Form1());
}
Aucun commentaire:
Enregistrer un commentaire