Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

inserting a new file into your app.path folder?

27 views
Skip to first unread message

Kim Hawker

unread,
Mar 29, 2022, 6:12:34 AM3/29/22
to
I want to be able to place a .jpg file onto a form and have it place the .jpg file in a certain folder. (App.Path & "\needed_files\") What type of form do I use for this operation?

Mayayana

unread,
Mar 29, 2022, 8:00:47 AM3/29/22
to
"Kim Hawker" <hawke...@gmail.com> wrote

|I want to be able to place a .jpg file onto a form and have it place the
.jpg file in a certain folder. (App.Path & "\needed_files\") What type of
form do I use for this operation?
|

I don't understand why you think you'd need a special
form. But on most systems you won't have "permission"
to save to app.path. Personally I include that in my
installers now. I create subfollders for settings files and
file operations, then I set those with no restrictions,
allowing me to bypass the Windows permissions mess
altogether, which can get very complicated. For example,
a lackey user can access their own app data folder, but
for them all users app data is read-only. And there's not
much of anywhere else where you can be sure that their
access is not restricted.


Kim Hawker

unread,
Mar 29, 2022, 8:56:05 AM3/29/22
to
On Tuesday, March 29, 2022 at 7:00:47 AM UTC-5, Mayayana wrote:
> I don't understand why you think you'd need a special
> form. But on most systems you won't have "permission"
> to save to app.path. Personally I include that in my
> installers now. I create subfollders for settings files and
> file operations, then I set those with no restrictions,
> allowing me to bypass the Windows permissions mess
> altogether, which can get very complicated. For example,
> a lackey user can access their own app data folder, but
> for them all users app data is read-only. And there's not
> much of anywhere else where you can be sure that their
> access is not restricted.

Thank you Mayayana, you’ve given me a different way to look at this issue.

ObiWan

unread,
Mar 29, 2022, 9:08:35 AM3/29/22
to
:: On Tue, 29 Mar 2022 08:01:03 -0400
:: (microsoft.public.vb.general.discussion)
:: <t1usdc$k04$1...@dont-email.me>
:: "Mayayana" <maya...@invalid.nospam> wrote:

> allowing me to bypass the Windows permissions mess

It isn't a "mess", or better said, it WAS a mess in a past, since
allowed applications to write "anywhere" then the permissions were
progressively restricted (as they SHOULD BE) and now, if your app need
to store data, it can safely do so under the user profile, if the data
is "per user" or under the application data if the data is global to
the machine (for your app), the reason is simple; security.

Mayayana

unread,
Mar 29, 2022, 12:46:54 PM3/29/22
to
"ObiWan" <obi...@mvps.org> wrote

> allowing me to bypass the Windows permissions mess

It isn't a "mess", or better said, it WAS a mess in a past, since
allowed applications to write "anywhere" then the permissions were
progressively restricted (as they SHOULD BE) and now, if your app need
to store data, it can safely do so under the user profile, if the data
is "per user" or under the application data if the data is global to
the machine (for your app), the reason is simple; security.
>

You're as predictable as the dawn. :) But you're certainly
free to spend your day swatting away messages that say
you don't have a right to access your own files. I got
that the other day on Win10. I had downloaded a new
copy of yt-dlp, extracted the folder of files to the Desktop,
and updated the files in the program folder. Then Win10
wouldn't let me delete the Desktop folder! I finally found
that I could delete all the files in the folder, then delete
the folder, but it wouldn't let me delete the whole thing
at once.

I call that a mess. I'm amazed that people have got used
to running on machines that constantly argue with them.
If I ever run Win10 as my primary system I'll run as Admin.
I already create several FAT32 data partitions so that I at
least won't have to deal with that nonsense for my data.

Of course it's not total nonsense to be able to restrict corporate
employees. It becomes nonsense when there's no way for me
to shut it off on my own computer, if I choose to run that way.
It becomes harassment, as well as providing a way for Microsoft
to block people from stopping their spyware and overrides.

In any case, my method of software installs avoids all that
without compromising security. The program folder is still
locked. It's acting like a portable app. And if people want
to do something like back up the settings file, it's right
there in the program folder, not at the end of an absurbly
complicated path that they won't know how to find. The
app data path is good, again, for corporate employees who
are sharing computers. But it's not so good for people who
own their computers and don't have "users" configured.


ObiWan

unread,
Mar 30, 2022, 6:16:55 AM3/30/22
to
:: On Tue, 29 Mar 2022 12:47:11 -0400
:: (microsoft.public.vb.general.discussion)
:: <t1vd5s$utv$1...@dont-email.me>
:: "Mayayana" <maya...@invalid.nospam> wrote:

> I call that a mess. I'm amazed that people have got used
> to running on machines that constantly argue with them.
> If I ever run Win10 as my primary system I'll run as Admin.

And if you'll ever run Linux or whatever Unix flavor you'd run it as
root ? How cool (not) :P

It isn't a "windows" thing, MS tried to use a "liberal" approach from
the start (Windows 3.x) but then they faced security issues so when
they moved to the "NT" series they applied step by step some
restrictions until they found that they had to use the same approach
(or similar) to the one which the Unix world applied from beginning

But if you can't see the forest due to all those trees, then it isn't
my problem


Mayayana

unread,
Mar 30, 2022, 8:41:21 AM3/30/22
to
"ObiWan" <obi...@mvps.org> wrote

>
And if you'll ever run Linux or whatever Unix flavor you'd run it as
root ?
>

Yes, and I have.

> It isn't a "windows" thing

I didn't mean to imply that it is. It's a corporate thing.
Corporate and SOHo are very different arrangements. In
the first you have no rights, don't own your computer, and
have no business using any computer except to do work, such
as writing MS Word docs. The network is open and safe.
Access to the Internet is restricted. In that scenario, open
networking and being restricted to a user folder make good
sense. That's the world in which most software developers
are working. The money to be made is in business, not in
home/small office sales.

In the case of SOHo, typically the user owns the machine
and should have full access. The network is not safe. It's
a reversed risk scenario. Yet the corporate model is being
applied: minimal protection from malware and online threats,
with extensive user restriction. Many attacks elevate privilleges,
since that's a universal problem for malware writers these days.

The result is the mess that is Win10. It won't let me delete
a folder I just created. How cool (not). There's nothing wrong
with corporate security model... if you're an employee on a
corporate intranet. The problem is when I pay for a computer
and I'm blocked from setting it up in the way that's best for me.
You can go on all day with your self-righteous I-know-better
attitude, but I've never had any sort of virus or malware in
25-odd years. Why? Because I'm careful about online security.


As noted, this is
also a strategy for MS to turn Windows into a kiosk system
for accessing services. It's the classic scam: "Sorry, but computers
are just too dangerous to allow the public to use them freely.
But we can help. What id you want to buy today?"

Anyway, this is the same old argument we always have, but
I do appreciate you providing opportunities to present the
reasoning against Microsoft's Windows-as-a-service scam.
The voices that question it are few compared to the voices
on the bandwagon. :)


ObiWan

unread,
Mar 30, 2022, 9:19:05 AM3/30/22
to
:: On Wed, 30 Mar 2022 08:41:37 -0400
:: (microsoft.public.vb.general.discussion)
:: <t21j5e$4gr$1...@dont-email.me>
:: "Mayayana" <maya...@invalid.nospam> wrote:

> In the case of SOHo, typically the user owns the machine
> and should have full access. The network is not safe. It's
> a reversed risk scenario.

In the case of SoHo, the security countermeasure are limited, so the
filesystem security MUST be enforced through ACLs otherwise SoHo boxes
could (and were/are - due to the insane idea of lowering security) the
"low hanging fruit" for malware and botnets

ObiWan

unread,
Mar 30, 2022, 9:44:25 AM3/30/22
to
:: On Wed, 30 Mar 2022 15:19:03 +0200
:: (microsoft.public.vb.general.discussion)
:: <20220330151...@mvps.org>
forgot...

>>> And if you'll ever run Linux or whatever Unix flavor you'd run it as
>>> root ?

>> Yes, and I have.

How cool (not), so, instead of understanding the system native security
system and making it work FOR you, you decided to go AGAINST it; that's
what a lot of "cowboys" do to systems <deep sigh>

And NO, it isn't about Microsoft, it's about ANY operating system
security framework and about the fact that to use any OS one should, as
the first step, understand it and its security model.



ObiWan

unread,
Mar 31, 2022, 11:40:57 AM3/31/22
to
:: On Tue, 29 Mar 2022 03:12:32 -0700 (PDT)
:: (microsoft.public.vb.general.discussion)
:: <651b0e35-d3f2-4d12...@googlegroups.com>
Instead of using your program path, use the suggested folders for
additional data which you may want to read/write at runtime, the paths
for those folders can be easily retrieved from the environment
variables, to start, fire a command prompt and try entering the
following commands

echo %PROGRAMDATA%

echo %APPDATA%

echo %LOCALAPPDATA%

the results will be the pathnames for the global program data (for all
users, global to the machine), for the "roaming" program data and for
the "local" program data

To obtain the same informations from VB you'll just need to issue a
command like

sProgData = Environ("PROGRAMDATA")

now, to use the path, willing to follow the "rules" you should create a
subfolders structure inside the path, for example

sMyProgData = sProgData & "\MyCompanyName\MyProgramName"

by the way you should create both the "company" and "program"
subfolders, but once done, you may store whatever file you want inside
that folder; in the above example, the resulting path will be the
global one, that is common for ANY user logging onto that machine,
willing to save "per user" settings you'll do so by setting the path to

sUserData = Environ("APPDATA")

or either

sUserData = Environ("LOCALAPPDATA")

and, again, your data path will be

sThisUserData = sUserData & "\MyCompanyName\MyProgramName"

and, all the user specific data will be saved there; the suggestion is
to use the global program data to save global program settings and data
and then use the per-user data folder to save the user specific
settings which may, eventually, override some of the global settings

Let me try an example, let's say you have an email client program, such
a program may store the global settings like trusted certificates,
default settings and so on inside the "PROGRAMDATA" subfolder, while
the infos related to the email accounts and the related data will
instead be stored under "APPDATA" so that each user will have his/her
own set of data and settings

DanS

unread,
Apr 16, 2022, 9:49:22 AM4/16/22
to
ObiWan <obi...@mvps.org> wrote in
news:20220330154...@mvps.org:


>>>> And if you'll ever run Linux or whatever Unix flavor
>>>> you'd run it as root ?
>
>>> Yes, and I have.
>
> How cool (not), so, instead of understanding the system
> native security system and making it work FOR you, you
> decided to go AGAINST it;

That sounds like a typical Linux user. I used to "troll" the Ubuntu newsgroup...at least,
that's what *they* called it, because I wasn't just blindly singing the praises of Linux, and
poo-pooing on Windows for everyting and anything I could.

I would try to edumacate these people about Windows. Not even telling them "Windows is
the Greatest OS in the World"...just correcting their misinformation. In fact, I never said
that in all the years I "trolled" there.

The biggest thing they'd always gripe about when someone was complaining about some
Linux "feature", or the way something worked in Linux, some statement like "you have to
learn how to use it and what it's meant to do and how configure it properly before
complaining"(, meaning "before you'll understand how it's so much better than Windows")
was usually made.

One time, one of those persons that regularly expressed this type of opinion, was trying to
explain how Windows UAC is so inferior to the su and sudo commands for elevation in
*nix, because, "in Windows, it's just a click through and won't stop anyone from doing
what they want to do.".

Being the "troll" I was, and not one being able to pass up an opportunity to expose
hypocrisy of those that believe they are above you, I of course to the time to explain
exaclty how UAC worked for the different account types, how an Admin user is just a click
through, and a 'Standard' user actually has to enter an admin password.

...and ended up with, obviously, "perhaps you should learn how to properly configure
something and know how it works before you complain.".

(Of course, that was met with just goal post moving...)


Mayayana

unread,
Apr 16, 2022, 10:09:46 AM4/16/22
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote

| ...and ended up with, obviously, "perhaps you should learn how to properly
configure
| something and know how it works before you complain.".
|
| (Of course, that was met with just goal post moving...)
|

That points to one of my favorite things about Windows:
It's the only OS that's not a religion. But for some MS
groupies it can get religious when they start talking about
the right way to do things. That goes way back. MS want
everyone but themselves to follow rules of standardization.


DanS

unread,
May 10, 2022, 12:36:28 PM5/10/22
to
"Mayayana" <maya...@invalid.nospam> wrote in
news:t3ein7$pv7$1...@dont-email.me:
So...MS has 'broken' a lot of things in their history.

But you know what one thing REALLY irks me to no end?...

Completely breaking e-mail hierarchy in Outlook by dumping all the > 's that are
supposed to make a hierarchy 'in' the e-mail, so you can inline respond, and it makes
sense and you can tell where it is.

Now when using Outlook, you've got people using colored fonts/bolding/italics/and a
combo of all those, to depict "what is theirs", or prefixing each line with their name, like
it's some kind of TV/MOVIE script.


Mayayana

unread,
May 10, 2022, 4:06:59 PM5/10/22
to
"DanS" <t.h.i.s....@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote

| Completely breaking e-mail hierarchy in Outlook by dumping all the > 's
that are
| supposed to make a hierarchy 'in' the e-mail, so you can inline respond,
and it makes
| sense and you can tell where it is.
|
| Now when using Outlook, you've got people using colored
fonts/bolding/italics/and a
| combo of all those, to depict "what is theirs", or prefixing each line
with their name, like
| it's some kind of TV/MOVIE script.
|

I've never used Outlook. But isn't it normal if you
view it a plain text? I generally don't allow HTML in
email. Partly for security and partly because I don't want
to read Comic Sans in yellow on a ketchup red background.


0 new messages