Jump to content

edg21

Member
  • Posts

    196
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by edg21

  1. 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.

  2. I didnt invlude devcon, cuz devcon doesnt even work for my pc...it finds both ati and nvidia, and actually, it doesnt even find my video card...its an all-in-wonder...and in devcon, it doesnt have ati in the name...so I dont know how useful devcon is gonna be in anyones case...

    I've only tested the devcon method on about 12 pcs... they all worked fine, but I dont doubt that it doesn't work on others. Nice work btw, once you're finished I will put it all together @ the top of the post. I'm currently trying to merge this script & another script I used to install XP from inside winPE & a method for WEB d/l would be great. I will go ahead and remove the devcon section for now until someone can tell me a reliable way to test for this.

  3. also, i really like this script...but I also wanna have the option of downloading from web, so, if you give me permission, im changing your ftp script to be used for web...so far Ive got it almost done, just need to set up the script WEB_SCR (im not very imaginative lol) for use with wget...other than that, I think ive got it down.

    I've been thinking about doing the same thing, you can probably add this with minor editing, I will edit the entire post to include this option. If you want to edit it feel free, just be sure to post what you come up with :) I just whipped this up after reading your post, so no guarantees :P

    :WEB_GET
    rem set variables for url lists
    set WEB_TOOL=http://bender/unattend/tools/url_list.txt
    set WEB_APP=http://bender/unattend/apps/url_list.txt
    set WEB_UPD=http://bender/unattend/updates/url_list.txt
    set WEB_DRV=http://bender/unattend/drivers/url_list.txt
    set WEB_MOD=http://bender/unattend/mod/url_list.txt

    rem downloading url lists
    wget -P%TOOL_DIR% %WEB_TOOL%
    wget -P%APP_DIR% %WEB_APP%
    wget -P%UPD_DIR% %WEB_UPD%
    wget -P%DRV_DIR% %WEB_DRV%
    wget -P%MOD_DIR% %WEB_MOD%

    rem downoading packages from url lists
    wget -P%TOOL_DIR% -i%TOOL_DIR%\url_list.txt
    wget -P%APP_DIR% -i%APP_DIR%\url_list.txt
    wget -P%APP_DIR% -i%UPD_DIR%\url_list.txt
    wget -P%APP_DIR% -i%DRV_DIR%\url_list.txt
    wget -P%APP_DIR% -i%MOD_DIR%\url_list.txt

  4. Yeah, I could probably use commands, but it makes it so much easier to maintain and update if it is all contained in one batch.  I played with RunOnce and the RunOnce creator tool, but it requires additional batches to run my cleanups.  One batch file, plain and simple, is my preferred method.  This way, I don't have to justify adding a third video card and monitor on my development box just so that I can view all the open windows :)  Thanks to everyone for the input and suggestions.

    I don't understand how having one big huge batch file is easier than a small one & then commands.txt in each app folder....

  5. I bypassed the ftp test by pointing it at the ftp_start command early on and it works ok until it tries to unrar the packages and then it just wasn't doing anything so I changed %PACK_EXT% to rar and it unpacks the files and makes the script ok. I of course took out the part where it would install for now.

    Sorry bout that, I posted my "in progress" version that lets you use something other than unrar.exe (pkunzip.exe or whatever you want). As far as the FTP_TEST section, it seems to be working fine here, try the code again, there could've been more problems with the version I had up.

  6. This is what I use.... it reads the installation commands for all my stuff from text files & then generates an installation script.

    %APP_DIR% = c:\install\apps

    %PACK_SCR% = commands.txt

    %INSTALL_SCR% = c:\install.cmd

    for /d %%i in (%APP_DIR%\*.*) do type "%%i\%PACK_SCR%" >> %INSTALL_SCR%

    Just put a commands.txt in the same directory as your setup files & edit it to contain the silent installation commands. (NOTE: the first line of commands.txt must be empty.)

    Example commands.txt:

    ECHO.
    ECHO Installing Winrar v3.30 ...
    start /wait %APP_DIR%\winrar330\winrar330.exe /s
    REGEDIT /S %APP_DIR%\winrar330\cascade.reg

  7. Unattended Installation using FTP - Last Update: 9/20/04

    This script can be used for post installation of applications, udpates, drivers, & just about anything you want. You can run this @ GUIRUNONCE, RUNONCEEX, whenever you choose. What this does is download "packages" from the specified FTP server & then builds the installation script for those packages. The advantage of doing it this way is that you don't have to reburn your installation cd everytime you want to add/update something. All you will have to do is make/edit a package & put it on the ftp server. You could even put this on a bootable floppy/cd & have it do a complete unattended setup with minor editing. I tried to give this post more detailed instructions on usage, let me know if this is enough. I might just put up a page on my site, but I'm not sure if enough people are interested or not.

    Changes:

    • 9/20/04 - Script now obtains its variables from an INI file. NOTE: Now the script is called like: ftp.cmd [path to ini]
    • 9/20/04 - Fixed a missing BYE command in the ftp login test.
    • 9/12/04 - Fixed missing bin & prom commands while downloading required EXEs.
    • 9/10/04 - Removed the DEVCON.EXE section for now.
    • 9/10/04 - Now downloads any required EXEs before anything else.
    • 9/10/04 - Fixed some typos, must be the lack of sleep.
    • 9/06/04 - Added more variables to give better control over the whole process.
    • 9/06/04 - Changed the way the FTP script is generated.
    • 9/05/04 - Added /I swith to the IF Y/N commands so it's no longer case sensitive *greenmachine
    • 9/04/04 - Added definitions for all the variables, will hopefully make editing the script for your own use easier.
    • 9/02/04 - Now tests the FTP server un/pw specified in the batch, if it's incorrect it will prompt user for input.
    • 8/29/04 - Detects ATI or NVIDIA video card & downloads appropriate package.
    • 8/29/04 - Added DRIVERS folder for device drivers
    • 8/29/04 - Added MODS folder for modified files (uxtheme.dll etc.)
    • 8/28/04 - Packages structure is easier to manage, just put commands.txt in the folder & rar it up.
    • 8/28/04 - Now tests for existance of FTP server.
    • 8/28/04 - All necessary tools are downloaded (NO EXTRA FILES REQUIRED ON YOUR INSTALL CD)

    Requirments:

    • Network Access (Use the LANPack to make sure)
    • FTP Server to serve up packages.
    • UNRAR.EXE

    What it Does:

    1. Checks for existance of ftp server.
    2. Checks username/password on server & prompts for user input if it can't login.
    3. Downloads "packages" via ftp.exe
    4. Extracts the packages
    5. Creates an installation script for the packages (based off commands.txt)
    6. Applies registry tweaks
    7. Installs packages

    Creating Packages:

    To dowload & install applications, updates, etc.. you will need to make each of them into individual "packages".

    Making packages is a pretty straightforward process. The video drivers are the only exception to the rule really, you need to set the name of these packages in the variables later on.

    1. Create folder named after your application.
    2. Put setup.exe for your application into the folder
    3. Create a text file named commands.txt in the folder
    4. Edit commands.txt & put in your applications silent install commands.
    5. Compress the folder using winRAR to a file with the same name.

    Example Package: DOWNLOAD

    COMMANDS.TXT EXAMPLE: (Note: The first line of the commands.txt file needs to be blank.) example

    ECHO.
    ECHO Installing Winrar v3.30 ...
    start /wait %APP_DIR%\winrar330\setup.exe /s
    REGEDIT /S %APP_DIR%\winrar330\cascade.reg

    FTP Server Setup:

    Create the following directory structure on your ftp server:

    • /unattend
    • /unattend/apps
    • /unattend/mods
    • /unattend/updates
    • /unattend/drivers
    • /unattend/tweaks
    • /unattend/tools

    Copy your packages to their perspective folders & put your .reg files in the /tweaks folder. (Note: I have my reg tweaks in seperate files (enable_rdp.reg, disable_error_report.reg, etc.)

    /unattend/tools Needs to contain devcon.exe & unrar.exe

    Editing The INI File:

    You will need to edit some of the variables in FTP_VAR.INI to fit your setup. If you follow my setup you should really only have to edit FTP_ADDY, FTP_USER, FTP_PASS, & TOP_DIR. There is a full list of the variables & their functions listed below, as you can see you can change just about everything, from temp files it creates to the name of the installation script it generates.

    FTP_VAR.INI Variable Settings:

    • FTP_ADDY = 192.168.1.25 (ip of your ftp server)
    • FTP_USER = username (ftp username)
    • FTP_PASS = password (ftp password)
    • FTP_CANC = undefined (part of ftp server testing **DO NOT EDIT**)
    • PAK_DIR = unattend (base folder for packages on ftp server)
    • TOP_DIR = %SYSTEMDRIVE%\install (Local download directory)
    • FTP_SCR = c:\install\ftp_scr.txt (generated ftp script)
    • FTP_TSCR = c:\install\ftp_tscr.txt (generated ftp testing script)
    • FTP_OUT = c:\install\ftp_out.txt (generated ftp testing output)
    • INSTALL_SCR = c:\install\install.cmd (generated package installation script)
    • PACK_SCR = commands.txt (filename containing package install commands)
    • TOOL_SCR = generated ftp script to download tools
    • TOOL_DIR = c:\windows\system32 (location commandline tools will be downloaded to)
    • APP_DIR = c:\install\apps (Local directory for apps)
    • UPD_DIR = c:\install\updates (local directory for updates/patches)
    • TWK_DIR = c:\install\tweaks (local directory for .reg tweaks)
    • MOD_DIR = c:\install\mods (local directory for modded files)
    • DRV_DIR = c:\install\drivers (local directory for drivers)

    FTP_VAR.INI

    # Format: VariableName=VariableValue
    # Do not use spaces around the equal sign.
    FTP_ADDY=192.168.1.25
    FTP_USER=test
    FTP_PASS=test
    FTP_CANC=undefined
    PAK_DIR=unattend
    TOP_DIR=c:\install
    FTP_SCR=c:\install\ftp_scr.txt
    FTP_TSCR=c:\install\ftp_tscr.txt
    FTP_OUT=c:\install\ftp_out.txt
    INSTALL_SCR=c:\install\install.cmd
    PACK_SCR=commands.txt
    TOOL_SCR=c:\install\tool_scr.txt
    TOOL_DIR=c:\windows\system32
    APP_DIR=c:\install\apps
    UPD_DIR=c:\install\updates
    TWK_DIR=c:\install\tweaks
    MOD_DIR=c:\install\mods
    DRV_DIR=c:\install\drivers

    FTP.CMD

    @ECHO OFF
    SET SCR_VER=PACK_GET.CMD v1.0

    if .%1.==.. goto usage
    set INI_FILE=%1
    set INI_FILE=%INI_FILE:"=%
    if not exist "%INI_FILE%" goto missing_ini

    ECHO.
    ECHO Setting variables defined in %INI_FILE% ...
    for /f "eol=# tokens=1* delims==" %%a in ('type %INI_FILE%') do set %%a=%%b

    :: CREATING DIRECTORIES FOR PACKAGES
    ECHO.
    ECHO Creating directories ...
    md %TOP_DIR%
    md %APP_DIR%
    md %UPD_DIR%
    md %TWK_DIR%
    md %DRV_DIR%
    md %MOD_DIR%

    ::BEGIN FTP SERVER TESTING
    :FTP_EXIST
    ECHO ping ftp ...
    PING %FTP_ADDY% ¦ FIND "TTL" >NUL
    IF ERRORLEVEL 0 GOTO FTP_TEST
    IF ERRORLEVEL 1 GOTO FTP_INPUT

    :FTP_TEST
    ECHO. ftp exists ... testing login ...
    > %FTP_TSCR% ECHO open %FTP_ADDY%
    >>%FTP_TSCR% ECHO %FTP_USER%
    >>%FTP_TSCR% ECHO %FTP_PASS%
    >>%FTP_TSCR% ECHO bye
    %WINDIR%\system32\ftp.exe -s:%FTP_TSCR% > %FTP_OUT%
    FIND "User logged in" %FTP_OUT% >NUL
    IF ERRORLEVEL 1 GOTO FTP_CHOICE
    GOTO FTP_START

    :FTP_CHOICE
    ECHO.
    SET /P FTP_CANC=[Cancel FTP download? Y/N:]
    IF /I "%FTP_CANC%" == "Y" goto CANCEL
    IF /I "%FTP_CANC%" == "N" goto FTP_INPUT
    GOTO FTP_CHOICE

    :FTP_INPUT
    if exist %FTP_OUT% del %FTP_OUT%
    if exist %FTP_TSCR% del %FTP_TSCR%
    SET /P FTP_ADDY=[FTP Address:]
    SET /P FTP_USER=[FTP Username:]
    SET /P FTP_PASS=[FTP Password:]
    SET /P PAK_DIR=[Base Package Directory:]
    ECHO.
    ECHO You specified:
    ECHO FTP Address: %FTP_ADDY%
    ECHO FTP Username: %FTP_USER%
    ECHO FTP Password: %FTP_PASS%
    ECHO FTP Package Directory: %PAK_DIR%
    :FTP_CONFIRM
    ECHO.
    SET /P FTP_CONF=[Is this correct? Y/N:]
    IF /I "%FTP_CONF%" == "Y" GOTO FTP_EXIST
    IF /I "%FTP_CONF%" == "N" GOTO FTP_INPUT
    GOTO FTP_CONFIRM
    ::END FTP SERVER TESTING

    ::BEGIN BUILDING FTP SCRIPT
    :FTP_START
    del %FTP_OUT%
    del %FTP_TSCR%
    ECHO Getting Required files ...

    > %TOOL_SCR% ECHO open %FTP_ADDY%
    >>%TOOL_SCR% ECHO %FTP_USER%
    >>%TOOL_SCR% ECHO %FTP_PASS%
    >>%TOOL_SCR% ECHO bin
    >>%TOOL_SCR% ECHO prom
    >>%TOOL_SCR% ECHO lcd %TOOL_DIR%
    >>%TOOL_SCR% ECHO cd unattend
    >>%TOOL_SCR% ECHO cd tools
    >>%TOOL_SCR% ECHO mget *.*
    >>%TOOL_SCR% ECHO bye
    %WINDIR%\system32\ftp.exe -s:%TOOL_SCR%
    del %TOOL_SCR%

    ECHO Building FTP Script ...
    > %FTP_SCR% ECHO open %FTP_ADDY%
    >>%FTP_SCR% ECHO %FTP_USER%
    >>%FTP_SCR% ECHO %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_DONE
    >>%FTP_SCR% ECHO bye
    ::END BUILDING FTP SCRIPT

    ECHO.
    ECHO Downloading per FTP_CMD.TXT ....
    %WINDIR%\system32\ftp.exe -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 %%i

    ECHO.
    ECHO Applying various registry tweaks ...
    for %%i in (%TWK_DIR%\*.reg) do REGEDIT /S %%i
    for %%i in (%TWK_DIR%\*.reg) do DEL %%i

    ECHO.
    ECHO Building installation script ...
    for /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%

    call %INSTALL_SCR%
    GOTO CLEANUP

    :CANCEL
    ECHO Package installation was canceled.
    GOTO CLEANUP

    :MISSING_INI
    ECHO %SCR_VER% - ERROR!
    ECHO The specified INI does not exist.
    GOTO END

    :USAGE
    ECHO %SCR_VER% - ERROR!
    ECHO You must specify the location of the INI file containing variables.
    ECHO.
    ECHO Syntax:
    ECHO ftp_ini.cmd [path to ini file]
    ECHO.
    ECHO Usage:
    ECHO ftp_ini.cmd z:\config\ftp_var.ini
    ECHO.
    GOTO END

    :CLEANUP
    ECHO.
    ECHO Cleaning up ...
    rd /s /q %TOP_DIR%
    SHUTDOWN -r -t 10
    :END

  8. I'm writing to say thanks and that I think you have one little typo. Down where you are writing the ftp_cmd.txt you change to the tools directory and then the next set of commands down you try to connect directly to the apps directory. I was looking down through the commands and seeing how they worked and I got there and thought how the heck does that work? How is he switching directly from the tools directory to the apps directory. Then I looked down and saw the ../ part on the rest of them.

    thanks again this is awesome

    typo fixed :)

  9. If you wanted to change my unattended FTP install, you could do everything from a bootable floppy with ftp.exe on it. All you would need is an FTP server & the client you want to install to. Check the links in my signature. Since this is a good idea I will be creating a boot disk to do it, I'll add it to my unattended FTP post when I finish it.

    Bootdisk can be found here:

    http://www.nu2.nu/bootdisk/network/

  10. I want to add the CHOICE command to my unattended install so it reads like this

    ;CHOICE /C:YN /T:Y,60 Voulez-vous installer les logiciels de base
    ;if errorlevel 2 goto cleanup
    ;if errorlevel 1 goto apps
    ;goto apps

    Now it works in a real windows sp2 environment but when run during unattended installation, it does not install the apps.  I tried getting around that adding the goto apps at the end in case he gets an errorlevel other than 1 or 2 but that did not make it.  Anyone got a solution?  And don't tell me to remove the ";", I added them to continue to test my installation cd... ;)

    thanks in advance

    Where on your cd is choice.com? Put it in $OEM$\$$\SYSTEM32, rebuild your ISO & try again.

  11. What I am trying to do is just take my 'install.bat' file and run it from a fresh OS install across the network. Say, for instance, one of my customers buys a new Dell with the OS already on it. I just want to install the apps that they need, instead of starting completely over. So far, some apps install, and some don't. I think that it might be a Windows File Protection problem, but I am not sure. I tried installing the apps one at a time. I also tried instlalling them after disabling WFP. If anyone has had experience doing this, I would appreciate any advice.

    Thank you,

    GnarlyC

    You can edit my unattended FTP script to do exactly what you're asking.

    http://www.msfn.org/board/index.php?showtopic=25929&hl=

  12. huh???

    if u put the drivers of your nvidia and ati in your drivers folder

    and specify the location in winnt.sif

    it automatically loads the correct driver. i hv been doing this for a long time

    The reason I would like to do it this way, is to use it during my FTP install, see the links in my sig for more info. I don't want to have to re-burn my cd. So being able to determine post-install & then install from my ftp works great.

×
×
  • Create New...