|
Alot of people have been emailing me lately about how to get Smith Project to run on a thumb drive... So here it is, your mileage may vary.
Smith project on a thumb drive.
Gather materials
Installation
Copy the contents of the folder "smith-bin-windows-1.3b4" in the zip file "smith-bin-windows-1.3b4.zip" to the root of your USB drive.
Your USB drive should resemble the following...
+jetty
+jre
+lib
+log
+webapps
+wwwroot
gpl.txt
reademe.txt
startdb.bat
startweb.bat
stopdb.bat
stopweb.bat
Create a VisualBasic Script to start the Web and DB server with one command.
' Name: Start.vbs
Dim WSHShell, dir, fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.run "startdb.bat "&s&m,0,0
WSHShell.run "startweb.bat "&s&m,0,0
WScript.sleep(1000)
Do the same for Stop.
' Name: Stop.vbs
Dim WSHShell, dir, fso, f1
Set fso = CreateObject("Scripting.FileSystemObject")
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.run "stopdb.bat "&s&m,0,0
WSHShell.run "stopweb.bat "&s&m,0,0
WScript.sleep(1000)
Run PStartSetup211.exe (if on vista run with Admin previlidges).
Select Portable setup and drive to install to.
Configure PStart, or use my XML file named "PStart.xml";
<start>
<files>
<file name="Start Smith Project">
<path>Start.vbs</path>
<icon>favicon.ico</icon>
<autorun>onstartup</autorun>
<runcount>2</runcount>
<rundate>2007/10/31 10:41:24</rundate>
</file>
<file name="Stop Smith Project">
<path>Stop.vbs</path>
<icon>favicon.ico</icon>
<autorun>onexit</autorun>
</file>
<file name="smith administration">
<path>smith administration.url</path>
<icon>favicon.ico</icon>
</file>
</files>
<notes>
</notes>
<colors>
<color name="0">
<value>A0A0FFh</value>
</color>
<color name="1">
<value>A0C0FFh</value>
</color>
<color name="2">
<value>A0FFFFh</value>
</color>
<color name="3">
<value>A0FFA0h</value>
</color>
<color name="4">
<value>FFA0A0h</value>
</color>
</colors>
<configurationfile>
<backupmode>pbmTemporary</backupmode>
</configurationfile>
<execution>
<count>2</count>
<overalltime>0:08:16.628</overalltime>
</execution>
<general>
<executionaction>1</executionaction>
<language>auto</language>
<singleclick>False</singleclick>
</general>
<history>
<usernames>
</usernames>
</history>
<info>
<visible>True</visible>
</info>
<menu>
<hotkeysvisible>True</hotkeysvisible>
</menu>
<mouse>
<sensors>
<bottom>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</bottom>
<bottomleft>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</bottomleft>
<bottomright>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</bottomright>
<cornersize>20</cornersize>
<left>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</left>
<monitor>1</monitor>
<right>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</right>
<top>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</top>
<topleft>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</topleft>
<topright>
<leftaction>0</leftaction>
<rightaction>0</rightaction>
</topright>
</sensors>
</mouse>
<note>
<alarm>
<notify>
<autoclose>False</autoclose>
<duration>10</duration>
<sound></sound>
</notify>
<recenttime>2007/08/31 15:06:44</recenttime>
</alarm>
<defaultcolor>A0FFFFh</defaultcolor>
<style>0</style>
<visible>True</visible>
<wordbreak>1</wordbreak>
</note>
<panel>
<closemode>0</closemode>
<hotkey>False</hotkey>
<hotkeyclose>True</hotkeyclose>
<hotkeycode>15</hotkeycode>
<hotkeymodifier>7</hotkeymodifier>
<pageindex>0</pageindex>
<position>0</position>
<showonstartup>False</showonstartup>
<staticsize>False</staticsize>
<title>Smith Project</title>
</panel>
<search>
<allusersstartmenu>True</allusersstartmenu>
<colorize>True</colorize>
<colors>
<allusersstartmenu>0080FFh</allusersstartmenu>
<currentuserstartmenu>40A000h</currentuserstartmenu>
<pstart>FF4040h</pstart>
</colors>
<currentuserstartmenu>True</currentuserstartmenu>
<includemode>0</includemode>
<pstart>True</pstart>
<sort>0</sort>
</search>
<style>
<additionaltextcolor>000000h</additionaltextcolor>
<backgroundimage></backgroundimage>
<captioncolor>000000h</captioncolor>
<iconsize>0</iconsize>
<iteminfomode>2</iteminfomode>
</style>
<tray>
<doubleclick>1</doubleclick>
<hotkey>False</hotkey>
<hotkeycode>12</hotkeycode>
<hotkeymodifier>7</hotkeymodifier>
<hover>0</hover>
<iconimage>0</iconimage>
<iconvisibility>0</iconvisibility>
<leftclick>2</leftclick>
</tray>
<window>
<main>
<position>
<x>604</x>
<y>255</y>
</position>
<size>
<x>225</x>
<y>300</y>
</size>
</main>
</window>
</start>
This XML is setup to run Start.vbs when the PStart is started.
Create and autorun.inf file containing the following;
[autorun]
OPEN=PStart.exe
ICON=favicon.ico
ACTION = Usb-Menu
This will run Pstart when the usb drive in inserted. (If autorun is enabled).
Notes
- Smith Project Administrator is located at url http://localhost:8081/IDE/admin.html
- Smith Project Root is located at url http://localhost:8081
- The root folder (where you can put your stuff at) is located at <your USB Drive>\wwwroot\
- Have Fun.
|