[SOLVED] Shared Roaming Folder is a Problem
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
[SOLVED] Shared Roaming Folder is a Problem
I've installed PB versions 5.40, 5.62 and 6.20 and they all share the same path for the preference file which in turn causes them to all try to auto-load the same source files on program launch. Is there anything I can do to make them load from their own respective source folders I setup specifically to keep them from sharing source files? I'm really tired of source files getting corrupted from cross loads.
Last edited by Randy Walker on Mon Jun 09, 2025 10:14 pm, edited 1 time in total.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Do they get corrupted because of the different compiler versions/options at the end of the file, or because its trying to reload them all?
If the former, try setting "Save settings to" to something other than the end of the current source file.
If the former, try setting "Save settings to" to something other than the end of the current source file.
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Because I'm not paying attention to the fact they are not loading from where I had them load in the previous session and get rewritten when I edit and compile/run them. I don't want those edits to go to my good source file working perfectly in 5.40.Quin wrote: Sun Jun 08, 2025 3:47 pm Do they get corrupted because of the different compiler versions/options at the end of the file, or because its trying to reload them all?
Afraid to try because I don't know the consequences of any of those options.If the former, try setting "Save settings to" to something other than the end of the current source file.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Command-line options for the IDE:linux help wrote:Code: Select all
Options for launching the IDE: -p or --preferences <file> loads/saves all the configuration to/from the given file
https://www.purebasic.com/documentation ... dline.html
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Now that you mention it, never looked down there before but there does seem to be some pref settings at the bottom of my 5.40 source file -- more corruption apparently. it says:
; IDE Options = PureBasic 6.20 (Windows - x64)
Which is totally bogus. My 5.40 installation is x86 and the other 2 are x64.
; IDE Options = PureBasic 6.20 (Windows - x64)
Which is totally bogus. My 5.40 installation is x86 and the other 2 are x64.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Thanks NULL. Was totally unaware of those switches. looks to me like this one should fix the problem but where/how to add the switch?:#NULL wrote: Sun Jun 08, 2025 4:06 pmCommand-line options for the IDE:linux help wrote:Code: Select all
Options for launching the IDE: -p or --preferences <file> loads/saves all the configuration to/from the given file
https://www.purebasic.com/documentation ... dline.html
/LOCAL puts all preferences in the PureBasic directory instead of the user profile location
It gives this as an example:
Example:
PureBasic.exe Example.pb /PORTABLE
So I guess I should have to do:
PureBasic.exe Example.pb /LOCAL
That would imply I cannot use the recent files pick list to load any files and need to create custom shortcuts to load any of my source files.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Code: Select all
C:\PB\PureBasic\PureBasic_x64\PureBasic.exe /P "C:\PB\conf\PureBasic.prefs" /T "C:\PB\conf\Templates.prefs" /A "C:\PB\conf\Tools.prefs" /H "C:\PB\conf\History.db"
If a file is opened in this IDE and at least once saved or compilation is started, the data is overwritten. But it doesn't affect the result of compilation.
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Hi AZJIO : Not quite sure what you're saying here. Looks like you created a configurations folder as C:\PB\Conf but don't understand your what looks like a command line. Is this something you execute from command line?AZJIO wrote: Sun Jun 08, 2025 4:38 pmCode: Select all
C:\PB\PureBasic\PureBasic_x64\PureBasic.exe /P "C:\PB\conf\PureBasic.prefs" /T "C:\PB\conf\Templates.prefs" /A "C:\PB\conf\Tools.prefs" /H "C:\PB\conf\History.db"
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Last edited by AZJIO on Sun Jun 08, 2025 6:45 pm, edited 1 time in total.
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Still confused.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Registry. You can specify several versions in the registry and choose which version to run the pb file with.

My File Extension Association program (ContMenuFiles)

Shortcut (launch a specific version)


My File Extension Association program (ContMenuFiles)

Shortcut (launch a specific version)

