Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't get Setup to create a Menu option
Message
 
À
14/11/2000 06:14:12
Adam Skowronski
Custom Designed Systems
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Divers
Thread ID:
00441492
Message ID:
00441524
Vues:
16
Not sure about the Program Manager problem, but desktop shortcuts can be handled easily by calling code from the post setup executable option. I use the Windows Scripting Host to create the shortcut. Here is a generic routine I use for this purpose:

LOCAL oShortcut, cDesktopDir, oLnk, lcHomeDir, lcEXE

*- Get the application startup directory
lcHomeDir = JUSTPATH(SYS(16, 0))
= ADIR(aFiles, '*.exe')

*- Get name of application EXE by scanning files in application directory
FOR i = 1 TO ALEN(aFiles, 1)
IF aFiles[i, 1] != 'STARTUP.EXE' .AND. aFiles[i, 1] != 'SHORTCUTS.EXE'
lcEXE = aFiles[i, 1]
EXIT
ENDIF
NEXT

*- Create shortcut file
oShortcut = CREATEOBJECT('Wscript.Shell')
cDesktopDir = oShortcut.SpecialFolders('Desktop')
oLnk = oShortcut.CreateShortCut(cDesktopDir + '\\' + SUBSTR(lcEXE, 1, (LEN(lcEXE) - 4)) + '.lnk')

*- Is there a startup program?
*- Point shortcut at file
IF FILE(lcHomeDir + '\STARTUP.EXE')
oLnk.TargetPath = lcHomeDir + '\STARTUP.EXE'
ELSE
oLnk.TargetPath = lcHomeDir + '\' + lcEXE
ENDIF

oLnk.WorkingDirectory = lcHomeDir
oLnk.SAVE()

Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform