Jump to content

Fully unattended windows 7 installation


Recommended Posts

So I figured out my problems with my image.

Apparently if I installed Daemon tools the setup didn't like it. So after i syspreped the setup couldn't continue. Anyone else had this problem or found a solution? Apart from this it works great! :D Just have to use the -u1 command for my image. You should mention that in your guide computerguru. Thanks!

Link to comment
Share on other sites


So I figured out my problems with my image.

Apparently if I installed Daemon tools the setup didn't like it. So after i syspreped the setup couldn't continue. Anyone else had this problem or found a solution? Apart from this it works great! :D Just have to use the -u1 command for my image. You should mention that in your guide computerguru. Thanks!

Hello CalBoy, you can restar ur pc before syspreped and Daemon will continue, after that u can syspreped ur image.

I hope that helps, good luck

Yesnovato

Link to comment
Share on other sites

So I figured out my problems with my image.

Apparently if I installed Daemon tools the setup didn't like it. So after i syspreped the setup couldn't continue. Anyone else had this problem or found a solution? Apart from this it works great! :D Just have to use the -u1 command for my image. You should mention that in your guide computerguru. Thanks!

Hello CalBoy, you can restar ur pc before syspreped and Daemon will continue, after that u can syspreped ur image.

I hope that helps, good luck

Yesnovato

No no, sorry i didn't explain it correctly. Its not the installation thats the problem. Daemon tools installs fine in audit mode, but after its installed and i take the image of the drive. When its being installed it has trouble. I'll take a screen shot when I have a moment and show you what i mean.

Thanks Calboy

Link to comment
Share on other sites

So I figured out my problems with my image.

Apparently if I installed Daemon tools the setup didn't like it. So after i syspreped the setup couldn't continue. Anyone else had this problem or found a solution? Apart from this it works great! :D Just have to use the -u1 command for my image. You should mention that in your guide computerguru. Thanks!

Hello CalBoy, you can restar ur pc before syspreped and Daemon will continue, after that u can syspreped ur image.

I hope that helps, good luck

Yesnovato

No no, sorry i didn't explain it correctly. Its not the installation thats the problem. Daemon tools installs fine in audit mode, but after its installed and i take the image of the drive. When its being installed it has trouble. I'll take a screen shot when I have a moment and show you what i mean.

Thanks Calboy

@ CalBoy, thanks for the suggetion, I'll add it shortly.

Also thanks a lot for mentioning Daemon tools, it helps me a looooooot understanding your problem dude. Daemon tools or any virtual drive emaluator (such as ultra ISO, Magic ISO, etc) may and in most cases offcourse break the intallation routine. As it is suggested that programs like this SHOULDN'T BE INSTALLED IN AUDIT MODE. They'll create problem at driver detection stage. If you follow the next part of my upcoming guide, you may then do this, but not yet. Rather you may install them via setupcomplete.cmd or runonce at this time. I requet you to stay in touch with this topic.

Link to comment
Share on other sites

:thumbup Oh my God, you are a genius my friend. The HKCU, all were installed correctly, I have to check to see because the Scripts folder was not deleted.

I'll try winintegrator to see if my drivers working, ah I check my integrated drivers and they all say "inbox: No", actually I do not know the meaning.

You say I can use clean.cmd with firstlogoncommand, but my fear with that method is to delete the script folder before setcompete.cmd running and thus not install the Regs., Maybe I have to give some order, in that case what order value I would give it

Thanks for your help. I'm waiting for his new post

Note: Could you check the attachs, and tell me if they are ok

Thanks in advance

Thanks yesnovato, you shouldn't be worried about the deletion process if you follow my method, if you use firtlogoncommands method then execute your clean.cmd as the last command, so tweak2.reg then looks like


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Final"="regedit /s C:\\Windows\\setup\\scripts\\tweak1.reg"

;you may put your another entries here.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
"Final9"="C:\\Windows\\setup\\scripts\\clean.cmd"

clean.cmd will be executed at your first logon, setupcomplete.cmd will be executed before first logon commands. So, no worry.

For inbox drivers, windows 7 contains a lot of drivers included in the image by default (mainly the graphics & sound card drivers). If your integrated driver is not better or up to date, then it won't be installed. Also, I read some problems with Nvidia display drivers, you may check them from www.driverpacks.net.

Link to comment
Share on other sites

So, thanks to everyone who read, practised, advised on this topic, finally I want to start the second part of my guide. Not that knowledge and hapiness increased & sorrows dicreased by sharing, so if any one have any useful correction, do this without any hesitation.

