MAKESHORTCUT command problem

In this category you can exchange your programming questions and solutions.
Post Reply
alaphate
Posts: 9
Joined: Sun Feb 13, 2022 6:10 am

MAKESHORTCUT command problem

Post: # 98375Post alaphate
Fri Mar 18, 2022 1:13 am

Makeshortcut "d:\temp",specfolder(csidl_desktop)

if the first param is a folder (d:\temp), the generated shortcut on desktop will not work.
thanks

amksoft
Posts: 4
Joined: Tue Mar 29, 2022 1:38 pm

Re: MAKESHORTCUT command problem

Post: # 98376Post amksoft
Tue Mar 29, 2022 1:41 pm

Hi,

according to the MakeShortcut then:filename" has to be a EXE filename (contains the icon to be used)

MAKESHORTCUT command


Creates a shortcut into a specified folder.


Syntax Makeshortcut filename,target folder


Creates a windows shortcut with the icon of the exe file within the targetfolder, this could be a special folder like the desktop.


special folder could be on of the following values:


CSIDL_DESKTOP =&H0
CSIDL_PROGRAMS=&H2
CSIDL_CONTROLS=&H3
CSIDL_PRINTERS=&H4
CSIDL_PERSONAL=&H5
CSIDL_FAVORITES=&H6
CSIDL_STARTMENU=&HB
CSIDL_STARTUP=&H7
CSIDL_RECENT=&H8
CSIDL_SENDTO=&H9
CSIDL_BITBUCKET=&HA


CSIDL_DESKTOPDIRECTORY=&H10
CSIDL_DRIVES=&H11
CSIDL_NETWORK=&H12
CSIDL_NETHOOD=&H13


Example:


Makeshortcut "myapp.exe","c:\"
Makeshortcut "myapp.exe",specfolder(csidl_desktop)

maybe this explains your error?

alaphate
Posts: 9
Joined: Sun Feb 13, 2022 6:10 am

Re: MAKESHORTCUT command problem

Post: # 98380Post alaphate
Wed Mar 30, 2022 4:07 pm

amksoft:
thanks for the answer.
there's no error when creating an exe's shortcut on desktop using MAKESHORTCUT command
How to create a folder's shortcut on desktop?

Post Reply