View Full Version : creating own 'borger' disk and got questions
pik4chu
07-09-03, 06:37 PM
you might have seen my various posts of batch scripts and fixes for getting a true 'one-click' install going, its going "ok" I have a few problems though, mainly with XP. When I run my batch script, which copies files, creates the service, then tries to start it. (will post it later, currently offsite). It gives a message that I need to choose which user to run it as in the Control Panel>PErformance and Maintenance>Services tool. and therefore wont start, is there a way to automate this? like a "Run As" type switch for creating services or anything like that someone knows of? also, when I have the batch file import the various needed reg settings (the -forceasm switch, and other app parameters) it doesnt import them all. what gives? puts 1 in there but not the rest. is there something about how XP merges reg keys? like each one must be seperate like:
KEY
$Value
KEY
$Value
rather than:
KEY
$Value
$Value
or should it not matter?
Also, as a second part, does anyone know of command line based remote "Administration" for 2k and XP? like the ability to start the service remotely, as to avoid having to be sitting at the machine itself? (with having the admin/pass of course) in windows help I saw 'rexec' command, but it says it has to be running on the target computer for it to work. I tried it and it only partially worked. so anyone know more about this? or more like it?
My end goal is to do this
1. sit down at some computer and put in floppy (or CD)
2. run setup batch/exe
3. have all necesary files be copied to a set range of computers (via IP)
4. have the service started and registry edited to complete remote service creation.
5. (if problems mentoined above cant be solved) reboot the machines remotely to have the service automatically start.
6. walk away with a few dozen machines borged and folding in less than a few minutes.
last effort for 5 would be create a quick batch opied to each machine which will safely reboot the computers with a short command. if remote reboot is not easily achieved.
(yes I have admin rights, yes I have permission, yes I know the IP of all the target computers, yes, yes, yes. :)
Any thoughts are much appreciated
Have you thought about using srvany.exe? It's what my One-Click (and a reboot) uses as does the ServiceInstall from the Aussies.
With srvany.exe, it will open any program in the same directory as a service (as per the instructions in the service section of the registry).
Wedo
pik4chu
07-09-03, 07:33 PM
I have it included as well. however if you notice our registry edits. (mine, yours, and a few others) they have this:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Folding\parameters]
"Application"="C:\Folding\FAH3Console.exe"
"AppDirectory"="C:\Folding"
"AppParameters"="-forceasm -advmethods -local"
and when I use the batch to merge to the registry in XP.. all that gets added is the bold text. is it because XP doesnt need the rest? is it a bug? cause when I put it in manualy its ok.. just want to be sure.
The thing about "Run As" is because i you notice in the reg with every service that runs during windows startup (level 3 and up) has a "/Secuirty" key with it. in XP it wont create it automatically unless I go into services.msc and select a user to associate with the service, whether local system or other. I need a way to automate that via script or command line since Im going for true, massive, one-click install
Originally posted by pik4chu
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Folding\parameters]
"Application"="C:\Folding\FAH3Console.exe"
"AppDirectory"="C:\Folding"
"AppParameters"="-forceasm -advmethods -local"
You need to ditch the "-local" (unless you are installing it on a dually) and add "-service". Also, make sure you create the directory C:\Folding\ or what ever BEFORE you install the service registry entries.
Wedo
pik4chu
07-09-03, 08:01 PM
Originally posted by Wedo
You need to ditch the "-local" (unless you are installing it on a dually) and add "-service". Also, make sure you create the directory C:\Folding\ or what ever BEFORE you install the service registry entries.
Wedo
was an old reg file... proper files are as follows.
serv.reg
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Fold\parameters]
"Application"="C:\folding\FAH3Console.exe"
"AppDirectory"="C:\folding"
"AppParameters"="-forceasm -advmethods -service"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Fold]
"Description"="Finding the Cure"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\Fold]
"Type"=dword:00000010
"Start"=dword:00000003
setup.bat
@echo off
echo Creating Directory and Copying Needed Files...
md C:\folding >>A:\log.txt
copy "a:\servedit.reg" "C:\folding\" >>A:\log.txt
echo .
copy "A:\fix.reg" "C:\folding\" >>A:\log.txt
copy "a:\instsrv.exe" "C:\folding\" >>A:\log.txt
echo .
copy "a:\srvany.exe" "C:\folding\" >>A:\log.txt
copy "a:\FAH3Console.exe" "C:\folding\" >>A:\log.txt
echo .
copy "a:\client.cfg" "C:\folding\" >>A:\log.txt
echo Creating Service....
"C:\folding\instsrv.exe" fold "C:\folding\srvany.exe" >>A:\log.txt
regedit.exe /s "C:\folding\servedit.reg" >>A:\log.txt
net start fold >>A:\log.txt
regedit.exe /s "C:\folding\fix.reg" >>A:\log.txt
echo Removing Temporary Files...
del c:\servedit.reg >>A:\log.txt
del C:\fix.reg >>A:\log.txt
echo Thanks for Helping!! =)
madman_sam81
07-09-03, 11:19 PM
Have any of you thought of using a code like that of Firedaemon, with some modifications?
I am very new to all this, so forgive if I sound stupid, or anything like that, but it just seems like that program does half of what you guys are trying to accomplish.
...and it does the half that your are having trouble with...
so is anyone ganna encorporate this into one click or something like that
pik4chu
07-10-03, 01:34 PM
Originally posted by madman_sam81
Have any of you thought of using a code like that of Firedaemon, with some modifications?
I am very new to all this, so forgive if I sound stupid, or anything like that, but it just seems like that program does half of what you guys are trying to accomplish.
...and it does the half that your are having trouble with...
be more specific? like website? links? etc? and the code does the half that there are no problems with... there is no code for the problem yet (see other question in thread)_ :D
so is anyone ganna encorporate this into one click or something like that
I do not intend to.. since it was my own creation and Wedo created the One Click. though Wedo is welcome to incorporate it once I work out the bugs.
I created the batch file more in response to the thread called "Most efficient way to 'borg' Ever!" for creating a true one-click rather than "click and reboot" and am now incorporating other things into it.
bubba gump
07-15-03, 06:19 PM
Hmm...I'm new to the batch files so what exactly does >> do?? Like int he first line, I know it makes the directory C:\FAH\ , and then does the >> mean like make the log.txt in the same directory or something??
Thanks!
Fold and Frag on
Brian
pik4chu
07-17-03, 11:33 AM
Originally posted by bubba gump
Hmm...I'm new to the batch files so what exactly does >> do?? Like int he first line, I know it makes the directory C:\FAH\ , and then does the >> mean like make the log.txt in the same directory or something??
Thanks!
Fold and Frag on
Brian
what it does it exports the output of each command to a file labeled log.txt on the a: drive. the reason for this is when you run a batch command in NT 4 and newer, the command window closes after the processhas finished, and you cant see if there were any errors, this allows you to view hte output of the setup process later, without much trouble.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.