Run an Application After Rebooting (Yeniden Başlattıktan Sonra Bir Uygulama Çalıştırın)

guclusat

Tanınmış Üye
Süper Moderatör
Run an Application After Rebooting

As an example, we will create an application with two buttons: Install Acrobat, and Install Application101.
The Acrobat install program will require the user to restart their computer once the install completes. To
ensure that the application is launched when the user reboots their system, add the following code to the
On Click event of the Install Acrobat button:

Kod:
reboot = Application.LoadValue("Settings", "Reboot");
if reboot == "" then
Shell.CreateShortcut(Shell.GetFolder(SHF_STARTUP_COMMON),
"Temporary Shortcut", "Autorun.exe", "", "", "Autorun.exe", 0,
SW_SHOWNORMAL);
Application.SaveValue("Settings", "Reboot", "done");
else
Shell.DeleteShortcut(Shell.GetFolder(SHF_STARTUP_COMMON),
"Temporary Shortcut");
Application.SaveValue("Settings", "Reboot", "");
end

Note: This script adds a temporary shortcut to the Windows startup folder. When your application
is executed on reboot, the temporary shortcut is deleted.
 
Geri
Yukarı