PDA

View Full Version : shell.createshortcut issues with XP xp2 ams60



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

Eagle
03-06-2006, 09:42 PM
double check you have the correct full path to the file you wish to run (autorun.exe)
in your shell actions and any other parameters you may need to get it
to run properly..based on what you posted:

the "how do I" example does not 'show'- take into account the 'full path\\my.exe' of what to run,
is required and needs to be included in related parameters for the actions.

think I'm on the right track here ...

Eagle
03-07-2006, 02:52 AM
the help examples for the shell.createshortcut action in action wizard
give a better picture of the actual parameters required.