engert100 Posted November 27, 2008 Posted November 27, 2008 (edited) Hi.Hopefully there is someone here who can help me with this.I have created a Vista Unattended install, deployable via DVD, Network Share and PXE Boot. During this unattended install, i connect to a network share where all my applications needed for our company are residing. Everything installs fine.Now, the problem is when i am not physically connected to the company LAN or if the drivers for the computer i'm installing are not loaded in the image, i get the error below:Obviously this error happens because in PASS 4 of my unattended install i have entered the network share name and the domain account and password to access this share so it can install applications. If the computer is not conneted to the LAN or if the drivers for a specific computer are not loaded in the image then Windows installation fails.So my question to you coding junkies out there is:Is it possible to have some kind of script during the unattended setup which detects if you have an IP address?If you do - then install applications from the networkIf you don't - then skip installing applications from the network.I'm willing to pay for this.Thank you. Edited November 27, 2008 by engert100
Netman66 Posted November 27, 2008 Posted November 27, 2008 I suppose you could do a simple ipconfig if it returns all zeros (0.0.0.0) then you aren't connected.Other than that, you could somehow query either WMI or for the MediaSense value.NM
Netman66 Posted November 27, 2008 Posted November 27, 2008 This article discusses how to use Win32_PingStatus to determine whether you have an IP address that's valid (and you're therefore connected).http://www.serverwatch.com/tutorials/article.php/1571771
engert100 Posted November 28, 2008 Author Posted November 28, 2008 Thank you for the link.Very interesting. I see a couple of problems though with that script (but it can be modified).When veriables are declared:Dim sHost 'name of Windows XP computer from which the PING command will be initiatedDim sTarget 'name or IP address of remote computer to which connectivity will be testedDim cPingResults 'collection of instances of Win32_PingStatus classDim oPingResult 'single instance of Win32_PingStatus classsHost = "SWYNKPC-XP001"sTarget = "192.168.12.14"sTarget, which is my unattended Vista machine, could have any IP address not just 192.168.12.14.But i do like your other idea though about a simple IP config query.This can be done with a batch file maybe.1. Do an ip config during unattended install and save the results into a text file.2. The next command looks at the text file and compares if you have an ip or if you dont.My major problem here is how to skip passes into Vista unattended. Meaning, after i do my testing with a batch file or VBScript then go to a specific step on my vista XML file. This requires an expert on Vista Unattended setup.Maybe Microsoft can help me with this (if it's even possible to acomplish)Or another idea:1. Run the batch file or vb script:1a. If you have network connectivity call a vista xml unattended file1b. If you don't have network connectivity, call a different vista unattended file (where installing applications over the network are not included in this file)
Netman66 Posted November 28, 2008 Posted November 28, 2008 The sTarget value is a fixed IP somewhere on your subnet. It could be the router or you might even be able to use an Internet address - the result would be the same. If it replied, then the machine obviously has a valid IP address.Your XML should call a vbscript rather than do the heavy lifting itself. By moving your installations outside the xml then your unattend file can remain the same for any machine.When you call the vbscript you can check for the IP in there and skip the entire script should an IP (or valid connectivity) not exist.
engert100 Posted November 28, 2008 Author Posted November 28, 2008 Your XML should call a vbscript rather than do the heavy lifting itself. By moving your installations outside the xml then your unattend file can remain the same for any machine.I see. This just gave me an idea which might work.At pass 4 during unattended install, instead of entering the network share name, name and password and silent switches to install applications, i could call a vbcript of batch file (which will be included in the Windows directory in Install.wim file after i place it there manually) which would do the following:1. Determine if the computer has an ip address1a. If it does, then connect to the network share (i'd have to figure out how to include an account name and password in this script to access the network share) then start installing all applications one by one by using their silent switches.When all apps are installed then the script will exit and Vista will go to the next line on the XML file. 1b. If the machine doesn't have an IP then exit the script. Then theoretically, Vista unattended shouldn't fail since the script is handling all application installs and not the XML file. It should simply go the next pass on the XML file and it will not have any apps installed. I think this might work. Will let you know if it does and i will post the code here.Thank you for your help.The reason i'm installing apps from the network is because i discovered this problem. I was doing everything offline before i discovered this 4.3gb limitation.
engert100 Posted November 29, 2008 Author Posted November 29, 2008 I found a batch file which checks network connectivity:@echo offECHO Checking connection, please wait...PING -n 1 www.google.com|find "Reply from " >NULIF NOT ERRORLEVEL 1 goto :SUCCESSIF ERRORLEVEL 1 goto :FAILURE:SUCCESSECHO You have an active Internet connectionAt this point, map a network drive, include credentials (with Net use) then start installing all apps.goto END:FAILUREECHO You do not have an active Internet connectiongoto :END:ENDEXIT
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now