-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
Those image links wont open due to some security issue with ibb.co.AZJIO wrote: Sun Jun 08, 2025 6:53 pm Registry. You can specify several versions in the registry and choose which version to run the pb file with.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
Start menu items are shortcuts with properties which state how the loader should start the program.
They live in a sub-folder of "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\"
If you right click an icon in the start menu and choose "Open File Location" from the context menu, you'll open the shortcut's folder.
Then right click the shortcut file and choose "Properties" from the context menu. You'll open the shortcut's "Properties" dialog.
See https://windows.tips.net/T010869_Changi ... rties.html for a generic example, which hopefully you'll be able to see.
There is an entry called "Target" and this is the command line which will start the application when clicked in the Start menu.
You can modify this as required by adding switch options after the target exe name:
"C:\Program Files\PureBasic 620\PureBasic.exe" /P "<PathToYourPrefsForPurebasic620>\PureBasic.prefs"
However, be aware that the /LOCAL and /PORTABLE options won't work properly with the IDE installed as a subfolder in "C:\Program Files" or "C:\Program Files (x86)". These are protected folders and require elevation to modify as a malware protection. Which means you'll either get read only problems using the IDE or you'd always have to start it as admin, which isn't a best practice.
AZJIO gets around that by installing his copies of PureBasic inside a folder called "C:\PB" which can be modified by the IDE with /LOCAL and /PORTABLE.
(For the sake of completeness for posterity: I'd like to point out that this isn't a best practice from a security point of view either and shouldn't be replicated in a secure corporate environment).
If you want your PureBasic folders to stay in "C:\Program Files" you can use the /P and /T etc settings to relocate the specific configuration files somewhere else but leave the main folder alone.
You will probably want the /NOEXT option on all of your shortcuts so that they don't update the default file handler settings in the registry which can also cause files to not be opened in the way you expect them to.
I hope this helps!
-
- Addict
- Posts: 989
- Joined: Sun Jul 25, 2004 4:21 pm
- Location: USoA
Re: Shared Roaming Folder is a Problem
YES!! spikey : That resolved the problem. Seems I don't need the /LOCAL switch at all, though it would probably be nice if it worked -- just seems to break history. Meanwhile I added a Conf folder to each of my source folders and copied the pref file to each respective folder:spikey wrote: Mon Jun 09, 2025 1:53 pmStart menu items are shortcuts with properties which state how the loader should start the program.
They live in a sub-folder of "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\"
If you right click an icon in the start menu and choose "Open File Location" from the context menu, you'll open the shortcut's folder.
Then right click the shortcut file and choose "Properties" from the context menu. You'll open the shortcut's "Properties" dialog.
See https://windows.tips.net/T010869_Changi ... rties.html for a generic example, which hopefully you'll be able to see.
There is an entry called "Target" and this is the command line which will start the application when clicked in the Start menu.
You can modify this as required by adding switch options after the target exe name:
"C:\Program Files\PureBasic 620\PureBasic.exe" /P "<PathToYourPrefsForPurebasic620>\PureBasic.prefs"
D:\PureBasic\PB_prjct-540\Conf\PureBasic.prefs
D:\PureBasic\PB_prjct-562\Conf\PureBasic.prefs
D:\PureBasic\PB_prjct-620\Conf\PureBasic.prefs
I put the /P in front of each of those and appended to the shortcut target as you suggested.
Works great!! THANKS!!!!
And great big THANKS for the detailed explanation.
- - - - - - - - - - - - - - - -
Randy
I *never* claimed to be a programmer.
Randy
I *never* claimed to be a programmer.
Re: Shared Roaming Folder is a Problem
You're welcome!

Yes, it will for the same 'read only' problem I mentioned above. /LOCAL will only work if the files are writeable in the IDE's parent folder. This is not true when the IDE is installed to one of the "Program Files" folders.
You can resolve this by using the /H switch and specifying a unique path for each IDE version history file, for example:
Code: Select all
/H D:\PureBasic\PB_prjct-540\Conf\history.db