NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Guru master

Joined: 05 Jul 2004
Posts: 660
Location: Belgium
Reply with quote
If you want to move all settings from one PC to the other then you need both the registry (IDE switches and so on) and the config/ folder (highlights, accounts, function reference), but you can skip the layout.cfg file from there since that contains the panel layout afaik. I usually only copy the config folder (in fact I keep it on a networked drive all the time so that I have it with me both @ work and @ home).

Frankly I don't get why a part of the IDE config is stored in the registry and another on disk.
If I were NuShpere, I would store all machine dependent settings such as the docking config, history and so on in place X, and all the config that can be shared amongst machines (colors, shortcuts, templates) in location Y, that would make my life a lot easier since I wouldn't have to copy over stuff each time I change a highlighting setting and so on. And either use the registry or not use it at all Smile
(I prefer not using the registry actually since that makes it easier to also include all settings in my backups without exporting stuff first).
Just my $0.02
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 22 May 2008
Posts: 141
Reply with quote
I know I'm reviving an old thread, but figured I'd add this since it may help somebody.

Since PHPEd does not have an auto-export feature, I made my own .bat file.

1. Create a folder somewhere. (e.g. NuSphereBak).
2. Open notepad and paste this into it. Save as "backup.bat" or something.

Windows XP:
Code:
@echo off

set yyyymmdd=%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%
set bakdir=C:\Documents and Settings\shaun\Desktop\NuSphereBak

rmdir /S /Q "%bakdir%\%yyyymmdd%\phped"
rmdir /S /Q "%bakdir%\%yyyymmdd%\config"

mkdir "%bakdir%\%yyyymmdd%\phped"
mkdir "%bakdir%\%yyyymmdd%\config"

reg export "HKCU\Software\NuSphere" "%bakdir%\%yyyymmdd%\NuSphere.reg"

xcopy "%APPDATA%\NuSphere\PhpED\config\*" "%bakdir%\%yyyymmdd%\config\" /E /Y /I /Q
xcopy "%PROGRAMFILES%\NuSphere\phped\templates\*" "%bakdir%\%yyyymmdd%\phped\templates\" /E /Y /I /Q

del "%bakdir%\%yyyymmdd%\config\launchbox.cfg"
del "%bakdir%\%yyyymmdd%\config\fileprop.cfg"

type NUL > "%bakdir%\%yyyymmdd%\config\launchbox.cfg"
type NUL > "%bakdir%\%yyyymmdd%\config\fileprop.cfg"


Windows 7:
Code:
@echo off

set yyyymmdd=%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%
set bakdir=\NuSphereBak

rmdir /S /Q "%bakdir%\%yyyymmdd%\phped"
rmdir /S /Q "%bakdir%\%yyyymmdd%\config"

mkdir "%bakdir%\%yyyymmdd%\phped"
mkdir "%bakdir%\%yyyymmdd%\config"

reg export "HKCU\Software\NuSphere" "%bakdir%\%yyyymmdd%\NuSphere.reg" /Y

xcopy "%APPDATA%\NuSphere\PhpED\config\*" "%bakdir%\%yyyymmdd%\config\" /E /Y /I /Q
xcopy "%ProgramFiles(x86)%\NuSphere\phped\templates\*" "%bakdir%\%yyyymmdd%\phped\templates\" /E /Y /I /Q

del "%bakdir%\%yyyymmdd%\config\launchbox.cfg"
del "%bakdir%\%yyyymmdd%\config\fileprop.cfg"

type NUL > "%bakdir%\%yyyymmdd%\config\launchbox.cfg"
type NUL > "%bakdir%\%yyyymmdd%\config\fileprop.cfg"


3. Run this file any time you want a backup made.
4. (optional) Using Window's Task Scheduler, have this bat file run automatically once a day (or time of your choosing.)

The last 4 commands in the batch file create empty launchbox.cfg and fileprop.cfg files. The reason I'm doing this is because after some time, these files can accumulate to a hefty size and cause the IDE to take a while to close. So... if I restore a backup, I'd rather those two files be empty. If for some reason you want to keep those files as is, just remove the last 4 commands.

Disclaimer:
You may have to change the paths in the batch file if PHPEd is not installed in the default location.
20100317: I've only tested this under Windows XP and Windows 7 so far. Windows Vista may need a slightly different batch script.

IMPORTANT: Do not import the registry in to a different computer and expect it to work! Unfortunately, paths are scattered all throughout PHPEd's keys in the registry, so if your computer login username changes or you are trying to go from a Windows XP installation to a Windows 7 installation, you'll have to do some manual editing of all of the paths.

To NuSphere, if they read this.. It would be great if the user-configurable settings (minus those with paths) (Editor Settings, Syntax Colors, etc..) were in an ini file instead of the registry so that they may be backed up independently.

Edits:
20100321: Added bakdir variable. Task Scheduler was creating backups in the system32 directory before. You will need to modify this path to match where your backup folder is.
View user's profileFind all posts by simshaunSend private message
Bugger


Joined: 06 Dec 2006
Posts: 6
Reply with quote
Can you somehow export from a registry file on another drive?

I want to pull my config over from the old system drive. All files are accessible, it's just not the boot drive anymore.

Can I do it? It'd be very good.
Thanks

please nuSphere pay heed:
we need to have the configs in one simple directory in the file system. If nothing else, for consistency's sake.
But it'd help heaps for users trying to deal with this problem over and over again.
Please guys, listen!
View user's profileFind all posts by ysuSend private message
New Computer, way to keep all settings?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 2  

  
  
 Reply to topic