I try to cover my guide in two parts

1. VHD boot method (simpler to those who pratised a lot, have many useful features like no limitation of wim file size, very fast and secure but NOT SO GOOD METHOD TO END USER). I'll explain this method later (though its recommended for the experienced user).

2. Custom setup environment method. It's 'custom' so the method may vary from user to user, it's uefulness depends on it's adjustments but frankly to say you have no troubles understanding windows setup routine after practising this.

Windows setup routines:

There are two methods of installing windows, pre vista (or pre longhorn) & vista.

1. Pre vista:

Previous versions of windows includes setup routine, which have windows files compressed (mainly LZX compression methods were used). Such as explorer.exe was compressed as explorer.ex_, each files were compressed and in setup time it had two parts;

a. text mode setup. Start from loading hal, kernel debuggers and other massstorage drivers. Then uses fdisk or format.com to format partitions. Diskpart to modify, create, delete, rebuild partition table (just a moment, would you point that diskpart of win2k,XP is much more efficient than vista or 7, specially creating primry and logical partitions at the same time). Then loading setupp.ini from the i386 directory of intallation media, reading the txtsetup.sif file to make the lists of files to be copied, copying files to the %systemdrive% drectory, loading registry hives, and then performing oemdetachedcommand if provided.

b. graphical mode setup: installing the devices detected, installing network, installing startmenu items and at T-13 stage, perform the svcpack.inf provided tasks. Then at 1st logon runs the runonceex commands if provided.

Intallation usually takes 30-35 minutes and if large number of drivers are integrated, huge applications called to be installed unattendedly, may take hours to complete, but a good thing is can be performed on a very very slow p-3 machine, and setup CD doesn't include tons of unnecessary apps.

2. Vista (or longhorn) setup routine:

Mainly insisting on deployment, specially server deployment, the breakthrough in windows setup was invented, the silence breaking imaging format .wim (windows image) was came to light, in this format a single file contains all files and it's just a image of a drive or a partition, so takes longer time to build the .wim file but takes a little time to mount and expand.

In this method there are two parts;

a. WINPE:

loads all necessary massstorage drivers, then use diskpart to modify partition (doesn't seem so much useful to me). Then mount the install.wim file, expand it to the selected partition, mark this partition as active.

b. SETUP:

as the install.wim file is integrated enough to perform the rest of the setup procedure (including driver installation), then oobe (or audit) part is performed, user dektop initialization process completes and then...

thats just enough for the time, you may think that I'm o much elaborate, but I think it is required.

Link to comment
Share on other sites

Thanks computerguru. I apoligise, but thats pretty basic information, although I always wondered how they compressed WinXP. Is there any chances of you posting more information about different versions of deployment, I.E. information like the %OEM% folder. Sorry if your about to get to that :D . I could post a basic guide on creating MSIs for deployment, I.E. so programs that can't be installed during audit mode like Google Chrome (as its kept in the %appdata% folder (I have no idea why. Weirdest idea)) can be silently installed during first boot or first logon. Would you want me to post a guide? Its rather easy :)

Thanks CalBoy

Edited by CalBoy
Link to comment
Share on other sites

Thanks computerguru. I apoligise, but thats pretty basic information, although I always wondered how they compressed WinXP. Is there any chances of you posting more information about different versions of deployment, I.E. information like the %OEM% folder. Sorry if your about to get to that :D . I could post a basic guide on creating MSIs for deployment, I.E. so programs that can't be installed during audit mode like Google Chrome (as its kept in the %appdata% folder (I have no idea why. Weirdest idea)) can be silently installed during first boot or first logon. Would you want me to post a guide? Its rather easy :)

Thanks CalBoy

Thanks a lot calBoy for your interest. Offcourse as I said knowledge and happiness increases by sharing, so don't mind posting a guide here.

You're appreciated forever.

Link to comment
Share on other sites

Now I am describing the core part.

As this part covers custom setup environment, there a plenty of platforms avaliable. All these called as preinstallation environment or PE. Famous of them are BartPE, Windows Live CD, Norton GHOST, Farstone recovery console, Windows PE.

Among of them WinPE seems to me as much more useful than the others, THOUGH MY EXPERIENCE SAYS THAT NORTON GHOST IS THE FASTEST OF ALL. But winpe at the same time can provide a huge of functionality we needed.

WinPE is an operating environment but it just contains a command prompt by default, where X:\ refers to the %systemroot%\system32 directory of the mounted PE image. WinPE is not a real operating environment and automatically restarts in every 24 hours (though we can disable this by disabling system clock by a batch script).

WinPE lacks of many more windows default functionalities. Note that we can gather winPE from both windows 7 setup disk or from Windows Automated Installation Kit, we must should gather it from WAIK. To create a winpe boot iso do the followings: (I assume your machine is x86)

click start, all programs, deployment tools command prompt, then type the followings, press ENTER after a line;


copype.cmd x86 C:\winpe_x86
copy C:\winpe_x86\winpe.wim C:\winpe_x86\ISO\sources\boot.wim
"C:\Program Files\Windows AIK\Tools\x86\ImageX.exe" C:\winpe_x86\ISO\

now we have the winPE wim file from WAIK, and this is our reference wim file.

As winpe lacks of some functionality by default; we have to remove this lackings according to our needs.

We want to perform the setup task by winpe, so we have to add the following functinality;

1. imagex to expand and apply the install.wim file to a partition

2. diskpart to perform partitioning tasks, though diskpart is included in winpe, but it is not so user friendly, so we have to add a GUI front of diskpart which may be collected from the net.

3. Necesary files to run any GUI application, also have to make batch commands to perform the partitioning and imaging process.

To be continued:)

