NOTS3W Posted May 28, 2007 Posted May 28, 2007 I'm sorry to ask so many questions here. I've really tried to research these things but sometimes my lack of experience makes it hard to fully comprehend what I've read. I've learned alot here but I seem to have hit a wall trying to understand the timing of adding .NET. I hope this makes sense:I use nLite. nLite has created CMDLINES.TXT which runs at T-12. I've added to the bottom of that file a .reg file and iespell.exe (a switchless installer).At first logon, WINNT.SIF calls nLite.cmd from its GUIRunOnce section.NLITE.CMD includes two lines. The first is a registry entry that sets up my Cleanup.cmd file to run after explorer is loaded:cmd /c reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v cleanup /d %systemdrive%\cleanup.cmd /f(I was having trouble copying files to folders that didn't exist yet and this solves that problem.)So far, so good. Everything seems to work okay except that I get an error message from Windows File Protection that some unapproved files are present and it wants to replace them. If I'm at the computer when that comes up, I've canceled past it. Otherwise, when I come back, Windows is installed so I'm not sure what's happened. Any ideas or suggestions?Anyway, The other line that nLite inserts into nLite.cmd is a call to install .NET 2.0 (nLiteOn_DotNet20_G.cab) which I inserted in the Hotfixes, Addons and Update Packs section of nLite. It fails because I didn't have cmdow and sleep in the path (fixed that for next test). While researching that, though, I realized that I also need to install .NET 1.1 and should install .NET 3.0 for good measure. That's where the timing issue comes in. As I understand it, if I install 3.0, I don't need to install 2.0 but I must install it before I install 1.1. Whew!I think that means that I should remove the 2.0 file from nLite so it doesn't get installed at all, then install 3.0 in cmdlines.txt so it installs at T-12, right?Then I should install 1.1 either by adding it to the GUIRunOnce section of winnt.sit -OR- by creating my own RunOnceEx.exe and inserting it in there, also right? I'm not opposed to either but I hate the fact that there are options like this when I really don't understand how or why to choose one over the other.Or, since I don't actually have a need for 3.0 at this time, I could leave things as they are (2.0 gets installed at first logon) and install 1.1 through cmdlines.txt at T-12, also also right? I'd prefer to install all three .NET files to be complete but not if it's going to make me crazy which may already be too late. I found this thread http://www.msfn.org/board/Silent_NET_Maker...702_t90779.html but got lost in the hfslip discussion and installing 2.0, then 3.0, then 1.1 and rebooting before or after one of them. Can someone please help an old guy understand the best way to install at least 1.1 and 2.0?BTW, I know that Ryan has an AIO .NET installer but (unless I'm not going to the right page) it's only available as a bit torrent which I'm not prepared for and it's a beta which means it's not quite ready for prime time. And I don't yet have access to RogueSpear's site to see what he might have so I guess I need to do this with downloads from Microsoft.Thank you!Ray
Martin H Posted May 28, 2007 Posted May 28, 2007 (edited) Hi again, NOTS3W First off, when i gave you the command line for adding 'cleanup.cmd' to the 'HKCU\...\RunOnce' reg key, then i actually didn't even know that 'reg.exe' was an executable, and just thought that it was one of cmd.exe's internal commands, so this means that you should remove the 'cmd /c ' from the line. Secondly, allthough i don't personally install any of the .NET frameworks myself(with nLite then i use the light framework instead of the big official one), then i can remember reading that '.NET v2.0' can't be installed from either T-13, T-12 or T-9 i.e. Svcpack.inf, cmdlines.txt and T-9 i must confess i haven't looked up yet what that reffers to ? So this means that you need to use either RunOnceEx or GuiRunOnce for that, and since '.NET v3.0' also includes all of '.NET v2.0' allready, then i guess that it's the same thing with that. If i where you, then i would install '.NET v1.1' and '.NET v3.0' from 'GuiRunOnce', which means that you just add the two installers and their silent switches into 'NLITE.CMD', so that they will be installed at first login after the reboot i.e. 'HKLM\...\RunOnce', and then after that your desktop will be shown and then 'cleanup.cmd' will run from 'HKCU\...\RunOnce', because of the line i gave you earlier.Edit: The silent switches are :.NET v1.1 : start /wait dotnetfx.exe /q:a /c:"install.exe /q".NET v3.0 : start /wait dotnetfx3setup.exe /q /norestart Edited May 28, 2007 by Martin H
NOTS3W Posted May 28, 2007 Author Posted May 28, 2007 (edited) Hello again, Martin.I should have given you credit for that registry idea to delay execution of cmdlines.txt. Thanks again for that. It works fine as is. I'll try removing the cmd /c, though, and see if it matters.About the .NET installation:My .NET 2.0 is already being installed from GUIRunOnce so I can see where just replacing that with a 3.0 installer should take care of that part of the problem. I have the 3.0 files from Microsoft. I have to question installing 1.1 at the same point in time, though. Last night, I read this (post #42):Don't know if this is your problem, but it's been said a few times that .NET 3.0 won't install if you installed .NET 1.1 first without rebooting.This will not work:.NET 1.1.NET 3.0This will work:.NET 1.1<reboot>.NET 3.0This will also work and it's done if you merge 1.1 with 3.0 (but I can't test thoroughly if there are any side effects):.NET 3.0.NET 1.1I think I need to install .NET 1.1 from cmdlines.txt so the system reboots before it installs 3.0. I'll try that next.Thanks for all of your help.Ray Edited May 28, 2007 by NOTS3W
Martin H Posted May 29, 2007 Posted May 29, 2007 You are most welcome, my friend Btw, i forgot to say before that the 'cmd /c ' that you should remove, where just because that it was redundant, but that it didn't have anything to do with the SFC message you've got during the install, and i'm sorry that i can't help you with that...Your solution about installing .NET v1.1 from cmdlines.txt and then v3.0 from NLITE.CMD(which is listed in WINNT.SIF's GuiRunOnce section, so that the path to NLITE.CMD is copied to 'HKLM\...\RunOnce' during setup), sound like a very good solution to me CU, Martin.
NOTS3W Posted May 30, 2007 Author Posted May 30, 2007 And it all worked!!! I now have .NET 1.1 SP1 with KB886903 and .NET 3.0 on the Add/Remove programs list. I'm surprised that .NET 2.0 also appears there since I didn't explicitly install it. I know it's included with 3.0, but didn't realize that it would get installed separately. It doesn't show the two hotfixes (KB917283 and KB922770), however. Maybe the 2.0 that's included with 3.0 is already patched (?).For the record, here's what I did:Included this line manually at the end of cmdlines.txt: "dotnet11sp1.exe" (with quotes)I got that file from the RyanVM site (thank you Ryan!)Now .NET 1.1 gets installed at T-12.Included this line on the nLite RunOnce tab: start /wait %SystemDrive%\dotnetfx3setup.exe /q /norestartThat ends up running from GUIRunOnce on first logon.I got that file from Microsoft and used your syntax for the rest.I placed the dotnetfx3setup.exe file in $OEM$\$1 so it would be found in C:\The only problem is that dotnetfx3setup.exe gets left in C:\. There's nothing to delete it. I'll add a line to my cleanup.cmd to take care of that.Case closed (I hope).BTW, after making a number of test ISOs in nLite to install in Virtual PC and with more and more things needing to be copied into installation folders, I've created a cmd file to do that for me. I go through the nLite process up to the point of making the ISO, then run the cmd, then go back to nLite and create the image. The cmd file creates all of the necessary folders under $OEM$, copies certain files into those folders, and even echoes a few lines to the bottom of cmdlines.txt. I don't know if that's any great revelation, but it makes sure I don't forget anything each time I rebuild from scratch.Thanks again for your help with this.Ray
Martin H Posted May 30, 2007 Posted May 30, 2007 Well done, mate - I'm glad that you have a working solution now I place all the 7z SFX installers for my apps into 'XPCD\$OEM$\$1\install\', and then run 'rd /s /q %systemdrive%\install\' as the last line in my 'cleanup.cmd'. Then to hide the flashing command prompt window when the different batch files runs, then instead of calling them directly, then i run them through 'hidcon.exe', like e.g. 'hidcon.exe cleanup.cmd'. It's only 2KB in size and unlike cmdow, it won't shortly blink the command prompt for a split second, but totally hide it I also integrate Xable's great XUDPack, which includes all the High Priority updates released since SP2, and since the updates gets directly integrated by using this method, then the install time will not increase at all, and also the filesize won't increase one bit either, as files are directly overwritten. I use Xable's pack instead of Ryan's, because Ryan includes some unofficial fixes in his pack + optional fixes, while Xable's pack only includes the High Priority fixes, i.e. security fixes, critical non-security fixes and important program updates and a little extra like Microsoft and Windows Update Engine etc. I also use batch files for many things like yourself, and i always start with a fresh 'XPCD' source folder of the XP-SP2 files and then i run nLite on the folder to integrate Xable's XUDPack, to make the CD unattended and tweaked. Then I quit nLite and then i run a batch file which copies the contents of my $OEM$ folder over into the freshly processed nLite'd XPCD folder and then an ISO is built from that folder, which i then can test in VMware 6. I also used to open back up Nlite to make the ISO, but i now think that it's more convenient to just let the batch file also make that too, since cdimage.exe is fine for that job :cdimage\cdimage.exe -l"WXPVOL_EN" -h -j1 -b"cdimage\boot.img" -x -o -m "XPCD" "XPCD.iso"Just enter your wanted CD label under '-l', your path to the boot image under '-b' and specify source folder and destination file name at the end.Xable's XUDPack :http://udp.xable.net/ orRyan's RVM Pack :http://www.ryanvm.net/msfn/updatepack.htmlcdimage.exe/boot.img :http://unattended.msfn.org/unattended.xp/view/web/15/hidcon.exe : http://unattended.solta.ru/exectools.7zYou probably allready know all of this, but just in case you didn't, i just thought that i would mention it Btw, you don't need to answer to this post, as i just wanted to say: Job well done CU, Martin.
Recommended Posts