Open at Startup - rephrased
Klaus Major
k_major at osnabrueck.netsurf.de
Sun May 5 07:40:01 EDT 2002
Hi Sims,
> Maybe I should rephrase the question...
Oh, sorry for the delay ;-)
> Can I do the following with Windows - if so, how?
>
> WITH A MAC:
>
> If I want to have an app open when I turn on a Mac I can
> make an alias (shortcut) to the app and write it to the
> "Startup Items" folder. When the Mac is turned on, the Rev
> app then automatically opens.
>
> example:
> put specialFolderPath("System") & "/Startup Items" into prefsLocation
>
> create alias prefsLocation & "/newApp Shortcut" to file tFile
>
> Can I do the above with Windows - if so, how?
>
> sims
there are 2 ways.
The first is to set an entry in the windows-registry, which will cause
"YourApp"
to launch after windows is started. (Everytime !)
Advantage:
When you place an alias of your app in the windows-startup-item-folder
(there is one, but i have
no PC at hand to tell you the exact name of that folder, which would be
solution number 2 tehn ;-)
you can prevent the launching of your app by holding the shift-key while
windows is starting.
(Yes, the same shortcut as on a mac, funny, isn't it ;-)
With this registry-entry you cannot prevent your app to launch, except
by setting this reg-entry to empty :-)
The following script is ONLY tested on Win98, so no guarantees for other
windows-versions !!!
But should work anyway...
on xxx
##put the path to "YourApp.exe" into the_app
replace "/" with "\" in the_app ### we have to speak "windows"
get
setregistry("HKEY_local_machine\Software\Microsoft\Windows\CurrentVersion\
Run\YourApp", the_app)
end xxx
To delete that entry again, set the entry to empty.
on xxx
get
setregistry("HKEY_local_machine\Software\Microsoft\Windows\CurrentVersion\
Run\YourApp", "")
end xxx
"YourApp" is in this case the name of the registry-entry, which you can
set to "" (empty).
This way the entry will be deleted.
More information about the use-livecode
mailing list