Link to comment
Share on other sites

MSI CREATION GUIDE

This guide is going to outline the basics for creating custom MSI's

To do this you are going to need

WinInstall LE Available from here

A clean PC or Virtual PC. It has to be clean for the MSIs to be created correctly. Its is always best to make the applications on a untouched OS. If it is on a OS with programs already installed WinInstall LE can sometimes miss some of the settings. ALWAYS make your MSI's on a untouched OS

Personally i use VMware to do all of my PC virtualisation. You can use any virutal PC to make the .msi's or even a clean PC. I like to use virtual PCs to create them. I will explain why later.

Starting tips:

Only create the msi's on the same OS that you plan on installing the MSI's to, by doing this you minimilise the chances for the installation to break and damamge your OS.

If you use a Virtual PC it means you can take 'Snap shots' of the PC. This means that it will make a copy of the PC of its current state. Saving you time meaning you dont have to reinstall your PC to get it in a clrean state. This will make more sense later on. (To take a snapshot right click on the Virtual PC tab and hit Take Snapshot. Then put in information for the discribtion etc. To revert to a snapshot right click on the OS tab and select the snapshot manager and select the snapshot to go back to)

If you use VMware it means you can install the VMware tools. These advanced tools make changes to the Virtual OS, and increases the performance of the Virtaual PC. The main advantage of installing the tools for MSI creation is that you can copy things into the Virual PC on to the host rather then having to create shares.

To install the tools right click no your OS in VMware tools and click Install tools

installtools.png

Outline of WinInstall LE

WinInstall LE creates it MSI's by comparing two different scans together. A before scan of the OS and a after scan of the OS. Inbetween these two scans you install the programs you want to create the MSIs of. Then when you ran the after scan WinInstall finds the changes and packages them together. This way of MSI creation means that you can configure the program to your needs and WinInstall will notice the changes and include those in the packages. Meaning that you don't have to change the settings every time you install the program.

For the sake of this guide I will presume you are using VMware and on a Windows 7 OS.

THE GUIDE

1. Get your OS installed and then install VMware tools and WinInstall LE. When creating your share remember it as you need it later on.

2. You can now run the discover tool. Click on Windows Installer Packages. Then at the top left there is a little magnifying glass. Thats the Discover tool.

3. Name the package. Note where WinInstall saves the MSI, you will have to go there to get it later. Select where you want WinInstall to save its temporary

files. C Drive works fine but if you have another drive you can select to save them there (results do not differ greatly I find).

4. Select the Drive that the program will be installed to. Majority of the time this is on the C: Drive but remember where you are saving the program. If the

program is across more then one drive remember to select both.

5. You can select the defults for both the File and Registry Selection. Once this is done the Before Snapshot will now run, it can take quite some time

depending on how big your drive is and how many drives you chose.

NOTE: Now is a good time to take a snapshot. Now when you want to make another application all you have to do is revert back to the

snapshot and install the application and continue. How ever when you return to a snapshot you lose all of the data that you have created since the snapshot

6. Once the Discover has finished running you can install your application. Once your application is installed and you have put the settings in that you want

you are ready to run the after snapshot. (Remember to try and not make many other changes to the computer in between the two snapshots as they will get

recorded).

7. To run the after snapshot click the Discover tool button again and select the after snapshot now. WinInstall will now take another snapshot now and compare

the two. NOTE: Windows may think that WinInstall is frozen a few times during this stage, even though Windows thinks it is often it isn't. Leave it

