• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

OT: Scripters & Programmers.. Finally! the TeAm Anandtech FlexInstall v0.8BETA to be released

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
This is ideally something that would work better in a scriptable installer(read: Nullsoft NSIS); however, not many of us can program in it. I'd do it if I had the time, however, I don't, so if Narzy is working on it, it's up to him unless someone else wants to give it a try. Installshield is nice, but it has its limitations.🙁
 
Sukhoi,
I dont know if that would be the place to start. So far we have install scripts that install and hide the client as a service for NT/2K, XP and 9X, there is also a LAN installer and CMD program that controls the running and installation across networks. The idea and concept is to have the right components install and be OS aware with configurable options. (options; Runtimes, Proxy, additional logging component and multiple CPU, and soul assins idea is pretty cool as well) NO SMALL TASK... 🙂 Like the title says "Universal Installer" for SETI. Bot2600 has a good start on this so we should all keep talking to one another about ideas and methods of delivery. If someone knows how to use NSIS, WISE or installshield great.









SHUX
 


<< I can't think of a need to differentiate between XP and 2K when using that variable. >>



Looking at the versions of install scripts for NT/2K and XP there seems to be a marked difference in the file directory and registry settings. If that isnt the case then someone confirm that as well. Is it possible that XP pro and home would need to be separated?









SHUX
 
There isn't any difference between XP and 2K as far as I can tell. Everything is the same in the "backend"; registry run locations, file directory structure, ect. They may do it for a better UI for the user, but where we're concerned, the "backend", it's all the same.
 


<< There isn't any difference between XP and 2K as far as I can tell. Everything is the same in the "backend"; registry run locations, file directory structure, ect. They may do it for a better UI for the user, but where we're concerned, the "backend", it's all the same. >>




Agreed. I took Dasshubber's NT/2K script and did a find/replace for winnt and windows and it runs fine.
 
Well, if you guys want to see a WIP(work in progress), I lied about having no time; I did just do some work on an installer. Please take a look at http://home.attbi.com/~virgedx/TASeti.exe, it's the basic SETI installer I wrote. Right now, it just places the SETI client and SETI Driver in the "Program Files" area, and nothing more. I need someone to tell me how to start this thing as a service(as I can put in a reg key to start it up upon bootup, but I don't know what would happen then; I don't do SETI), and anything else they can think of, before I venture any farther.
 
Come on, anyone willing to donate their computer to science?😉 I have the installer doing pretty well; it installs the client and the driver, then proceeded to open the SETI CLI instructions on TA.com, lauch the SETI Driver, and install a key in the "Run" area of the registry(so it'll be started up again next time). Take a look at it, and see if there's anything I could add, do differently, ect.
 
Ok, I really have no time but it was bugging me so I had to sit down and do it. This is a universal script that will install the service on any M$ OS. There's still plenty of features that I want to add to it (proxy, better dual cpu support, ect), if anyone has any experience taking user input in batch files in a way other than via the command line please let me know. What I'd like to do is have it prompt you for a couple things (ie Please enter the number of cpu's, please enter your proxy server, between what hours would you like it to run). It's possible to do it through the command line but that would get very, very ugly. Also, anyone think it's worth the time to support more than 2 cpu's?

Here goes:

This is the install.bat:
Removed cause it was so damn long, see updated below

Many thanks to Dasshrubber for providing the foundation for this (gotta give credit where credit is due). I basically took his scripts, fixed a few things, added a couple if statements and packaged it together as one.

 
Everything above can be d/led from here.

Please try this on a few machines and report back what OS's are successful/failures. Thanks. Dual cpu machines run as 'install.bat 2'

 
Ok, I have a "finished" version up if you guys would be nice enough to test it. It doesn't do services(I'll take a look at the services script, and try to add it to the installer when I get a chance); but it does do everything else.
 
Ok, after this I'm done for the night...I'm starting to become obsessive about it and that means bad things. Here's an updated version that prompts you for proxy and number of cpu's.

Comparing what I have with the original message from Shuxclams:

1) Graphical install - obviously not possible via batch file
2) Option to install on network or single PC - need to integrate with script we did for IndyJaws. Incidentally, found rcmd.exe file in NT4 RK that allows you to remotely execute commands on a PC. Need to research more.
3) Abilty to schedule runtimes - Possible to add user prompts to create AT job. Not high on my priority list now, but easily implemented.
4) Option to choose TeAm or personal proxies - Done. Let's you specify IP/Hostname of whatever proxy you desire.
5) For the program to install as a service on Win9x/ME - WinNT/2K/XP - Done.
6) Option to install logging program (SETIdriver - SETILog) - No experience with either of these. Combine SETIQ with what we have here and it answers all my statistical/reporting needs. Not sure what these others offer.
7) If its a network install, a program installed to control the clients. - Whew. This will be tough. Won't even consider that tonight.
8) Link to Join Anandtech - Done.

Here's the goods, zip file has been updated for d/l:

echo off
rem Replace all instances of c:\ with X:\ if installing to another drive
rem Replace here and in the appropriate .reg files

echo Please press enter, F6, and enter again to submit all responses.
echo Yes, I know it's stupid, but blame it on Microsoft. 😉
echo
echo Please enter your proxy server (leave blank for none):
FOR /F "tokens=*" %%A IN ('more') DO SET PROXY=%%A
ECHO Your proxy is %PROXY%




if %OS% == Windows_NT goto :NT

:9x
set stidir=C:\%windir%\seti\
copy *.ocx c:\%windir%\system\
copy *.pif c:\%windir%\system\
copy w9xsrv.exe %stidir%\*.exe
copy sah0.exe %stidir%\seti.exe
copy *.sah %stidir%\
rem Attrib +h %stidir%
rem Left this in for those will want to make hidden, personally I don't.
rem Just remove the "rem" from the above line.

if not proxy == "" goto :9xproxy
else goto :9xregedit

:9xproxy
copy SAH_9x.reg SAH_9x.tmp
echo REGEDIT4 > sah_9x.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices] >> sah_9x.reg
echo "Seti"="C:\\Windows\\Seti\\W9xSRV.EXE -b -f \"C:\\Windows\\Seti\\Seti.exe -proxy %proxy%\"" >> sah_9x.reg

:9xregedit
regedit /s sti-bk.reg
if exist SAH_9x.tmp copy SAH_9x.tmp SAH_9x.reg

:vb
VBRun60sp4.exe /Q

goto :finish

echo A reboot is necessary to start the process.
echo Check the state.sah file to ensure SETI is running properly.

rem **************************************************************
rem Begin NT
rem **************************************************************

:NT
mkdir C:\%windir%\System32\SAH0
rem C:\%windir%\System32\Attrib +h C:\%windir%\System32\SAH0
copy instsrv.exe C:\%windir%\System32\instsrv.exe
copy srvany.exe C:\%windir%\System32\srvany.exe
copy SAH0.exe C:\%windir%\System32\SAH0\SAH0.exe
copy user_info.sah C:\%windir%\System32\SAH0\user_info.sah
C:\%windir%\System32\instsrv SAH0 C:\%windir%\System32\srvany.exe


if not proxy == "" goto :NTproxy
else goto :CheckCPU

:NTproxy
copy SAH_NT.reg SAH_NT.tmp
echo REGEDIT4 > sah_NT.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH0] >> sah_NT.reg
echo "Type"=dword:00000010 >> sah_NT.reg
echo "Start"=dword:00000002
echo "ErrorControl"=dword:00000001 >> sah_NT.reg
echo "ImagePath"=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,\ >> sah_NT.reg
echo 32,5c,53,52,56,41,4e,59,2e,45,58,45,00 >> sah_NT.reg
echo "DisplayName"="SAH0" >> sah_NT.reg
echo "ObjectName"="LocalSystem" >> sah_NT.reg
echo >> sah_NT.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH0\Parameters] >> sah_NT.reg
echo "AppDirectory"="C:\\%windir%\\System32\\SAH0\\" >> sah_NT.reg
echo "Application"="C:\\%windir%\\System32\\SAH0\\SAH0.EXE" >> sah_NT.reg
echo "AppParameters"="proxy %proxy%" >> sah_NT.reg

