Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a desktop shortcut
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01149668
Message ID:
01150278
Views:
31
The program at Start/Programs are at
strDesktop = ff.Item(2)
ff=WshShell.SpecialFolders
strDesktop = ff.Item(2) +"\newbie\" && this is for start programs menu
oMyShortCut= WshShell.CreateShortcut(strDesktop+ "" +lcShortcut + ".lnk")
oShort = oMyShortCut
oMyShortCut.WindowStyle = 1  &&Minimized 0=Maximized  4=Normal 
*oMyShortcut.IconLocation = home()+"wizards\graphics\builder.ico"
oMyShortCut.TargetPath = cTargetPath
otarg = oMyShortCut.TargetPath
oMyShortCut.Arguments = cParameters
oArg = oMyShortCut.Arguments
oMyShortCut.WorkingDirectory = "C:\Program Files\Newbie\"
oMyShortCut.Save
*SET STEP ON 
*lcShortcut = "whatever.lnk"

*SET STEP ON 
mFile = (ADDBS(strDesktop) + FORCEEXT(newname, "lnk"))
	if FILE(mFile) == .t.
		DELETE FILE(mFile)
	endif
RENAME 												;
(ADDBS(strDesktop) + lcShortcut + ".lnk")			; 
    TO 													;
(ADDBS(strDesktop) + FORCEEXT(newname, "lnk"))
****************************************************
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform