Working directory of a shortcut
Hi,
Am new to packaging. I small doubt on one thing, what is the working directory of a shortcut, what is its functionality and how it works in msi.
kindly explain.
Am new to packaging. I small doubt on one thing, what is the working directory of a shortcut, what is its functionality and how it works in msi.
kindly explain.
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
spartacus
13 years ago
ORIGINAL: pjgeutjens
The working directory for a shortcut basically indicates where the target of the shortcut (usually an exe) can find any other files, like DLLs for example, that it needs to be able to startup and function.
PJ
Pieter,
This raises an interesting question, does/can the working directory for a shortcut influence the normal rules for DLL search order ?
I have always assumed that it cannot, because otherwise the shortcut working directory could be used as a form of 'poor man's application isolation', but I'm prepared to be proved wrong and would be interested in yours (and others) views on this.
Regards,
Spartacus
Posted by:
Matias M Andersen
13 years ago
Hi Vataprasad,
The "WkDir" column in the "Shortcut" table are used to define the working directory of a shortcut.
The value of "WkDir" can be a directory defined in the "Directory" table "INSTALLDIR", or a property defined in the "Property" table "MYPROPERTY" (without the qotes).
/Matias
The "WkDir" column in the "Shortcut" table are used to define the working directory of a shortcut.
The value of "WkDir" can be a directory defined in the "Directory" table "INSTALLDIR", or a property defined in the "Property" table "MYPROPERTY" (without the qotes).
/Matias
Posted by:
zzpack
13 years ago
Posted by:
pjgeutjens
13 years ago
It´s simply the directory for the target of the shortcut. E.g. if the shortcut target is a .exe file, then the working directory for that shortcut
is the directory where that .exe file resides in, and so on.
While this is usually true, this does not always have to be the case. The working directory for a shortcut basically indicates where the target of the shortcut (usually an exe) can find any other files, like DLLs for example, that it needs to be able to startup and function.
PJ
Posted by:
pjgeutjens
13 years ago
This raises an interesting question, does/can the working directory for a shortcut influence the normal rules for DLL search order ?Graham,
interesting question. Some research taught me that the current working directory is part of the DLL search order, so yes, it does greatly impact this.
It would seem there's been quite some writing done on the subject of "DLL Search Order Hijacking", which, if I understand correctly, basically entails putting a compromised version of a DLL in the working directory/ EXE path to have it supersede a system dll.
Be sure to check out that article I linked, I found it very interesting.
Rgds,
PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.