running and wait as it can take quite some time. Once it is completed you can get the MSI to where WinInstall saved it. If you can't remember where it was

saved go to the WinInstall share (which was set during the install of WinInstall) and in the Packages folder there should be a folder of what you named the

MSI. In that folder is the MSI.

Your MSI is created! To silently install it use the /quiet switch when running the .msi

WinInstall is also useful for installing user settings. If there is one program that doesn't keep settings when you run sysprep, you can capture the settings using wininstall by installing the application taking the first snapshot changing the settings and then running the after snapshot. That way you have the settings in a MSI and you can install them silently using the RUNONCE command and the silence switch.

I hope i have made the guide clear and if there are any mistakes please let me know and i will fix it. If it isn't indepth enough or is too indepth let me know!

Thanks CalBoy

Edited by CalBoy
Link to comment
Share on other sites

Nice guide CalBoy, this helps a lot installing apps which mayn't be installed at audit mode. Just a recommendation, if you use WinInstall LE to capture your installation routine, use a fresh, untouched windows 7 as reference OS, I mean if your OS already includes .netfx, ms visual C ++ redistributable, updated directx, the app simply overlooks installing them, but when to use those msi's on a win 7 which doesn't include them, then the apps may not work properly.

@CalBoy you may also include something about WPI (Windows Post Installlation), or simply creating a autoplay menu, which let the user to choose what apps they like to be installed.

Thanks a lot for your guide.

Link to comment
Share on other sites

Nice guide CalBoy, this helps a lot installing apps which mayn't be installed at audit mode. Just a recommendation, if you use WinInstall LE to capture your installation routine, use a fresh, untouched windows 7 as reference OS, I mean if your OS already includes .netfx, ms visual C ++ redistributable, updated directx, the app simply overlooks installing them, but when to use those msi's on a win 7 which doesn't include them, then the apps may not work properly.

@CalBoy you may also include something about WPI (Windows Post Installlation), or simply creating a autoplay menu, which let the user to choose what apps they like to be installed.

Thanks a lot for your guide.

Thanks Computerguru. It surprised me about how long it took to write. When I said a 'clean PC' I meant a 'fresh, untouched windows 7 OS', I'll reword it so it makes more sense. Thanks for the tip!

I haven't done much with WPI, but I looked into it the other day. Is it compatible with Windows 7?

Thanks CalBoy.

Link to comment
Share on other sites

@Computerguru

I found a much easier way to install the HKCU settings. Rather then having them run on first logon, why not add them to the ntuser.dat file in the Default user profile. Its much easier and you don't have to fiddle around with your setupcomplete.cmd. Adding the registry tweaks to the .dat is not hard a simple bat file can do it with no errors!

Link to comment
Share on other sites

Thanks Computerguru and Calboy

A good post for me bacause, I did not know WinPE and how to use, now I have begun to understand it, thank you very much.

Computerguru I did exactly what you wrote and I got the following files and folders C \: WinPEx64 \, ISO, Mount, efisys.bin, efisys_nopromptbin, etfsboot.com, winpe.wim

C: \ WinPEx64 \ ISO \ boot, EFI, sources, bootmgr, bootmgr.eti

I do not know if the above is correct

I have some doubts. The third line does not work for me, I was checking the help of imagex, seems to be missing something and know you are doing that line

C: \ program files \ windows aik \ tools \ amd64 \ imagex.exe C: \ winpex64 \ iso \

could explain please.

When I opened winpe.wim saw was only the Program Files folder, but it was not the x86 Program Files folder, in the case would have to manually adding tp W7x64 or is there another method.

Calboy your guide will be of great help to me, really I do not want to add many applications to my image would occupy much space, I prefer to use WPI, anyway I will test installing Photoshop CS4, I'll let you know the results of the installation.

Thanks

Yesnovato

Edited by Yesnovato
Link to comment
Share on other sites

Hello

Here is my results creating Photoshop_CS4.msi

Conversion Error

Conversion Messages

Discover converts its own format to an MSI style format bla bla bla.....

Error: invalid line '"Microsoft.VC80.CRT,publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.762",processorArchitecture="x86""=Edit(MultiSZ):/Find start /Insert "?dn[cftJE@d-.tKfH%iWMergeModulesFeature>_j0,Y]s!Soe8MkbIdFwU" before' found in .REG file 'C:\Program Files (x86)\Scalable\WinINSTALL\Packages\Photoshop_CS4.REG'

I Don't understand nothing. Could you help me

Thanks

Yesnovato

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