пятница, 10 января 2014 г.

How to Inject Drivers into Windows PE 3.0 .WIM in 5 Minutes

Крайне полезная статья о том, как можно добавить дополнительные драйверы в автоинсталляцию Windows:
http://www.commodore.ca/windows/inject_drivers_pe_3_0_windows_7/inject_drivers_winpe.htm

How to Inject Drivers into Windows PE 3.0 .WIM in 5 Minutes(or into a Windows 7 or 2008 R2 Image)
Prepared by Ian Matthews June 23, 2010
This is the followup to how to add drivers to a Windows PE 2.0 (Vista) .WIM file.  Today I needed to add a network driver to a Windows 7 PE 3.0 Boot Image I had in my Windows Deplopyement Services (WDS) 2008 Server.  After two hours of banging though half baked explainations a blogs I figured out the process. 
The nut of the problem is that the old Vista tools (WAIK and Deployment Workbench) have been updates with REQUIRED new tools.  Basically the PEIMG has been replaced with DISM.  In fact, as you will see, DISM will even do the work of IMAGEX.  In case you are wondering DISM stands for Deployment Image Servicing and Management tool... really great name... I suppose it would have made it too easy if they had just updated IMAGEX and PEIMG with new commands... but I digress.
The first thing you have to do is source the Deployment Workbench 2010 (yes, that is new and the old version with NOT work.  You can read/watch THIS if you have no idea how to get that started; the only thing to pay attention to is at the 1 minute mark in the video where it tells you how to source the WAIK (Windows Automated Installation Kit.)  Once you have this you are good to go.
  1. Get your .WIM file copied to your PC. file either:
    •  from the Windows 7 DVD (boot.wim or image.wim in the sources directory) or
    • pull it out of your WDS Server (if you have one, by right clicking on the image in question and selecting EXPORT)
  2. Create a folder called C:\TEMP.  Then create two subfolders; one called DRIVERS and the other called MOUNT
  3. Move your .WIM file to C:\TEMP\ and rename it CUSTOMBOOT.WIM
    • the rename is not required but I find it keeps everything straight in my head
  4. Download the drivers you need and put them in their own subfolder under C:\TEMP\DRIVERS (i.e. C:\TEMP\DRIVERS\ETHERNET\ and C:\TEMP\DRIVERS\SOUND\ ) . 
    • Don't put the driver .EXE file into that folder, you need to expand that .EXE and get the driver files out of it.
    • WinRAR and WinZIP work well for extracting .EXE files containing drivers.  For WinZip you simply drag the .EXE with the RIGHT MOUSE a few pixels and you will see WINZIP, EXTRACT TO... in the context menu.
    • Make sure you do not change the folder structure your driver .EXE file may have created. 
    • Use Windows 7, Vista (or at least WinXP drivers); DOS drivers will NOT work. 
  5. Click Start. Microsoft Windows AIK, Deployment Tools Command Prompt.
    • This will set a pile of software (i.e. DISM) in your "PATH" so you won't have to search for it.
  6.  Dism.exe /mount-wim /wimfile:C:\temp\customboot.wim /index:2 /mountdir:C:\teMount (i.e. expand) CUSTOMBOOT.WIM with the following command:
    • Dism.exe /mount-wim /wimfile:C:\temp\customboot.wim /index:2 /mountdir:C:\temp\mount
    • NOTE: if you are working with a Win 7 image (i.e. not PE3.0) then change the number to from a 2 to a 1
  7. Inject your drivers using the following command:
    • dism /image:"C:\Temp\mount" /add-driver  /driver:"C:\temp\drivers\nic\rt64win7.inf"dism /image:"C:\Temp\mount" /add-driver  /driver:"C:\temp\drivers\network\re
    • be sure to replace the word "nic\rt64win7.inf" with the name and path to your driver.
      • Dism.exe /mount-wim /wimfile:"C:\temp\customboot.wim" /index:2 /mountdir:"C:  Error: 123 The filename, directory name, or volume label syntax is incorrect.You will receive the following error if you do not enter the correct path and I personally found that the command just did not like the quotations:
         Error: 123 The filename, directory name, or volume label syntax is incorrect.
  8.  Dism /unmount-wim /Mountdir:C:\Temp\mount /commitCommit your update and recompress your updated image using the following command:
    • Dism /unmount-wim /Mountdir:C:\Temp\mount /commit
  9. Congratulations you are done!  If you want to push this to a Windows Deployment Services (WDS) Server read on.
  10. Start your WDS Console, right click on the boot image you wish to update, and select DISABLE
  11. Right Click on that same boot image and select REPLACE IMAGE.  The browse to wherever you have your CUSTOMBOOT.WIM and select it.
    • in my case I copied CUSTOMBOOT.WIM across the network from the VM I created it on to my W2003 WDS server prior to the REPLACE IMAGE STEP
    • this process will update the existing BOOT.WIM and REENABLE it.  There is no need restart services
    • You could delete your CUSTOMBOOT.WIM but I keep mine in case I want to add more drivers in the future.
I found THIS and THIS article to be useful, in case you have any other questions.

вторник, 17 декабря 2013 г.

Telnet - SMTP Commands (sending mail using telnet)

Крайне полезно бывает, для понимания что же творится с почтой:

http://www.yuki-onna.co.uk/email/smtp.html

telnet mail.domain.ext 25
Trying ???.???.???.???...
Connected to mail.domain.ext.
Escape character is '^]'.
220 mail.domain.ext ESMTP Sendmail ?version-number?; ?date+time+gmtoffset?

HELO local.domain.name 

250 mail.domain.ext Hello local.domain.name [loc.al.i.p], pleased to meet you
MAIL FROM: mail@domain.ext
250 2.1.0 mail@domain.ext... Sender ok
RCPT TO: mail@otherdomain.ext
250 2.1.0 mail@otherdomain.ext... Recipient ok


DATA
354 Enter mail, end with <CRLF>.<CRLF>
This is a test SMTP e-mail from console.
.
250-Transmission in progress. Stay tuned
250-Transmission in progress. Stay tuned
250 Message accepted for delivery
QUIT
221 See ya in cyberspace

вторник, 10 сентября 2013 г.

Если Windows не хочет активироваться...

...то вполне возможно, что майкрософту показалось, что у Вас нелегальная версия! И при этом система переходит в так называемый 'non-genue notification period' и не позволяет прямо так сразу активировать систему! Подождите пару дней.

вторник, 14 мая 2013 г.

Как избавиться от "Metro" и прочих радостей в Windows 8?

Ну да, популярная тема... :)

