AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones varias de Windows
  • Creating a shortcut
CreateShortcut (Example)
Creating a shortcut
This example creates the shortcut on the desktop of current user. The caption of this shortcut is "Application for Sales Management".
This shortcut is created for the "SalesMgt.exe" program installed in the SALESMGT subdirectory of "Program Files" directory of current user.
This shortcut:
  • is using the command line: /P=parameter
  • is associated with the Ctrl + Alt + A shortcut
  • has the data directory of user (SALESMGT subdirectory) as working directory
// Vista/7 ...: No administrator privilege is required
IF NOT CreateShortCut(shortcutFree, ...
// Free shortcut to specify a directory of the current user
// and not a directory common to all users
"Application for Sales Management", ... // Shortcut caption
StringBuild([
"%1SALESMGT\SalesMgt.exe" /P=parameter
], SysDir(srProgramFiles)+["\"]), ...
// Path of application to start (with its command line)
SysDir(srDesktop),...
// Shortcut location: directory of the desktop of the user
 swsNormal, ... // "Standard" opening
 "A", ... // Keyboard shortcut: Ctrl + Alt + A
StringBuild([
"%1SALESMGT\"
], SysDir(srAppData)+["\"])...
// Working directory:
// data directory of user (SALESMGT subdirectory)
) THEN
Error("Failure creating the shortcut in " + SysDir(srDesktop), ErrorInfo())
ELSE
Info("The shortcut was created")
END
Versión mínima requerida
  • Versión 16
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local