Re: [Unattended-Dev] Time to think on Win7
Den 03.11.12 16:50, skrev Doug: I have a Win7 unattended going. Well, kind of. I boot from a USB drive with an unattended xml file on it, which does the basic install and then starts a modified apps only type of install after windows is done. We prefer to use PXE boot, I got PXE boot to work using the instructions in that link I posted originally (http://www.mail-archive.com/unattended-info@lists.sourceforge.net/msg09116.html). I have to create/modify the unattended xml by hand every time - it has my computer name, domain, etc, as well as the main unattended bat file tor run. I also create a user-pc specific .bat file that contains all of the todos for the user and pc type. I also somehow managed to hack together a batch-script which look ups the DNS hostname using ipconfig and nslookup (had to copy nslookup from the Windows 7 install image) and creates a modified unattended.xml: == @echo off :: Template for the unattended.xml. set UNATTENDED_ORIG=Z:\site\win7_unattended.xml :: Location for the modified unattended.xml: set UNATTENDED=X:\unattended.xml IF EXIST %UNATTENDED% DEL %UNATTENDED% echo Trying to find computer name... for /f tokens=2 delims=: %%f in ('ipconfig ^| find IPv4 Address') do ( set IPADDR=%%f goto foundip ) echo ERROR: Couldn't find IP address using ipconfig... goto :finished :foundip echo Found IP address: %IPADDR% :: nslookup in WinPE looks like this: :: (null) COMPNAME.domain.tld for /f tokens=3 delims=). %%f in ('echo server %IPADDR% ^| Z:\dosbin\nslookup.exe ^| find (null)') do ( set HOSTNAME=%%f goto :foundhost ) echo ERROR: Couldn't find hostname using nslookup... goto :finished :foundhost echo Found machine name: %HOSTNAME% echo Genererating %UNATTENDED%... :: COMPNAME should be whatever you have set the temporary computer :: name to in your unattended.xml template. FOR /F tokens=1 delims=; %%l in (%UNATTENDED_ORIG%) do ( IF %%l==ComputerNameCOMPNAME/ComputerName ( echo ^ComputerName^%HOSTNAME%^^/ComputerName^ %UNATTENDED% ) else ( echo %%l %UNATTENDED% ) ) echo Starting Windows 7 installation... Z:\os\win7\setup.exe /unattend:%UNATTENDED% :finished = I had to use nslookup because a lot of other methods (ping, etc) returns the temporary local hostname set by WinPE instead of the hostname in the DNS... Maybe someone have a better solution for that. In any case this script is quite dependant on spaces in the XML-file, output from the iplookup/nslookup commands, and language differences in your WinPE boot, so you might need to modify the script to work for you. It's been a couple of years since I set it up, and I know I ran into several problems, mainly around running scripts from a share that was in my windows domain and a computer that wasn't - or vice versa. I created a special account in my domain to do the install with. And I ended up breaking the pre.bat into two parts with perl being installed between them. I don't know if this is the same problem that you had, but I also had some trouble getting Windows 7 to run the unattended Perl scripts because it would pop up the security warning dialog. However I got it to not show those warnings by adding .exe;.pl (and a bunch of other filetypes) to the LowRiskFileTypes registry setting at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Associations. I just unset it after installation. After I did that, most of the application installs for unattended actually seemed to work! I just had to tweak a few of them to work, mostly because some had trouble with file copying and %PROGRAMFILES% vs %PROGRAMFILES(x86)%. But there are still a few things that doesn't work, f.ex. autolog.pl doesn't seem to work so I have to input username and password after each todo.pl reboot. User has to make a WinPE boot disk and boot from it. Map \\ntinstall\install to Z: I managed to make the startup script (startnet.cmd, this need to be added to the WinPE boot.wim file) connect to the network share and start the installation by itself. The script mostly just uses the same code as mapznrun.bat for trying to connect 20 times, and once connected runs a bat file from Z:\bin to do the rest of the work. I'm sure you could do this on the USB too! (Though you'll need to have username and password in the script, preferably use a user which only has read access to the install share.) I'm not very experienced with windows scripting, and but I imagine that several of the things I do in the unattended (join domain, set local admins, rename pc) could be done after the install via todos. Though I managed to get the computer name automatically using DNS lookup, I still haven't been able to get automatic domain join to work... (We never got it to work with Windows XP either.) Maybe I should make a more thorough guide. But as I mentioned, there are still a few problems
Re: [Unattended-Dev] Time to think on Win7
I have a Win7 unattended going. Well, kind of. I boot from a USB drive with an unattended xml file on it, which does the basic install and then starts a modified apps only type of install after windows is done. I have to create/modify the unattended xml by hand every time - it has my computer name, domain, etc, as well as the main unattended bat file tor run. I also create a user-pc specific .bat file that contains all of the todos for the user and pc type. It's been a couple of years since I set it up, and I know I ran into several problems, mainly around running scripts from a share that was in my windows domain and a computer that wasn't - or vice versa. I created a special account in my domain to do the install with. And I ended up breaking the pre.bat into two parts with perl being installed between them. That part of my unattended xml looks like: FirstLogonCommands SynchronousCommand wcm:action=add Order1/Order DescriptionRunning appsonly/Description CommandLinecmd /C start /wait net use Z: \\ntinstall\install mypass /user:mydomain\myuser/CommandLine /SynchronousCommand SynchronousCommand wcm:action=add Order2/Order DescriptionRunning appsonly/Description CommandLinecmd /C z:\bin\pre1.bat/CommandLine /SynchronousCommand SynchronousCommand wcm:action=add Order3/Order DescriptionRunning appsonly/Description CommandLinecmd /C Z:\scripts\perl.bat/CommandLine /SynchronousCommand SynchronousCommand wcm:action=add Order4/Order DescriptionRunning appsonly/Description CommandLinecmd /C z:\bin\pre2.bat/CommandLine /SynchronousCommand SynchronousCommand wcm:action=add Order5/Order DescriptionRunning appsonly/Description CommandLinecmd /C z:\bin\todo.plUserSpecificFile.bat/CommandLine /SynchronousCommand SynchronousCommand wcm:action=add Order6/Order DescriptionRunning appsonly/Description CommandLinecmd /C z:\bin\post.bat/CommandLine /SynchronousCommand /FirstLogonCommands I tried the WinPE boot then install from a network share yesterday for the first time, and it worked great. No PXE boot is required. Here's my thoughts on how this could work: User has to make a WinPE boot disk and boot from it. Map \\ntinstall\install to Z: From the PE environment run a script from Z: that builds an unattended xml file based on user input and saves it somewhere on Z: Run setup from the Z: drive using the unattended that was just built. I have a volume license and used that to install from. I don't know if there are any differences that would stop this approach with OEM or retail media. I'm not very experienced with windows scripting, and but I imagine that several of the things I do in the unattended (join domain, set local admins, rename pc) could be done after the install via todos. Thoughts? Doug On Mon, Oct 1, 2012 at 4:04 AM, Johan Ho johan...@mf.no wrote: Den 21.09.12 02:34, skrev Juanjo Pablos: Hi, I just saw that win7 had become Nº1 in the operations Systems market share. http://marketshare.hitslink.com/operating-system-market-share.aspx?qprid=10 I do not see myself with enough time to accomplish this task. So I beg for some help on this matter. -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel I also recently started trying to get unattended installation of Windows 7 to work. I found this old post on the unattended info mailing list: http://www.mail-archive.com/unattended-info@lists.sourceforge.net/msg09116.html I got as far getting the WinPE 3.0 boot image up and running, but I need to focus on other projects right now. Anyways, it did sound like they got it to work. Johan Ho -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update
Re: [Unattended-Dev] Time to think on Win7
On Sat, Nov 3, 2012 at 3:59 PM, Chris McClimans unatten...@hippiehacker.org wrote: I have something similar to unattended working at hh.github.com. It starts from ISO and ends up with a working system. (internally it creates a floppy image containing the Autounattended.xml, and boots the iso) I think it would be interesting to use the built in pxe and install.wim files on the windows 7 isos. https://github.com/hh/windows-fromscratch https://github.com/hh/veewee/tree/master/templates The interesting bits are in the definiton.rb files: https://github.com/hh/windows-fromscratch/blob/master/definitions/windows-2008R2-serverstandard-amd64-winrm/definition.rb https://github.com/hh/windows-fromscratch/blob/master/definitions/windows-7-enterprise-amd64-winrm/definition.rb I'm thinking about templating the xmls out via erb. On Sat, Nov 3, 2012 at 8:50 AM, Doug doug...@gmail.com wrote: I have to create/modify the unattended xml by hand every time - it has my computer name, domain, etc, as well as the main unattended bat file tor run. I also create a user-pc specific .bat file that contains all of the todos for the user and pc type. -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d ___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel I just use WDS with pre-staged computer accounts and and an unattended.xml that does an apps-only install... Granted there is nothing like the granularity of unattended for XP :-( Cheers -- LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel
Re: [Unattended-Dev] Time to think on Win7
Den 21.09.12 02:34, skrev Juanjo Pablos: Hi, I just saw that win7 had become Nº1 in the operations Systems market share. http://marketshare.hitslink.com/operating-system-market-share.aspx?qprid=10 I do not see myself with enough time to accomplish this task. So I beg for some help on this matter. -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel I also recently started trying to get unattended installation of Windows 7 to work. I found this old post on the unattended info mailing list: http://www.mail-archive.com/unattended-info@lists.sourceforge.net/msg09116.html I got as far getting the WinPE 3.0 boot image up and running, but I need to focus on other projects right now. Anyways, it did sound like they got it to work. Johan Ho -- Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ unattended-devel mailing list unattended-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unattended-devel