How defeat odd security FreeBASIC installed with

Windows specific questions.
Post Reply
sieler
Posts: 5
Joined: Jan 08, 2022 4:01

How defeat odd security FreeBASIC installed with

Post by sieler »

Hi,
New to FreeBASIC...

I just installed FreeBASIC-1.09.0-win32.exe on Windows 10 Home.
(I did that from a CMD.EXE window running as my user, 'sieler' ... not as admin (in case that's a clue).)

Using GUI, I found and ran the FreeBASIC console.

The window I'm in has a prompt of: Program Files (x86)\FreeBASIC>
...and it does *NOT* let me run (some) programs in directories under my PATH.

For example, my PATH has C:\Windows\System32\openSSH
and in that directory is scp.exe
If I try to run scp, I get "access is denied".

If I do: CD \Windows\System32 and then do a "DIR" I see 2,666 files ... and openSSH is not one.

But, if I start a new CMD.EXE window, CD \Windows\System32 and do a "DIR", I see 4,166 files, including openSSH.

Clearly, the FB console is running with some weird (IMHO :) security ... how can I defeat that and make it run with the same kind of security as everything else of mine?

(I did search this form, no success.)

thanks!
badidea
Posts: 2586
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: How defeat odd security FreeBASIC installed with

Post by badidea »

sieler wrote:Using GUI, I found and ran the FreeBASIC console.
Hi sieler, your post is a bit confusing (at least to me).
What is according to you the 'FreeBASIC console'? What did you start exactly?
dodicat
Posts: 7967
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: How defeat odd security FreeBASIC installed with

Post by dodicat »

You should not put freebasic in Program Files in win10.
It is a known glitch.
Expand freebasic into a dedicated folder from the compressed archive, on the desktop, just a simply named folder without unnecessary spaces, and run it from there, you will have no problems.
'''
From the forum NEWS section:
The DOWNLOADS you are MOST LIKELY looking for...
windows: FreeBASIC-1.09.0-winlibs-gcc-9.3.0.7z - combined 32bit and 64bit standalone version <<-------- this one
(You might need 7Zip to expand .7z)
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: How defeat odd security FreeBASIC installed with

Post by caseih »

To expand on @dodicat's post, in the past Windows applications often expected to be able to read and write just about anywhere on the disk and read and write anything in the registry, including HKEY/Local Machine. With windows 10 (perhaps also Windows 8), Windows enforces a more strict security model that prevents ordinary programs from accessing Windows/system32. But to support old programs without breaking, Windows creates a virtual file system for applications so they appear to be able to read and write wherever they want on the hard drive, but they aren't seeing the full contents of the real drive, but a subset. This is called VirtualStore or UNC virtualization. I believe you can look in your user directory under %LOCAL­APP­DATA%\Virtual­Store and see this virtual view. When you understand what's going on, it's a neat hack, sort of like a chroot on Linux.
sieler
Posts: 5
Joined: Jan 08, 2022 4:01

Re: How defeat odd security FreeBASIC installed with

Post by sieler »

badidea wrote:
sieler wrote:Using GUI, I found and ran the FreeBASIC console.
Hi sieler, your post is a bit confusing (at least to me).
What is according to you the 'FreeBASIC console'? What did you start exactly?
Hi...when you install FreeBASIC (at least, via the .exe installation file), two entries show up in the windows pane on the left (I've forgotten the name years ago, sorry...start bar?): "Online wiki" and "Open console".

Double clicking on "Open console" opens what appears to essentially be a cmd.exe window (yeah, could be the newer version who's name escapes me). That window looks like a classic DOS command window, and is "homed" (CD to) the main FreeBASIC directory, C:\Program Files\FreeBASIC. (The directory that has fbc.exe)

Hope that helps explain your question.
sieler
Posts: 5
Joined: Jan 08, 2022 4:01

Re: How defeat odd security FreeBASIC installed with

Post by sieler »

[quote="dodicat"]You should not put freebasic in Program Files in win10.
It is a known glitch.
[...]'''

Thanks!

As a programmer, I'd have appreciated the .exe install file saying "whoa, dude, this is Windows 10...you want to get <this> or <that> package to install".
sieler
Posts: 5
Joined: Jan 08, 2022 4:01

Re: How defeat odd security FreeBASIC installed with

Post by sieler »

caseih wrote:To expand on @dodicat's post, [...] This is called VirtualStore or UNC virtualization. I believe you can look in your user directory under %LOCAL­APP­DATA%\Virtual­Store and see this virtual view. When you understand what's going on, it's a neat hack, sort of like a chroot on Linux.
I suspect you're right, and that matches what I conjectured ... and what I feared.

As a programmer for 50+ years, I *really* hate this continuing process of "making things safer", which also translates into "making things harder"!

(BTW, I wrote one of the early papers on computer security ... so I'm aware of security ... and, unlike many, aware of the security vs. usability tradeoff :)

thanks!
sieler
Posts: 5
Joined: Jan 08, 2022 4:01

Re: How defeat odd security FreeBASIC installed with

Post by sieler »

[quote="dodicat"] [...]
Expand freebasic into a dedicated folder from the compressed archive, on the desktop, just a simply named folder without unnecessary spaces, and run it from there, you will have no problems.
'''

Solved it for me, thanks.

Stan
Post Reply