Subject Re: Run As Administrator
From Andy Taylor <>
Date Thu, 02 May 2019 04:17:08 -0400
Newsgroups dbase.getting-started


Good point, well made. You know, as I hit the "Post" button I thought... perhaps I should add a note as to respecting the Windows rules on User Access Control.
However, Michael specifically wanted to run the program from within c:\RT9999 which my three lines should allow anyone to do (administrator or not).
But I do take the point about the UAC paths that are maintained within _app.framewin and which Ken articulates the use of within his excellent books.

More specifically, I should have noted that my apps are not usually installed within c:\program\files but rather get run as exe's from wherever the user puts them. While dBASE and dBASE runtime files do go through normal installs, my apps tend not to.  


> On 01/05/2019 09:35, Andy Taylor wrote:
> > michael,
> >
> > I have the following 3 lines built in to the startup app object in my apps.
> > so "this" refers to "app" but you could store it anywhere.
> >
> > this.folder = set("directory")                                         // current folder pointer
> > this.exeFolder = LibFiles::getFolderName(program(0))    // current program folder
> > if this.folder # this.exeFolder; cd (this.exeFolder); endif  // move to the exe folder location
> Is that wise?   If you've installed to C:\Program Files (x86)\... then
> you are creating temporary files and other junk in a sensitive - and
> protected - part of the file system.
> That's what Documents is for, or (if you are developing) your own
> private directory off the C:\ root could be used.    But not C:\Program
> Files...
> Bruce Beacham