--I saved the script this way so that the run-only application and script would not be confused
--
property finderLibraryAlias : ""
path to system folder as string
copy result to sysFolder
copy result & "System" to pathName
get short version of (info for alias ((path to system folder as string) & "System"))
set togExtension to result as number
path to preferences folder as string
copy result to prefFolder
copy prefFolder & "PPP Preferences" to pppPref
copy prefFolder & "PPP Preferences Copy" to pppPrefCopy
if togExtension ≥ 7.5 then
tell application "Finder"
get path to extensions folder as string
set finderScriptExtenRef to a reference to file (result & "Finder Scripting Extension")
if not (finderScriptExtenRef exists) then
display dialog ¬
"You need to place the extension \"Finder Scripting Extension\" in your \"Extension Folder\" in your \"System Folder\" on your startup disk to use this script.
Please place it there and Restart your computer." buttons {"Cancel"} default button "Cancel"
end if
try
select alias pppPref
on error errMsg number errNum
if errNum = -1728 then
beep
display dialog "You need to run MacPPP at least once before running this script. If you have something is wrong with your MacPPP. (It's not creating a preference file called 'PPP Preferences' in the 'Preference Folder' of your 'System Folder' on your startup disk.)" buttons {"Cancel"} default button "Cancel"
else
display dialog "Ooops... Something went wrong which I wasn't expecting. " & ¬
"Please eMail me and include this very important code:
" & togExtension & "." & errNum buttons ¬
{"Click for email address"} default button "Click for email addresses"
set finderLibraryAlias to (choose file with prompt ¬
"Please locate the runtime library \"FinderLib\"." of type "osas")
end try
end repeat
tell finderLib
try
display dialog pppPref & "
" & sysFolder
copyFiles from pppPref to sysFolder without warning
on error errMsg number errNum
if errNum = -1728 then
beep
display dialog "You need to run MacPPP at least once before running this script. If you have something is wrong with your MacPPP. (It's not creating a preference file called 'PPP Preferences' in the 'Preference Folder' of your 'System Folder' on your startup disk.)" buttons {"Cancel"} default button "Cancel"
else
display dialog "Ooops... Something went wrong which I wasn't expecting. " & ¬
"Please eMail me and include this very important code:
" & togExtension & "." & errNum buttons ¬
{"Click for email addresses"} default button "Click for email addresses"