edg21 Posted September 11, 2004 Author Posted September 11, 2004 well, this is where i need your help or whoevers...as far as I can see, its now done...I did have to make some changes after posting, but to me, it looks complete...but, I dont know about the cleanup...and also, dont really know if it all flows (ie, if it will work, it should in theory...)...as for the cleanup, there might be some strangling url files somewhere...like in system32 dir...but other than that, I think its done...give it a test, I guess...I would test it, but I dont have a web server up yet....Also, another thing, if using runonceex, most people are gonna have $OEM$...so why not dump devcon and unrar in the system32 folder in there...$$\system32?I'm going to edit yours a bit to include defaults & error checking, but its looking good As far as using $OEM$ folders, I used those on my old installations but I'm just booting from winPE & then installing nowadays and I can add whatever I need from there. Currently my winPE install CD obtains it's configuration files & needed EXEs from an ftp server, partitions per config file, formats per config file, and starts a silent installation of winXP pro, & then runs ftp.cmd @ GUIRUNONCE.
splifs Posted September 12, 2004 Posted September 12, 2004 hopefully someone can help me out here...the ftp starts up but once it gets to the tools it craps out and I have to interact230 User logged in, proceed.ftp>ftp> lcd C:\WINDOWS\system32Local directory now C:\WINDOWS\system32.ftp>cd unattend550 /unattend: No such file or directory.ftp> cd tools250 Directory change to /toolsftp> mget *.*200 Type set to A.meget UnRAR.exe? ftp>I'm thinking i could put unrar.exe in the system32 folder in $OEM$\$$\ and then have it start right on the building of the FTP script rather than the getting required files however I just want to know why its not working Any help would be much appreciated.
edg21 Posted September 12, 2004 Author Posted September 12, 2004 550 /unattend: No such file or directory.Did you setup the ftp server directories right? Either way I missed some commands (bin & prom) use the version I just put up & it should work fine.
splifs Posted September 13, 2004 Posted September 13, 2004 unattended is my root dir which is probably why it can't find that. It does still find the tools dir though..my workaround has worked so far, i'll try the new one you posted though and see what happens.
joebells Posted September 18, 2004 Posted September 18, 2004 I used this method the other day and it worked pretty good. I'm gonna take out the prom command though so it asks me on the packages, that way I don't have to install everything I have on my ftp server onto every machine I have. It isnt' completely unattended then but its kind of like windows post installation wizard in a way.I also couldn't get logged into the ftp server for the life of me the way the script was. It accepted my username but wouldn't recognise my password at all. I had to add the -n paramater before the -s: and then on the second line of my ftp_scr I put the word user followed by my username and then password all on the same line. That lets my login fine.I liked before when my reg tweaks got installed to the default user account from cmdlines.txt so I'm thinking of maybe calling this script modified a bit to download just my reg tweaks from cmdlines.txt. I just have to find out if a batch file called from cmdlines.txt can use ftp.cmd and if network connectivity is possible at that point. I've been thinking of trying out runonceex too and if ftp works from cmdlines.txt I might go ahead and use that method. Or maybe I won't worry about it or the reg tweaks.
joebells Posted September 18, 2004 Posted September 18, 2004 well ommitting prom didnt' work in the batch file when I tested it. It just listed all the different files with question marks after them and gave me the prompt ftp>
edg21 Posted September 18, 2004 Author Posted September 18, 2004 If you don't want to install something, you can change the file extension of the package to .rar_ and it won't download it. If you use multiple cds for different pc types then you could change %PAK_DIR% to reflect different sets of packages.set PAK_DIR=unattend_chipset1set PAK_DIR=unattend_chipset2
joebells Posted September 19, 2004 Posted September 19, 2004 I just went ahead and took out all the ftp commands except for the login stuff I do it by hand now. I didn't want to make seperate directories and different cd's and such. I'm also using an idea from your wget install. On the cd I'm gonna have cmdlines.txt call setup.cmd. Setup.cmd is going to download the ftp script from the ftp server. I'm doing it that way so that if I want to change something in the script I can without burning a whole new cd.Then from cmdlines.txt I am going to call the ftp script which will pretty much be unchanged except for the cleanup part, thats not gonna happen. My packages are all going to have commands.txt still but the commands are going to be RunOnceEx commands. Your ftp script will create the installation script like normal but all its going to do when it executes it is add the entries to the registry.(I'm doing it that way so that I can control the program installation order better. As it is now I renamed the folders, like netframework became aanetframework so it would be first and symantec became zzsymantec so it would be last.)Your ftp script is still going to add the registry entries but since its running from cmdlines.txt the reg entries will apply to all users created.I haven't finished changing the commands.txt files to RunOnceEx commands yet when ever I finish I'll post my results.
edg21 Posted September 20, 2004 Author Posted September 20, 2004 I haven't finished changing the commands.txt files to RunOnceEx commands yet when ever I finish I'll post my results.Looking forward to seeing it I'm in the process of making the script use FTP or WGET to d/l the packages, I've also set it up to get it's variables from an ini file, I will post when done.
joebells Posted September 24, 2004 Posted September 24, 2004 I finished up yesterday and ran it and it worked flawlessly. Thanks for the main part of this edg21 pretty much all of it is your work I just modified it a bit. I'm going to post the contents of all the files I used if anyone has any questions post and when I see them I'll answer.cmdlines.txt[COMMANDS]"setup.cmd""ftpscript.cmd""regscript.cmd""useraccounts.cmd"setup.cmd@ECHO OFFset FTP_ADDY=1.1.1.1set FTP_USER=****set FTP_PASS=****set PAK_DIR=unattendset TOP_DIR=%SYSTEMDRIVE%\installset FTP_SCR=%TOP_DIR%\ftp_scr.txtmd %TOP_DIR%ECHO Building FTP Script ...> %FTP_SCR% ECHO open %FTP_ADDY%>>%FTP_SCR% ECHO user %FTP_USER% %FTP_PASS%>>%FTP_SCR% ECHO bin>>%FTP_SCR% ECHO prom>>%FTP_SCR% ECHO cd %PAK_DIR%>>%FTP_SCR% ECHO lcd %TOP_DIR%>>%FTP_SCR% ECHO get ftp.cmd>>%FTP_SCR% ECHO byeECHO.ECHO Downloading per FTP_CMD.TXT ....%WINDIR%\system32\ftp.exe -n -s:%FTP_SCR%del %FTP_SCR%:ENDftpscript.cmdcall %systemdrive%\install\ftp.cmdftp.cmd@ECHO OFFECHO.ECHO Setting variables ...set FTP_ADDY=1.1.1.1set FTP_USER=****set FTP_PASS=****set FTP_CANC=undefinedset PAK_DIR=unattendset TOP_DIR=%SYSTEMDRIVE%\installset FTP_SCR=%TOP_DIR%\ftp_scr.txtset FTP_TSCR=%TOP_DIR%\ftp_tscr.txtset FTP_OUT=%TOP_DIR%\ftp_out.txtset INSTALL_SCR=%TOP_DIR%\install.cmdset PACK_SCR=commands.txtset TOOL_SCR=%TOP_DIR%\tool_scr.txtset TOOL_DIR=%WINDIR%\system32set APP_DIR=%TOP_DIR%\appsset UPD_DIR=%TOP_DIR%\updatesset TWK_DIR=%TOP_DIR%\tweaksset MOD_DIR=%TOP_DIR%\modsset DRV_DIR=%TOP_DIR%\drivers:: SETTING VARIABLES FOR VIDEO DRIVERSset VID_DRV=undefinedset ATI_DRV=ati.rarset NVI_DRV=nvidia.rar:: CREATING DIRECTORIES FOR PACKAGESECHO.ECHO Creating directories ...md %APP_DIR%md %UPD_DIR%md %TWK_DIR%md %DRV_DIR%md %MOD_DIR%ECHO Building FTP Script ...> %FTP_SCR% ECHO open %FTP_ADDY%>>%FTP_SCR% ECHO user %FTP_USER% %FTP_PASS%>>%FTP_SCR% ECHO bin>>%FTP_SCR% ECHO prom>>%FTP_SCR% ECHO cd %PAK_DIR%>>%FTP_SCR% ECHO lcd %APP_DIR%>>%FTP_SCR% ECHO cd apps>>%FTP_SCR% ECHO mget *.rar>>%FTP_SCR% ECHO lcd %UPD_DIR%>>%FTP_SCR% ECHO cd ../updates>>%FTP_SCR% ECHO mget *.rar>>%FTP_SCR% ECHO lcd %TWK_DIR%>>%FTP_SCR% ECHO cd ../tweaks>>%FTP_SCR% ECHO mget *.reg>>%FTP_SCR% ECHO lcd %MOD_DIR%>>%FTP_SCR% ECHO cd ../mods>>%FTP_SCR% ECHO mget *.rar>>%FTP_SCR% ECHO lcd %DRV_DIR%>>%FTP_SCR% ECHO cd ../drivers>>%FTP_SCR% ECHO mget *.rar>>%FTP_SCR% ECHO bye::END BUILDING FTP SCRIPTECHO.ECHO Downloading per FTP_CMD.TXT ....%WINDIR%\system32\ftp.exe -n -s:%FTP_SCR%del %FTP_SCR%ECHO.ECHO Extracting Packages ...for %%i in (%APP_DIR%\*.rar) do UNRAR x %%i %APP_DIR%for %%i in (%UPD_DIR%\*.rar) do UNRAR x %%i %UPD_DIR%for %%i in (%DRV_DIR%\*.rar) do UNRAR x %%i %DRV_DIR%for %%i in (%MOD_DIR%\*.rar) do UNRAR x %%i %MOD_DIR%for %%i in (%APP_DIR%\*.rar %UPD_DIR%\*.rar %DRV_DIR%\*.rar %MOD_DIR%\*.rar) do DEL %%iECHO.ECHO Building installation script ...> %INSTALL_SCR% ECHO @Echo Off>> %INSTALL_SCR% ECHO SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx>> %INSTALL_SCR% ECHO REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx /V TITLE /D "Installing Programs" /ffor /d %%i in (%APP_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%for /d %%i in (%UPD_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%for /d %%i in (%DRV_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%for /d %%i in (%MOD_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%>> %INSTALL_SCR% ECHO REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\120 /VE /D "Registry Tweaks" /f>> %INSTALL_SCR% ECHO REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\120 /V 1 /D "REGEDIT /S %systemdrive%\install\tweaks\regtweaks.reg" /fcall %INSTALL_SCR%:ENDftpscript.cmdcall %systemdrive%\install\ftp.cmdregscript.cmdcall REGEDIT /S %systemdrive%\install\tweaks\regtweaks.regcmdlines.txt first calls setup.cmd which downloads the ftp.cmd. I do that incase I want to change something in ftp.cmd and/or a mistake was made in ftp.cmd it lets me not have to burn a new cd.cmdlines.txt then calls the ftp script when then calls ftp.cmd which downloads all the packages, and reg files, extracts them and builds my runonceex commands script. Pretty much what edg21 had.Then cmdlines.txt runs the regscript which just does the reg tweaks. I kind of messed up at this part. I thought about it when I was at work but when I got home to work on it I forgot that edg21's ftp.cmd already ran the regtweaks so I wrote in here to run the regtweaks. The first time I ran it the regtweaks got applied twice. I now have the applying registry files ommitted from the ftp.cmd. If I ever need to reburn the cd for any reason I'll probably take out the regscript part of cmdlines.txt and put it back in the ftp.cmd.It worked pretty nicely though. It lets me apply regtweaks to the default user so that all created users get the tweaks and it lets me install applications in the order that I want since RunOnceEx is numbered. Heres a sample of a commands.txt from my .net folderREG ADD %KEY%\001 /VE /D ".NET Framework v1.1" /fREG ADD %KEY%\001 /V 1 /D "%SYSTEMDRIVE%\install\apps\NetFramework\netfx.msi /qb" /fREG ADD %KEY%\001 /V 2 /D "%SYSTEMDRIVE%\install\apps\NetFramework\NDP1.1sp1-KB867460-X86.exe /Q" /fREG ADD %KEY%\001 /V 3 /D "net user aspnet /delete" /f
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now