F_CREATE_SHORTCUT

// Function Name : f_create_shortcut
// Argument Name : (None)
// Return Type :       (None)

OleObject ws
OleObject loo_shortcut
String ls_Desktop

ws = Create OleObject
ws.ConnectToNewObject("
WScript.Shell")

ls_desktop = ws.SpecialFolders("Desktop")
// other "specialfolder" of interest
// AllUsersDesktop
// AllUsersStartMenu
// AllUsersPrograms
// AllUsersStartup
// Desktop
// Favorites
// MyDocuments
// Programs
// Recent
// SendTo
// StartMenu
// Startup

loo_shortcut = ws.CreateShortcut(ls_desktop + "\PowerbuilderFunctions.lnk")
loo_shortcut.TargetPath = "http://powerbuilderfunctions.blogspot.com"
loo_shortcut.WorkingDirectory = ls_desktop

loo_shortcut.WindowStyle = 1
/*
1    Activates and displays a window. If the window is minimized or maximized,
    the system restores it to its original size and position.
3    Activates the window and displays it as a maximized window.
7    Minimizes the window and activates the next top-level window.
*/

loo_shortcut.IconLocation = ws.ExpandEnvironmentStrings("%WINDIR%\SYSTEM\url.dll,0")

1 comments:

zulmach said...

hi, great blog you have here, find other #powerbuilder #resources at #zulmach blog at https://zulmach.wordpress.com download installer and other source code

Post a Comment