Jump to content

Unattended FTP Install


Recommended Posts

*** UPDATED *** check new post

http://www.msfn.org/board/index.php?showtopic=26963

Here's another way to download application/update "packages" over your network using an ftp server. I prefer this method as I can just update the files on the ftp server if I ever want anything on my unattended cd to change. Saves time on burning cds. Unlike my wget post this one doesn't require any extra files other than unrar.exe in your path. Let me know if you use this, I will write a full tutorial if enough people are interested.

What it does:

1. Creates necessary directories.

2. Creates ftp_cmd.txt

3. Runs ftp.exe against ftp_cmd.txt to download packages.

4. Extracts downloaded packages.

5. Deletes compressed files & installs packages.

md %SYSTEMDRIVE%\install
md %SYSTEMDRIVE%\install\apps
md %SYSTEMDRIVE%\install\updates
md %SYSTEMDRIVE%\install\tweaks
@ECHO open 192.168.1.25 >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO username >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO password >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO bin >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO prom >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd unattend >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get apps.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get updates.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get cleanup.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\apps >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd apps >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.rar >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\updates >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd ../updates >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.rar >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\tweaks >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd ../tweaks >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.reg >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO bye >> %SYSTEMDRIVE%\install\ftp_cmd.txt
%SYSTEMDRIVE%\windows\system32\ftp.exe -s:%SYSTEMDRIVE%\install\ftp_cmd.txt
del %SYSTEMDRIVE%\install\ftp_cmd.txt
for %%i in (%systemdrive%\install\apps\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\apps
del %SYSTEMDRIVE%\install\apps\*.rar
for %%i in (%systemdrive%\install\updates\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\updates
del %SYSTEMDRIVE%\install\updates\*.rar
%SYSTEMDRIVE%\install\apps.cmd

Link to comment
Share on other sites


Here's another way to download application/update  "packages" over your network using an ftp server.  I prefer this method as I can just update the files on the ftp server if I ever want anything on my unattended cd to change. Saves time on burning cds. Unlike my wget post this one doesn't require any extra files other than unrar.exe in your path.  Let me know if you use this, I will write a full tutorial if enough people are interested.

What it does:

1. Creates necessary directories.

2. Creates ftp_cmd.txt

3. Runs ftp.exe against ftp_cmd.txt to download packages.

4. Extracts downloaded packages.

5. Deletes compressed files & installs packages.

md %SYSTEMDRIVE%\install
md %SYSTEMDRIVE%\install\apps
md %SYSTEMDRIVE%\install\updates
md %SYSTEMDRIVE%\install\tweaks
@ECHO open 192.168.1.25 >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO username >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO password >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO bin >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO prom >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd unattend >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get apps.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get updates.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO get cleanup.cmd >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\apps >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd apps >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.rar >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\updates >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd ../updates >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.rar >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO lcd %SYSTEMDRIVE%\install\tweaks >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO cd ../tweaks >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO mget *.reg >> %SYSTEMDRIVE%\install\ftp_cmd.txt
@ECHO bye >> %SYSTEMDRIVE%\install\ftp_cmd.txt
%SYSTEMDRIVE%\windows\system32\ftp.exe -s:%SYSTEMDRIVE%\install\ftp_cmd.txt
del %SYSTEMDRIVE%\install\ftp_cmd.txt
for %%i in (%systemdrive%\install\apps\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\apps
del %SYSTEMDRIVE%\install\apps\*.rar
for %%i in (%systemdrive%\install\updates\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\updates
del %SYSTEMDRIVE%\install\updates\*.rar
%SYSTEMDRIVE%\install\apps.cmd

Good idea.

FTP is one possibility.

HTTP the other one.

Put wget.exe and unzip.exe in $oem$\$$\system32 and download a zipped structure from the SUS Server (which is an IIS that allows anonymous access using http). A SUS Server is present in most corporate networks anyway.

Link to comment
Share on other sites

Put wget.exe and unzip.exe in $oem$\$$\system32 and download a zipped structure from the SUS Server (which is an IIS that allows anonymous access using http). A SUS Server is present in most corporate networks anyway.

I initially was using wget & decided to see how else I could do what I wanted, not sure which I'll use yet to be honest, I'm still testing :)

Wget Post:

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

Link to comment
Share on other sites

Put wget.exe and unzip.exe in $oem$\$$\system32 and download a zipped structure from the SUS Server (which is an IIS that allows anonymous access using http). A SUS Server is present in most corporate networks anyway.

I initially was using wget & decided to see how else I could do what I wanted, not sure which I'll use yet to be honest, I'm still testing :)

Wget Post:

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

:)

Personally I prefer the HTTP solution because an IIS running the SUS Server is normally present already and you don't need any authentication by default. So it is not necessary to setup and/or configure any additional service, just copy the file structure to your SUS Server and you're done.

In terms of optimal usage of bandwidth I don't know which protocol is actually more efficient, http 1.1 or ftp.

Link to comment
Share on other sites

I did something similar in 2000 to grab something off the ftp and install it. I modified your code to the way I did it. Its a little easier to modify. I haven't tested it, so you would have to let us know if it works.

md %SYSTEMDRIVE%\install
cd %SYSTEMDRIVE%\install
md apps
md updates
md tweaks

ftp.exe -s:%0
goto done

open 192.168.1.25
username
password
bin
prom
lcd %SYSTEMDRIVE%\install
cd unattend
get apps.cmd
get updates.cmd
get cleanup.cmd
lcd %SYSTEMDRIVE%\install\apps
cd apps
mget *.rar
lcd %SYSTEMDRIVE%\install\updates
cd ../updates
mget *.rar
lcd %SYSTEMDRIVE%\install\tweaks
cd ../tweaks
mget *.reg
bye

:done
@ECHO OFF
for %%i in (%systemdrive%\install\apps\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\apps
del %SYSTEMDRIVE%\install\apps\*.rar
for %%i in (%systemdrive%\install\updates\*.rar) do UNRAR x %%i %SYSTEMDRIVE%\install\updates
del %SYSTEMDRIVE%\install\updates\*.rar
%SYSTEMDRIVE%\install\apps.cmd

Link to comment
Share on other sites

hmmm. I've been off doing different things and haven't played much with my unattended install since I posted last in your other post edg21 but I have it almost completely setup. And am gonna try to finish it up today. I think I will switch it over to the ftp version though.

Here's something interesting I just thought about though, not sure at all yet if it will work just started thinking about it. I just read about detachedprogram for the first time today. from what i've read it runs around the 39 minute mark before drivers are installed? So maybe run ftp.exe or wget from detachedprogram and download a driver folder you have on the ftp server to %SYSTEMDRIVE%/Drivers ? That way you would never have to make a new cd when new drivers come out.

Some things I'm not sure about yet.

would installation require those drivers to be present in their respective folders at the very beginning of installation? Like does it scan those folders for presence and contents at the very beginning of installation? Or would it be ok that those folders wouldn't have anything in them or weren't even be present until i ran detachedprogram and filled them with the newest drivers from the ftp?

And there would be a problem when you got a new machine that had some hardware that you didn't have before. Your winnt.sif wouldn't have an entry for a folder for the new hardware. You could temporarily replace one of the folders with the new drivers contents on the ftp server I guess and then when your done installing that machine put it back for the other machines. But that would be a pain. I wonder if theres a way to setup a ftp program to offer a certain set of files to a client based on their mac address? Then you could have a setup for each machine on your network and when they connected they would download just a audio_driver folder, Network_driver folder, Chipset_driver folder, and then maybe some other folders like miscellaneous_drivers. I think that would be the ultimate way to do it as then you really would have a cd that would work on any machine after you set him up with a profile on the ftp server.

I wonder if this way will work? what does anyone think of it?

Link to comment
Share on other sites

If Windows can't handle your network card out of the box then it can't handle it during the install process. I know, for example, Dell GX260 computers have ethernet cards that Windows can't do anything about. A network install is an impossibility unless you get the network drivers on there to begin with.

Link to comment
Share on other sites

I find shares easiest, but that's because I tend to do my installation during the first non-installer bootup.

I can see the point of having FTP/HTTP, they are a possibility of working during the install phase, whereas shares cannot be used.

At least, that's what I've seen when I've tested - if you can get shares working during install, enlighten me :)

Link to comment
Share on other sites

I wanted to just do a full network share(or distribution share as ms calls it) install as then I could just add and subtract drivers and modify my winnt.sif as wanted without reburning a cd but I'm not great at working with samba yet(my server I would use to do it is running gentoo) and when I was using use the setupmanager to set up the share it would say something like

couldn't enable the share error (rc=xxx) do I want to continue without enabling the share.

The xxx was a different number every time I came back to it to try again after messing with samba a bit. It seemed to change when I changed the name I was trying to use for the share or the exact path I was using for the share so I thought maybe it was messing up with trying to give the share a name or something similar.

Would anyone have any hints or tips on setting up a network/distribution share with samba? I've done ris installs with a 2k3 server serving it and it was easy as pie to setup but the machine I want to use for serving doesn't have a whole lot of ram so I optimised the heck out of my gentoo and have it running text mode only so it does just fine. 2k3 would probably be a bit of a dog on there.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...