Jump to content

derniwi

Member
  • Posts

    44
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Everything posted by derniwi

  1. I know / use this methods for hardware dependent setups: - create a task and use the option "Task sequence variable IsDesktop / IsLaptop / IsServer equals true / false" - create a batch file and call devcon.exe checking the existence of hardware (devcon could be found and downloaded by Microsoft, there are different versions for x86 and x64): devcon.exe find "USB\VID_413C*" | find.exe /i "USB\VID_413C&PID_8116&MI_00\7&12298780&0&0000">nul if errorlevel 1 goto next rem setup software ... :next rem skipped - use VBS to query WMI information ComputerType.vbs On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 For Each strComputer In arrComputers Set objWMIService = GetObject("winmgmts:\\localhost\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems WScript.Echo "IdentifyingNumber:" & Trim( objItem.IdentifyingNumber ) WScript.Echo "Name:" & Trim( objItem.Name ) WScript.Echo "Vendor:" & Trim( objItem.Vendor ) WScript.Echo "Version:" & Trim( objItem.Version ) Next Next getComputerType.cmd set comptypvbs=<pathToFile>\ComputerType.vbs for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Vendor:"') do set ci_vendor=%%a for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Name:"') do set ci_name=%%a for /f "tokens=2* delims=:" %%a in ('"%SystemRoot%\System32\cscript.exe" //NoLogo %comptypvbs% ^| "%SystemRoot%\System32\find.exe" /i "Version:"') do set ci_version=%%a rem Dell D620 :D620 if /i "%ci_vendor%" neq "Dell Inc." goto T400 if /i "%ci_name%" neq "Latitude D620" goto T400 echo Dell D620 recognized... rem install Dell D620 software goto end rem Lenovo T400 :T400 if /i "%ci_vendor%" neq "LENOVO" goto W701 if /i "%ci_version%" neq "ThinkPad T400" goto W701 echo Lenovo T400 recognized... rem install Lenovo T400 software goto end :end Regards, Nils.
  2. Have you set up your unattend.xml properly? I had to enter the auto logon username and password.
  3. Hi, you have imported a Windows 7 from your DVD. So please try this: Create a new task for deploying and capturing just the plain Windows 7. You do not need to use a product key yet. After this update your deployment share, which may create new boot images. Import them into the WDS and restart WDS. Reboot your client computer and start from PXE. Run your test task sequence, but do not join a domain. The wizard should now allow you to capture this image. Do this. After this procedure has run succesfully, you should have a new image which you import to your operating systems. During the import select "Custom image file" and "Copy setup files from specified path", selecting your Windows 7 DVD import. After this create a new test task deploying this captured image. If this all work, you should be able to modify your installation.
  4. Hi, I need to detect the WiFi / WLAN interface of a computer using WMI or something else. The only way I found is currently to use the WMI filter CIMV2: SELECT Description, DeviceID, NetConnectionID FROM Win32_NetworkAdapter WHERE PhysicalAdapter=True and use the result of the "Description" field to check against the registry values of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\xxx\*MediaType where xxx is a 4 digit value, i.e. "0007". As far as I found out, *MediaType = 0x0 is used by LAN interfaces, the value of 0x10 is used by WiFi adapters. Is this a good way? Could you please check this registry values, if someone have a different entry for *MediaType on the WLAN interface? The reason for this is I have to disable the WLAN interface if a network cable is plugged into the LAN interface, and enable WiFi if the cable is disconnected. Regards, Nils.
  5. Which tool do you use for deploying? Using MDT 2010 it is possible to enter the KMS key into a task sequence. And if you are using MAK, the VAMT can send the MAK key to the client. Regards, Nils.
  6. @CoffeeFiend: that's it. It looks pretty good, I'm testing the script on some machines. Thank you.
  7. Yes. You have to create a task sequence for Windows and applications installation first. Than you run this task sequence and for the capturing process the computer must not be joined to a domain. After the installation the computer should be captured, maybe you have to reboot manually to start the capture process. After this you'll find the captured image in the "captures" folder and you could import this image as a new operating system. Now you can create a new task sequence for deploying this captured image.
  8. Hi, I'm looking for a solution to detect if an optical drive with writing capabilities is present during unattended setup. I thought it might be possible with devcon.exe. But I do not find a usable method. Since we have a lot of different hardware the hwid is not a usable solution. But some software packages recognize if a drive is writeable so there must be a method for detecting. Background: I want to install CD Burner XP only on computers which have a CD or DVD writer. So I need to query from command line or vbs. Regards, Nils.
  9. Hi, just a question: did you delete the profile of your test user after you changed the defualt user profile? The new values for a default user will not be applied to existing profiles. Best regards, Nils.
  10. Hi, we don't like to have too much images so I create a "medium sized" image with applications for all machines and capture this. This image will distributed to all machines and than the software which is different for some kind of machines will be installed. But now I have to find a way that a user could not break the installation because he / she thinks it is finíshed (the windows desktop is shown) or try what the setup user could do on the network. Regards, Nils.
  11. Hi, we are using MDT 2010 and I've choosen to deploy a captured Win 7 image to our clients. During the deployment there should some additional software be installed regarding on the hardware. But I don't like that the explorer.exe ist loaded because it will start the complete desktop. On Win XP the RunOnceEx key from the registry was used to install software and while the software was setting up the explorer.exe wasn't loaded. Is there a possibility in Windows 7 and MDT 2010 to prevent loading the Win desktop until the setup has finished? The problem is while the installation admin is logged in a user could do enough things which he / she shouldn't. One thing I could do is to run an early task which lock's the mouse and the keyboard. And after the installation I could unlock the system. I'm not sure if the password protected screen saver would be an alternative beacause I install at least one piece of software whichs setup is controlled by AutoIt / AutoHotKey. Any ideas? Best regards, Nils.
  12. I didn't find a really good solution. But this works for me: I created two tasks, one for the Win 7 and common application installation (reference setup), and another for the final deployment. In the first I use the biuld in partitioning so the capture will work. The second one will use diskpart and text files depending on the variable state. So the reference setup will always wipe the hard disk, the deployment will only repartition once. If a re-installation is necessary the data on the notebooks (drive D:) should be kept. Since the data has to be backed up it would not be a big problem if the partition is destroyed, but it is a big waste of time if 50GB or more has to be copied from the network to a local encrypted drive.
  13. Hi, ok, the partitioning seems to work, but now I can't capture and image anymore. If I PXE boot and select "Run the Deployment Wizard to install a new Operating System", the select my testing task (and answer the other questions) and select "Capture an image of this reference computer", Windows 7 installs, sysprep is called and reboot the computer to Windows PE. But then I get the first question of the PXE Win P boot ... and the system won't be captured. Does the MDT internal disk partitioning (ZTIDiskpart.wsf) something else? I tried to find out what happend, but found nothing yet. If I disable my partitioning and enable the default, everything is fine. I also tried to partition without the BitLocker partition, but this also won't work. Any ideas?
  14. Hi, ok, I do the following trick now (MDT 2010, installation task): 1) set a new variable MYREPARTITION=true. 2) set the variable MYREPARTITION=false if all of the following WMI requests are true: SELECT * FROM Win32_DiskPartition WHERE DiskIndex=0 AND Index=0 AND Size>83886080 AND Size<125829120 SELECT * FROM Win32_DiskPartition WHERE DiskIndex=0 AND Index=1 AND Size>30064771072 AND Size<34359738368 The first checks if the BDE boot partition exists, which should have 100MB, the check is if the size is between 80MB and 120MB. The second select checks for the system partition, whichs size should be between 28GB and 32GB. 3) Repartition and format the hard disk using a textfile, if MYREPARTITION is true. 4) Only format the hard disk using a textfile, if MYREPARTITION is false. I use this four steps because there is no if - then - else possibility. The repartition and format text file contains: SELECT DISK 0 CLEAN CREATE PARTITION PRIMARY SIZE=100 SELECT PARTITION 1 FORMAT FS=NTFS LABEL="Boot" QUICK ATTRIBUTES VOLUME SET NODEFAULTDRIVELETTER ACTIVE CREATE PARTITION PRIMARY SIZE=30720 SELECT PARTITION 2 FORMAT FS=NTFS LABEL="System" QUICK ASSIGN LETTER=C CREATE PARTITION PRIMARY SELECT PARTITION 3 FORMAT FS=NTFS LABEL="TrueCrypted" QUICK ATTRIBUTES VOLUME SET NODEFAULTDRIVELETTER EXIT And the format only text file looks this: SELECT DISK 0 SELECT PARTITION 1 FORMAT FS=NTFS LABEL="Boot" QUICK ACTIVE SELECT PARTITION 2 FORMAT FS=NTFS LABEL="System" QUICK ASSIGN LETTER=C EXIT Maybe this might help someone else. I know that this is not the solution I was looking for, but after this the laptops should be setup identically. And it is possible to use more of this constructs for separate setups of desktop pcs and notebooks. Regards, Nils.
  15. Yes, it is the same installation. And I'm not looking for a wrapping script, just the GUI partitioning tool from the Win 7 DVD. I'll tried your suggestion, but at this point some files (drivers) are already copied to the hard disk. So this won't work. A wrapping script like ZTIDiskpart.wsf might be possible, but this is not really the solution I'm looking for.
  16. Hi, I'm distributing the Windows 7 using MDT 2010. My problem is the partitioning of the hard disk. The default entry in the task will kill all partitions and create the small BDEdrive and one big partition. On our notebooks we have allready a second partition for the user documents, so I don't like to get all partitions destroyed. I modified the task so it will only repartition if the existing partitions doesn't match using a WMI filter. But then the OS partition won't be formatted. The second problem is we have some notebooks with a diagnostic partition. At least, all the automatics I could plan won't be as safe as it could be. The best way for me would be running the Windows 7 partition wizard which will be called if Windows is installed from the DVD. But I can't find anything on the DVD which looks like this wizard, I also extracted the boot.wim, also I can't find anything there. What else could I do? An other partitioning tool might be a solution, but it should also create the BDEDrive automatically. In the second step it would be nice if the partitioning would be able to return the partiton number for setup, so the Windows image would be distributed to this partition. It would also be ok to create some distribution tasks and select the right one using WMI. Best regards, Nils.
  17. @Cluberti: I tried something like this before, using AutoHotKey and the included WindowSpy, but I can't get any usefull information from the network location window. At the moment I'm trying an other solution with adding some registry keys for the network. Edit: a working solution seems to be the following. I added the following tasks to the unattend.xml: <settings pass="specialize"> ... <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <RunSynchronous> ... <RunSynchronousCommand wcm:action="add"> <Order>100</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" /v NetworkList /t REG_MULTI_SZ /d "" /f</Path> <Description>Clear network list</Description> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>110</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\FirstNetwork" /V "IconPath" /t REG_SZ /D "%WINDIR%\system32\NetworkList\Icons\StockIcons\Office" /f</Path> <Description>Icon for network connection</Description> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>120</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\UPnP Device Host\Devices" /F</Path> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>130</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\UPnP Device Host\Providers" /F</Path> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>200</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{AA3A7BFF-8FBF-46CA-AF89-3F69BFFC1FD8}" /v ProfileName /t REG_SZ /d "$$$ourdomain$$$" /f</Path> <Description>Network Profile Name</Description> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>210</Order> <Description>Network Profile Description</Description> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{AA3A7BFF-8FBF-46CA-AF89-3F69BFFC1FD8}" /v Description /t REG_SZ /d "$$$ourdomain$$$" /f</Path> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>220</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{AA3A7BFF-8FBF-46CA-AF89-3F69BFFC1FD8}" /v Category /t REG_DWORD /d 00000002 /f</Path> <Description>Network Profile Category</Description> </RunSynchronousCommand> <RunSynchronousCommand wcm:action="add"> <Order>230</Order> <Path>reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\{AA3A7BFF-8FBF-46CA-AF89-3F69BFFC1FD8}" /v CategoryType /t REG_DWORD /d 00000002 /f</Path> <Description>Network Profile Category type</Description> </RunSynchronousCommand> </RunSynchronous> </component> ... </settings> You have to change the network domain name, in the code above I wrote "$$$ourdomain$$$". The registry profile ID ({AA3A7BFF-8FBF-46CA-AF89-3F69BFFC1FD8}) is the one I found after a Windows 7 was installed (there is just one in the registry on my system). Maybe the ID is different on other networks. The entries are based on the following thread: Found a workaround for the Network location bug Thanks for the help. Nils.
  18. After a few tries I got a working Autounattend.xml from my unattend.xml (an empty Computername and Produkt Key field is a problem, commenting them out will work better). But after the setup and the first run of Win 7 the dialog for the network comes up again. In my older posts I forgot to tell that the dialog asks for a location for our company network. Edit: we use a Windows Server 2003 based AD.
  19. Yes, I'm using MDT 2010. And the WIM is nearly original, I just added (using MDT) newer Intel Chipset and S-ATA drivers. Everything else is configured in MDT. I haven't used a tool like vLite. I also have configured some settings in the "Rules" tab of the deployment share, and the only which might touch the network settings is the domain join. I'll try to create an ISO image.
  20. Thank you for the answer. But I don't use SysPrep because I will distribute small Windows images and install the applications in the traditional way. So I will just ignore the network location window. Regards, Nils.
  21. Hi, @MrJinje: I had this setting allready configured, but the dialog is still coming up.
  22. I install Windows 7 unattended at the moment, including all the programs. The question comes up after deploying the (more or less) default Windows 7 image through WDS and starting Windows and the automatic logon. So SysPrep hasn't run yet.
×
×
  • Create New...