/build/static/layout/Breadcrumb_cap_w.png

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.

0 Comments   [ + ] Show comments

Answers (5)

Posted by: spartacus 13 years ago
Black Belt
1
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
Senior Yellow Belt
0
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
Posted by: zzpack 13 years ago
Orange Senior Belt
0
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.
Posted by: pjgeutjens 13 years ago
Red Belt
0
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
Red Belt
0
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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