To load WW to a USB stick so I can take it with me I run this script:
!PortableBuilder.cmd[code]@title Create or update a Portable WW system
@echo off
setlocal
set WW=…
set MyFiles=
set Portable=
::set Portable=WW_Test_Folder
::set Portable=I:\PortableApps"Weather Watcher Portable"\App
::set Portable=G:\Documents"Weather Watcher Portable"
:: Change the above sets to meet your needs.
:: NB Folder names including spaces/blanks must be enclosed in quotes. See examples above.
if %Portable%!==! (
echo.
echo 1. WW_Test_Folder
echo 2. G:\Documents"Weather Watcher Portable"
echo 3. I:\PortableApps"Weather Watcher Portable"\App
echo.
set /p Portable= Enter 1 - 3 or a valid folder name to write Portable WW to or Q to Exit: )
if /I %Portable%! EQU Q! exit
if /I %Portable%! EQU 1! set Portable=WW_Test_Folder
if /I %Portable%! EQU 2! set Portable=G:\Documents"Weather Watcher Portable"
if /I %Portable%! EQU 3! set Portable=I:\PortableApps"Weather Watcher Portable"\App
set Key=Y
if not exist %Portable%\ (
echo.
echo %Portable% not found
set Key=
set /p Key=Enter Y to create %Portable%, Q to Exit: )
if /I %Key%! EQU Q! exit
if /I %Key%! NEQ Y! goto END
:WWBASE
echo.
echo Updating %Portable%
echo.
xcopy %WW%ww.exe %Portable%\ /y
xcopy %WW%dl.exe %Portable%\ /y
xcopy %WW%GetFile.exe %Portable%\ /y
::xcopy %WW%WWInstaller.exe %Portable%\ /y
::xcopy %WW%.ww? %Portable%\ /y
xcopy %WW%.ww %Portable%\ /y
xcopy %WW%.gif %Portable%\ /y
xcopy %WW%.chm %Portable%\ /y
xcopy %WW%*.wtp %Portable%\ /y
xcopy %MyFiles%!wwPortable.cmd %Portable%\ /y
if exist %MyFiles%Default.ini (
xcopy %MyFiles%Default.ini %Portable%\ /y)
xcopy “%AppData%\WeatherWatcher”*.cmb %Portable%\Users\Default\ /y
xcopy “%AppData%\WeatherWatcher”*.wtp %Portable%\Users\Default\ /y
xcopy “%AppData%\WeatherWatcher”*.ww %Portable%\Users\Default\ /y
xcopy “%AppData%\WeatherWatcher”*.html %Portable%\Users\Default\ /y
echo.
set Key=
set /p Key=Enter Y to build/update Skins folder, Q to Exit:
if /I “%Key%” EQU “Q” exit
if /I “%Key%” NEQ “Y” goto TESTBUILD
:SKINS
xcopy %WW%Skins*.* %Portable%\Users\Default\Skins\ /y
xcopy %WW%Skins\ToolTip*.* %Portable%\Users\Default\Skins\ToolTip\ /s /y
::rd %Portable%\Users\Default\Skins\ToolTip\Classic /s /q
call :SKINS Icons “Eds”
call :SKINS Icons “Eds Shiny”
call :SKINS Icons “NY Times”
call :SKINS Icons “SFGate”
call :SKINS Interface “Eds Classic”
call :SKINS Interface “Eds Classic EyeCandy”
call :SKINS Interface “Eds EyeCandy”
call :SKINS Interface “Eds Mini”
call :SKINS Interface “Eds Mini Tronnix”
call :SKINS Interface “Eds Mini Xt”
call :SKINS Forecasts “Eds Classic”
call :SKINS Forecasts “Eds Splendid Mini”
:TESTBUILD
echo.
echo Portable WW folder loaded.
set /p Key=Enter N to bypass test of Portable WW, Q to quit:
if /I “%Key%” EQU “Q” exit
if /I “%Key%” EQU “N” goto EOJ
start /min %Portable%\ww.exe -id
:EOJ
echo.
set Key=“”
set /p Key=Enter Y to Delete %Portable% folder, Q to quit:
if /I “%Key%” EQU “Q” exit
if /I “%Key%” NEQ “Y” exit
rd %Portable% /s /q
:END
endlocal
exit
:SKINS
xcopy %WW%Skins%1%2*.* %Portable%\Users\Default\Skins%1%2\ /s /y
[/code][size=2]Updated 6/01 - eliminated the ww2 Maps and WWinstaller from WWBASE
Updated 6/07 - added a menu for 3 fixed paths[/size]
Obviously the Skins selections can be changed to meet the desires of others. (But why would you? :lol: )
!WWPortable.cmd@title Starting Weather Watcher Portable
@start /min ww.exe -id
I keep both scripts in a folder named My Files in the WW install folder. If you locate them differently you need to change the SET commands.
Once loaded to the USB device start WW by dbl clicking on the !WWPortable.cmd.
Depending on what else you have on the USB device you can add the !WWPortable.cmd file to a menu for easier access or even automatic starting. I find PStart to be VERY easy to work with. PortableApps is ok if you can get around the each EXE equals a menu item problem. I used a utility named Bat2Exe to compile the simple bat file below to an EXE file, which some AVs flag as a virus, but it works for me. And according to this link http://portableapps.com/node/13754 AutoIt and AutoHotKey scripts are also a possibility.
Bat2ExeInput.bat@echo off&title Starting Weather Watcher&Mode CON Lines=3 COLS=25
rem A quick & dirty way to set a environmental variable to a drive letter.
set MyUSB=
echo @set MyUSB=%%3:> Volume.cmd
dir *.cmd | find "Volume" > temp.cmd
call temp.cmd
del temp.cmd
del Volume.cmd
START /MIN %MyUSB%\"PortableApps\Weather Watcher Portable\App\ww.exe" -id
Hope this helps.
BTW I’m not sure I need to copy the Maps.ww2 file to the device but I do. I also have no idea what WWInstaller would do with WWS files if executed from the USB device but I include that also. :-s
N.B. Newer version below.