:CheckCPU
set CPU=1
echo If you have more than one processor, please enter number here (leave blank for single cpu):
FOR /F "tokens=*" %%A IN ('more') DO SET CPU=%%A
ECHO You said you have "%CPU%" CPU's.


:NTregedit
regedit /s sah_NT.reg
if exist SAH_NT.tmp copy SAH_NT.tmp SAH_NT.reg
net start SAH0

if CPU == 2 goto :2CPU
goto :finish


:2CPU
mkdir C:\%windir%\System32\SAH1
rem C:\%windir%\System32\Attrib +h C:\%windir%\System32\SAH1
copy SAH0.exe C:\%windir%\System32\SAH1\SAH1.exe
copy user_info.sah C:\%windir%\System32\SAH1\
C:\%windir%\System32\instsrv SAH1 C:\%windir%\System32\srvany.exe

copy sah_NT1.reg SAH_NT1.tmp
echo REGEDIT4 > SAH_NT1.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH1] >> sah_NT1.reg
echo "Type"=dword:00000010 >> sah_NT1.reg
echo "Start"=dword:00000002
echo "ErrorControl"=dword:00000001 >> sah_NT1.reg
echo "ImagePath"=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,\ >> sah_NT1.reg
echo 32,5c,53,52,56,41,4e,59,2e,45,58,45,00 >> sah_NT1.reg
echo "DisplayName"="SAH0" >> sah_NT1.reg
echo "ObjectName"="LocalSystem" >> sah_NT1.reg
echo >> sah_NT1.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH1\Parameters] >> sah_NT1.reg
echo "AppDirectory"="C:\\%windir%\\System32\\SAH1\\" >> sah_NT1.reg
echo "Application"="C:\\%windir%\\System32\\SAH1\\SAH1.EXE" >> sah_NT1.reg
echo "AppParameters"="proxy %proxy%" >> sah_NT1.reg

regedit /s sah_NT1.reg
if exist sah_NT1.tmp copy sah_NT1.tmp sah_NT1.reg
net start SAH1
goto :finish



:finish
echo Please take a moment to join Team Anandtech if you haven't already.
echo Your support is greatly appreciated!
start http://setiathome.ssl.berkeley.edu/stats/team/team_3646.html
pause



 


<< 2) Option to install on network or single PC - need to integrate with script we did for IndyJaws. Incidentally, found rcmd.exe file in NT4 RK that allows you to remotely execute commands on a PC. Need to research more. >>



the LAN Install comes with SC.EXE and REGINI.EXE which will control the regedit functions and uses the settings from a predefined *.txt file, SC is a "service controller" giving the ability to start and stop services remotely form the administrating PC. There is a small shell program that has INSTALL, REMOVE, START, STOP, STATUS modifires included.

I believe I found worked out the bugs in the LAN Install so that it will work, please download and experiment. LINK





<< rem Attrib +h %stidir%
rem Left this in for those will want to make hidden, personally I don't.
>>



How about adding

echo Do you want to make hidden (Y/N):
for /F "tokens=*" %%A IN ('more') DO SET HIDDEN=%%A
echo You said %HIDDEN% to Hidden

if==Y goto :hidden
if==N goto 😱SCheck

:HIDDEN
Attrib +h %stidir%
goto 😱SCheck

😱SCheck
if %OS%=="Windows_NT" goto :NT

that sounds like it should be somewhere else or that it can be prompted after "mkdir".





SHUX
 