В интернете много полезных программ, позволяющих справиться с новой идеей Microsoft. Мне понравилось решение, которое называется Classic Shell.

На всякий случай прямая ссылка на сайт производителя.

среда, 8 мая 2013 г.

Xerox изобрёл свой WEB-доступ... или почему я не вижу свой принтер???

Оказывается, компания Xerox не знает, что такое HTTP и называет это своим, совершенно другим словом. Она зовёт это "Centerware IS"!

Так что при настройке сети лучше этот "протокол" не отключать, т.к. после этого жить с этим аппаратом становится затруднительно.

Вот тут ещё несколько советов от производителя:
Xerox CentreWare Internet Services: What if it Won’t Display?

воскресенье, 7 апреля 2013 г.

Не определялись некоторые флешки на компьютере...

Совершенно загадочная история... На компьютере Windows 7 x64 вдруг перестали определяться некоторые флешки и USB-диски. Преимущественно Transcend.

В списке устройств появлялась запись 'USB Mass Storage Device' в списке 'Other devices' с диагностикой 'System cannot find the file specified'.

Решение нашёл тут: в системе потерялся файл C:\Windows\Inf\usbstor.inf.

Скопировал файл с другого компьютера - эффект тот же самый, вроде как ничего не поменялось. Но, когда после этого тыкнул на этот неопределённый USB Mass Storage Device мышкой и попросил проапдейтить драйвер из интернета - всё заработало! Теперь, правда, операцию восстановления драйвера приходится проводить каждый раз, когда флешка или USB-диск не определяются, но их становится всё меньше (те, которые хоть раз определились, уже после этого подключаются нормально).

пятница, 5 апреля 2013 г.

Если есть проблемы с установкой и ругань на WMI (Windows Management Instrumentation)

Вот, набрёл на полезную штуку при попытке разобраться, почему не устанавливается SQL Express 2008 (прямая ссылка)




Hello,

While WMI may appear to be running on your server, it is possible that the service is corrupt.  This can be determined easily enough by opening up the "Dependencies" tab for WMI under Services; an error such as "WMI: Initialization Failure " may be thrown.

A solution to this would be to reinstall the WMI service.  This can be done by creating a batch file with the following contents and then executing:

@echo on
cd /d c:\temp
if not exist %windir%\system32\wbem goto TryInstall
cd /d %windir%\system32\wbem
net stop winmgmt
winmgmt /kill
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
goto End

:FixSrv
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
%1 /RegServer

:SkipSrv
goto End

:TryInstall
if not exist wmicore.exe goto End
wmicore /s
net start winmgmt
:End