

LpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _īyVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _īyVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _ LpApplicationName As Long, ByVal lpCommandLine As String, ByVal _ Private Declare PtrSafe Function CreateProcessA Lib "kernel32" (ByVal _ HHandle As Long, ByVal dwMilliseconds As Long) As Long Private Declare PtrSafe Function WaitForSingleObject Lib "kernel32" (ByVal _ ' Some DECLARATIONS needed for supervised command executions (remote SHELL-SCRIPTS on router) ' The ROOT (mount) of your USB stick on the router Public Const PUTTYDIR = "C:\Program Files\PuTTY\" ' DIRECTORY LOCATION for PUTTY installation (on your WINDOWS system) ' DIRECTORY LOCATION for temp files (on your WINDOWS system) ' Please ADJUST / MODIFY these seeetings to reflect your environment ' CONFIRM / ADJUST the settings in this VBA module to YOUR environment ' Have SAMBA access to the USB stick the router. ' This will SAVE all settings on the DD-WRT router and create a "SetAll.sh" command to RESTORE these in case you need to Please cut and paste the code below as a MACRO into the VBA-IDE. and Excel lets me do a lot of things a little more comfortable. Nvram show | grep = | cut -d"=" -f 1 | while read key do echo nvram set $key=\"$(nvram get $key)\" done' > SetAll.sh however I wanted to process the variables further. The same can be done with this ONE-LINER. The resulting "SetAll.sh" script can be used to restore the router to that state whenever it is run. PLINK is used to execute a shell command on the router from my Windows machine.Īll this does is create a 100% identical copy of the NVRAM state at the time of backup.


I used PUTTY / PLINK to automate this process as much as possible. I used a SAMBA connection to access the file from my windows machine.

I used EXCEL to do the processing of the NVRAM dump, which I created on the router. 100% copyįor a long time I have been using the OLD B/R script initially developed by FRATER ( ), however it stopped working with the latest version of DD-WRT. Posted: Sat 4:02 Post subject: Backup / Restore of NVRAM settings using EXCEL.
