rtlinux
03-06-2006, 01:40 PM
I have a registered install of ams60.1 and have started to update my projects. One thing I have noticed is when I set the app to reboot and create a shortcut, all users start menu, to autorun the autorun.exe it no longer creates the shortcut properly.
here is the code
reboot = Application.LoadValue("Reboot_Tag", "Reboot");
if reboot == "" then
Shell.CreateShortcut(Shell.GetFolder(SHF_STARTUP_C OMMON), "Autorun", "Autorun.exe", "", "", "Autorun.exe", 0, SW_SHOWNORMAL);
Application.SaveValue("Reboot_Tag", "Reboot", "done");
else
Shell.DeleteShortcut(Shell.GetFolder(SHF_STARTUP_C OMMON), "Autorun");
Application.SaveValue("Reboot_Tag", "Reboot", "");
end
All i end up with is a shortcut that does nothing and points nowhere.
If I replace the createshortcut with File.RunOnReboot("autorun.exe", "") it works. Prefer not to have to recode everything if I don't have to.
I have not tried it with W2k as of yet.
thanks in advance.
:huh
here is the code
reboot = Application.LoadValue("Reboot_Tag", "Reboot");
if reboot == "" then
Shell.CreateShortcut(Shell.GetFolder(SHF_STARTUP_C OMMON), "Autorun", "Autorun.exe", "", "", "Autorun.exe", 0, SW_SHOWNORMAL);
Application.SaveValue("Reboot_Tag", "Reboot", "done");
else
Shell.DeleteShortcut(Shell.GetFolder(SHF_STARTUP_C OMMON), "Autorun");
Application.SaveValue("Reboot_Tag", "Reboot", "");
end
All i end up with is a shortcut that does nothing and points nowhere.
If I replace the createshortcut with File.RunOnReboot("autorun.exe", "") it works. Prefer not to have to recode everything if I don't have to.
I have not tried it with W2k as of yet.
thanks in advance.
:huh