
Where are the preferences stored?
Where are the preferences stored?
I can't find where the preferences for the editor (4.1 beta) are stored, done a quick search but didn't find anything, it's just that everything was fine last night and then tonight I load PB and everything has been reset. 

Code: Select all
Procedure.s GetSpecialFolder(CSIDL.l)
Protected *itemid.ITEMIDLIST
Protected location.s = Space(#MAX_PATH)
If SHGetSpecialFolderLocation_ (0, CSIDL, @*itemid) = #NOERROR
If SHGetPathFromIDList_(*itemid, @location)
If Right(location, 1) <> "\" : location + "\" : EndIf
ProcedureReturn location
EndIf
EndIf
EndProcedure
RunProgram("notepad", GetSpecialFolder(#CSIDL_APPDATA) + "PureBasic\PureBasic.prefs", "")

PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Re: Where are the preferences stored?
This is from http://www.purebasic.fr/english/viewtopic.php?t=27343 :
Code: Select all
- For Vista compatibility nothing is written in the PureBasic dir anymore
- The temporary exe is placed in the Windows temp dir
- The Preferences location was moved to %App Data%\PureBasic\ for all preferences
NOTE: This cann still be changed with the /P, /A, /T commandline switches to specify different
locations for the preferences files.
- New commandline switch /PORTABLE which puts all preferences in the PureBasic dir (as before),
and disables the creation of the .pb extension for USB sticks and such.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: Where are the preferences stored?
Copy *.prefs from the PureBasic directory into %APPDATA%\PureBasic.Derek wrote:I can't find where the preferences for the editor (4.1 beta) are stored, done a quick search but didn't find anything, it's just that everything was fine last night and then tonight I load PB and everything has been reset.