<< :9x
set stidir=C:\%windir%\seti\
copy *.ocx c:\%windir%\system\
copy *.pif c:\%windir%\system\
copy w9xsrv.exe %stidir%\*.exe
copy sah0.exe %stidir%\seti.exe
copy *.sah %stidir%\
rem Attrib +h %stidir%
rem Left this in for those will want to make hidden, personally I don't.
rem Just remove the "rem" from the above line.
>>



Shouldnt there be a mkdir in there?
:9x
set stidir=C:\%windir%\seti\
mkdir %stidir%
copy *.ocx c:\%windir%\system\
copy *.pif c:\%windir%\system\
copy w9xsrv.exe %stidir%\*.exe
copy sah0.exe %stidir%\seti.exe
copy *.sah %stidir%\
rem Attrib +h %stidir%
rem Left this in for those will want to make hidden, personally I don't.
rem Just remove the "rem" from the above line.



I dont have a Win9X machine here anymore (woohoo!) So I can't try it out. 😛







SHUX
 
Soul, thanks for everything.🙂 One quick question though; what exactly is needed out of all of that just to make SETI a service? I should be able to pull off all of that in NSIS, but I'm having a hard time differentiating between configuration pieces, and pieces that just make it a service.
 
Hmmm...I am piecing some of this together and trying to apply it all to VB to make a GUI. The problem with me making a GUI is I can't make GUIs...I am retarded and have no right brain. Here is where I stand so far...remember also, I don't know much about seti, so I may be leaving something out. There is no options for OS or # of CPUs because the program detects those for itself.

GUI

Bot
 
That looks damn good so far bot! I assume that when clicked on the buttons take you to some type of configuration page for each option. I have a question about the Multiple CPU action, does it create multiple instances of the Seti service and what are they named? Another question, any chance of converting the LAN Install into a GUI, as far as the Administrative control is concerned?









SHUX
 
The LAN install will be the last thing I work on, because I think it will be the hardest. Hopefully by the time I get that far I will have a better grasp on the finer points of configuring Seti 😀

Bot
 
ViRGE
For win9X and NT? Well there would be that whole script he has there plus, if I counted right, 9 files. The main installer is the file you see, the other files are called in the install.










SHUX
 
Can some XP people run this and tell me what it says? FYI:You'll need the VB runtime if you dont already have it.

FindOS

It's only 3.5k and just pops up a box and gives info on what OS your have.

Thanks
Bot
 
I will be reloading (fresh load) my bro's system with WinXP Pro. If you'd like I can test out any of these installers on it. Please PM me and let me know.

Big thanks to all the members working on this project!!! 😀
 


<< Can some XP people run this and tell me what it says? FYI:You'll need the VB runtime if you dont already have it.

FindOS

It's only 3.5k and just pops up a box and gives info on what OS your have.

Thanks
Bot
>>



XP reports "Windows NT 5.1 (Build 2600)"
 
This should be the minimum needed, a batch/cmd file named whatever with this in it:


mkdir C:\%windir%\System32\SAH0
rem C:\%windir%\System32\Attrib +h C:\%windir%\System32\SAH0
copy instsrv.exe C:\%windir%\System32\instsrv.exe
copy srvany.exe C:\%windir%\System32\srvany.exe
copy SAH0.exe C:\%windir%\System32\SAH0\SAH0.exe
copy user_info.sah C:\%windir%\System32\SAH0\user_info.sah
C:\%windir%\System32\instsrv SAH0 C:\%windir%\System32\srvany.exe
regedit /s sah_NT.reg
net start SAH0

and sah_NT.reg which contains:

REGEDIT4

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH0]
"Type"=dword:00000010
"Start"=dword:00000002
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,53,79,73,74,65,6d,33,\
32,5c,53,52,56,41,4e,59,2e,45,58,45,00
"DisplayName"="SAH0"
"ObjectName"="LocalSystem"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SAH0\Parameters]
"AppDirectory"="C:\\%windir%\\System32\\SAH0\\"
"Application"="C:\\%windir%\\System32\\SAH0\\SAH0.EXE"
"AppParameters"=""

Of course you would need the files that are copied over in the script as well.
 
Back
Top