Page 1 of 1
Where are the preferences stored?
Posted: Mon Jun 04, 2007 10:49 pm
by Derek
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.

Posted: Mon Jun 04, 2007 11:02 pm
by ts-soft
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", "")

Posted: Tue Jun 05, 2007 8:28 am
by Derek
Great, thanks. Will be able to copy them from one computer to the other.
Re: Where are the preferences stored?
Posted: Tue Jun 05, 2007 10:17 am
by PB
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.
Posted: Tue Jun 05, 2007 1:05 pm
by Derek
Must of missed that, thanks, still haven't any idea why my prefs were lost though.
Re: Where are the preferences stored?
Posted: Tue Jun 05, 2007 1:11 pm
by Trond
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.

Copy *.prefs from the PureBasic directory into %APPDATA%\PureBasic.
Posted: Tue Jun 05, 2007 1:17 pm
by Derek
BTW, what I meant was that I couldn't find them anywhere on my computer, it was like they were deleted. Thanks to everyone anyway.