On Tue, Feb 03, 2004 at 08:40:09PM +0100, Ulf Lamping wrote:
> >My thought is that the global settings on Win2000/XP/2003 should be
> >available in the "Documents and Settings/All Users/Application Data"
> >directory, and that user-specific files should reside in the
> >"Application Data" directory of the user's settings. Please note that
> >there are Windows-specific variables that are used to find the actual
> >directory names for the application data and the user profile, but I
> >don't know those by heart.
> >
> >
> Please note, that this directory name "Application Data" is hardwired
> inside the Ethereal code,
Only if the APPDATA environment variable isn't set - see
"get_persconffile_dir()" in "epan/filesystem.c". I think it's set in NT
5.x, so only with NT 4.x and Windows OT (unless W98 and/or WMe set it as
well) would that be an issue.
> >I also don't know the NS/IS installer so I don't know if you can
> >specify whether you want the application(s) to be instlled for the
> >installing user or for all users on the computer.
> >
> >
> As this is only a different location for files and such, this could be
> done with some effort.
See
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.7.3
"4.9.7.3 SetShellVarContext
current|all
Sets the context of $SMPROGRAMS and other shell folders. If set to
'current' (the default), the current user's shell folders are used. If
set to 'all', the 'all users' shell folder is used. The all users
folder may not be supported on all OSes. If the all users folder is not
found, the current user folder will be used. Please take into
consideration that a "normal user" has no rights to write in the all
users area. Only admins have full access rights to the all users area.
You can check this by using the UserInfo Plugin. See
Contrib\UserInfo\UserInfo.nsi for an example."
By the way, is there truly no way in NSIS to tell it, when creating a
shortcut, to leave the working directory for the shortcut *empty*? The
description of CreateShortCut:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.3.4
says:
4.9.3.4 CreateShortCut
link.lnk target.file [parameters [icon.file [icon_index_number
[start_options [keyboard_shortcut [description]]]]]]
Creates a shortcut 'link.lnk' that links to 'target.file', with
optional parameters 'parameters'. The icon used for the
shortcut is 'icon.file,icon_index_number'; for default icon
settings use empty strings for both icon.file and
icon_index_number. start_options should be one of:
SW_SHOWNORMAL, SW_SHOWMAXIMIZED, SW_SHOWMINIMIZED, or an empty
string. keyboard_shortcut should be in the form of 'flag|c'
where flag can be a combination (using |) of: ALT, CONTROL, EXT,
or SHIFT. c is the character to use (a-z, A-Z, 0-9, F1-F24,
etc). Note that no spaces are allowed in this string. A good
example is "ALT|CONTROL|F8". $OUTDIR is used for the working
directory. You can change it by using SetOutPath before
creating the Shortcut. description should be the description of
the shortcut, or comment as it is called under XP. The error
flag is set if the shortcut cannot be created (i.e. the path
does not exist, or some other error).
The description of SetOutPath:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.1.9
says:
4.9.1.9 SetOutPath
outpath
Sets the output path ($OUTDIR) and creates it (recursively if
necessary), if it does not exist. Must be a full pathname,
usually is just $INSTDIR (you can specify $INSTDIR if you are
lazy with a single "-").
which doesn't seem to leave an option for setting it to nothing.