Location of User Defined Pure Libraries

Just starting out? Need help? Post your questions and find answers here.
Dbot
New User
New User
Posts: 4
Joined: Tue Dec 02, 2025 12:43 pm

Location of User Defined Pure Libraries

Post by Dbot »

Hello Everyone,
I recently used Shadako's User Purelibrary utility to make a library for ext2D (the sample provided). Everything works great, including the new commands. I cannot, for the life of me, find the location of the newly created library. I looked in C:\Program Files (x86)\PureBasic\PureLibraries\UserLibraries, which is my install directory, checked for hidden files, etc. I checked a few other places that I thought of, but nothing. I wanted to remove the ext2D library, mostly for the sake of knowing how to do it.

Anyway, I hope someone can help. I am new to the forum, and somewhat new to programming, but with some background. I love purebasic!
User avatar
mk-soft
Always Here
Always Here
Posts: 6512
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Location of User Defined Pure Libraries

Post by mk-soft »

The path is correct, unless you are looking in the wrong PureBasic folder if you have installed different versions.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Dbot
New User
New User
Posts: 4
Joined: Tue Dec 02, 2025 12:43 pm

Re: Location of User Defined Pure Libraries

Post by Dbot »

Ok, thanks well at least I know I'm not going crazy (yet). Just out of curiosity, if I find the ext2D, is there an extension to the file? I looked in the default library files, and they don't seem to have one.
User avatar
Bisonte
Addict
Addict
Posts: 1329
Joined: Tue Oct 09, 2007 2:15 am

Re: Location of User Defined Pure Libraries

Post by Bisonte »

nope... No File Extensions
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
Dbot
New User
New User
Posts: 4
Joined: Tue Dec 02, 2025 12:43 pm

Re: Location of User Defined Pure Libraries

Post by Dbot »

OK, found out what the problem was, thought I would share it.

Sooo, to make a long story less long... When I was using the utility to apparently create the new library in
C:\Program Files (x86)\PureBasic\PureLibraries\UserLibraries,

it was actually putting it here:

C:\users\home\appdata\local\virtualstore\programFiles(x86)\purebasic\purelibraries\userlibraries

Google AI said this:

This directory is a part of the Windows VirtualStore, a compatibility feature that redirects file write attempts from protected system folders (like C:\Program Files (x86)\) to a location within the user's local profile......

C:\Users\home\AppData\Local\: This is a specific user's application data directory, which is a standard location for applications to store user-specific settings and temporary data.

VirtualStore: This folder acts as a "virtualized" location for files that an older or non-administrator application tries to save to a system-protected area where it does not have the necessary permissions.

Program Files(x86)\PureBasic\PureLibraries\UserLibraries: This sub-path mirrors the original location where the application (PureBasic, in this case) attempted to write files. Windows intercepts the request and creates the corresponding directory structure within the VirtualStore to save the files there instead.

In summary: The files in this directory were likely intended by the PureBasic software (or an older library within it) to be saved in C:\Program Files (x86)\PureBasic\PureLibraries\UserLibraries, but Windows redirected them to this user-specific, non-protected location to maintain security and compatibility.


Anyway, sorry about the length, but this represents several hours of my life, and I figured I'd share it
Dbot
New User
New User
Posts: 4
Joined: Tue Dec 02, 2025 12:43 pm

Re: Location of User Defined Pure Libraries

Post by Dbot »

I know that the above works because I experimented with removing the library and adding it again with Shadako's utility, and disables and re-enables the ext2D library. So, incidentally, if you go the the purebasic.exe, right click it, and go to properties -> compatibility tab, then check of 'run this program as an administrator' then everything will function as it should, and you'll be able to go to C:\Program Files (x86)\PureBasic\PureLibraries\UserLibraries and it will be there. I'm not sure if running PB as an administrator is a bad thing or not, I can't see why, but if someone knows, then they could also share. Thanks everyone!
User avatar
mk-soft
Always Here
Always Here
Posts: 6512
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Location of User Defined Pure Libraries

Post by mk-soft »

Here it is better to install PureBasic according to C:\WinAPP\PureBasic-v621x86. (path depending on version)
Thus, you can add PB to the WhiteList of Vierenscanner and there are no problems with the write rights as user of the UserLibraries.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply