XPost: alt.comp.os.windows-11
On 2025-02-22 02:42, Paul wrote:
On Fri, 2/21/2025 4:45 PM, micky wrote:
In alt.comp.os.windows-10, on Fri, 21 Feb 2025 00:08:15 -0500, micky
<[email protected]> wrote:
Very strange. Instead of being a Program directory, the Agent Settings
showed it in users\username\appdata...! of all places.
But there is a story behind this.
In the old days, the OS didn't have security (Win98).
So what the developers used to do was, their program
was stored in Program Files, and they would store their
settings file next to the executable. See ? So neat and
tidy.
Then one day, Microsoft "did security", and it changed the
security on Program Files to "TrustedInstaller" account.
Suddenly, Micky could no longer write to the Program Files,
with naive techniques.
To help people like Micky, Microsoft invented "redirection"
for this issue. If Micky runs Forte Agent, and Forte Agent
tries to write the settings into the TrustedInstaller-controlled
folder, then the Microsoft OS redirects the writes to
users\username\appdata...
because that is a directory owned by username = Micky.
The next time the program is running, an attempt to read an
item from the TrustedInstaller-controlled folder, instead
reads it from that AppData location.
What you describe, makes perfect sense. To a security person.
Except that, strictly as written, it doesn't, does it? It's possible
Micky has copied it down incorrectly, but, as written, surely ...
users\username\appdata\etc
... wouldn't work? It should be either ...
C:\Users\%USERNAME%\AppData\etc
... or, better ...
%SystemDrive%\Users\%USERNAME%\AppData\etc
... which would cover the very rare occasions where Windows is installed
to a drive letter other than C:, or, better still, ...
%USERPROFILE%\AppData\etc
... which latter would cover the rather more common occurrence of
profiles not being kept in the standard location.
Micky, did you copy that down as is, verbatim, or was that your own abbreviation for what is actually there?
More generally, I don't trust Trusted Installer further than I could
throw him, and I get over his sort of obstructive crap in one of two ways:
1 On my 64-bit builds, I installed as much of the software as possible
under my own created directory ...
C:\Programs
... and also, to cover those programs where the developers had
hard-coded*, and therefore broken, either the program or its installer
so that this didn't work very well or at all, I also gave Administrators ownership and Full Control permissions of every file on the C: drive, so
that where Trusted Installer decided to be obstructive, I could simply
override it. (If anyone else decides to do this, back-up to an image
first, in case you do it wrong, and don't replace the existing
permissions on any one file or folder, ADD the Administrator having Full Control as an EXTRA permission.)
2 On my 32-Bit W7 build created to cover the need to keep an old
scanner going for which I can't get 64-Bit drivers (it's the only one I
have from which I can remove the lid to scan large documents in
sections), but which nevertheless has 32-Bit versions of all my everyday software installed so that I can do other work at the same time, I was
more adventurous. I still created ...
C:\Programs
... but, booted into another OS on the same PC so that the affected OS
wasn't running when I did this, also I copied the entire contents of ...
C:\Program Files
... into it, deleted the latter, and created a link of the same name
pointing to the former ...
mklink /d "C:\Program Files" C:\Programs
... and then changed the Registry key value appropriately ...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
ProgramFilesDir="C:\Programs"
Everything seems to work just fine with both methods.
*Hard-coding, instead of reading the appropriate values from the
environment, commonly used Windows locations is a far-too-common fault
among software developers, let alone script hacks. If I had a tenner
for every time in my life I've had to correct this, I'd be richer than I
am now. During my last few years at work, we had a massive influx of
contract programmers doing stuff for our project to move first from Win
3.1 over DECNet to W95 over TCP/IP, then in a later stage to W2k.
Nearly all of these contract programmers had hard-coded the location of
the Windows folder as ...
C:\Windows
... but the default in W2k was ...
C:\WinNT
... and so, unsurprisingly, nearly all of their programming fell over
when run in the new environment! Rrrrrrrr!
--
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)