пятница, 22 сентября 2017 г.

How To Add Drivers to Windows 7 ISO to Boot/Install USB 3.0

Introduction

Recently I came across a problem when attempting to install
Windows 7 onto a Dell Precision 7710. I would boot up with a DVD that
had an .iso image of Windows 7 installed on it, but when after clicking
the install windows button, I would get a notice that the installer
couldn't locate the CD/DVD driver and I needed to browse to locate it.
Well, I thought I would be smart and instead do the install via a USB
device. Same error. Well, how does this make sense? It's asking for a
DVD driver when using a USB device. That's like your car throwing a CEL
for the carburetor not working when you're using fuel injection.


This
issue is caused because the installer media doesn't have a driver to
install through a USB 3.0 port. You might ask, well why did the DVD
drive throw the error? Well, that's because the DVD drive was an
external because there is no internal DVD drive on this model laptop. So
I now know my problem. USB 3.0 drivers need to be added to the boot
media. Follow this guide and I'll show you how to accomplish this using
the CMD line and the DISM utility.









Steps

(9 total)

1. Download the USB Drivers


Now, I had all intention of describing this how-to
specifically for adding USB 3.0 drivers, but it can also be used for
adding any number of drivers to the boot media as well.




First thing you're going to do is to download the USB drivers from
either your computer's manufacturer or from your motherboard's
manufacturer. With the Dell Precision 7710 I went to http://www.dell.com/support, punched in my service tag number and proceeded to download an entire driver pack in .CAB format.






2. Extract the drivers


Depending on the type of file you downloaded, it could be
an .exe, a .cab, or a .zip, so you'll need to unzip the drivers out of
this file. Driver files are historically mainly .inf files, but you
don't need to pick and choose the individual files because this next
process makes it automatic for you. The DISM (Deployment Image Servicing
and Management Tool) is smart and will automatically grab the correct
files.




1. Create a folder on your desktop named 'Drivers'.

2. Create two folders inside of the 'Drivers' folder, 'mount' and 'USB'.

3. Extract or copy/paste the driver files directly into the 'USB'
folder. I used 7-zip to extract my driver files directly into the 'USB'
folder.






3. Cut the 'boot.wim' and 'install.wim' files


Locate these two files from within your boot media. This
is easy if you are using a USB drive instead of a DVD, so that you don't
have to reburn the DVD once we finish modifying these files.




Example: If the USB drive is plugged in and has been given drive
letter 'P:\' you will locate the 'boot.wim' and 'install.wim' files
within the path: P:\sources




It is best to just cut them out of the install media, but if you want
to have a backup copy you can copy and paste. You are pasting into the
'Drivers' folder on the desktop. Just make sure to overwrite the old
files with the new updated ones once we're finished with this process.






4. Open up CMD prompt as Administrator and navigate to the 'Drivers' folder 

on the desktop


Windows 7:

1. Start, type in cmd, right click on the icon and choose Run as Administrator

Windows 8:

1. Windows Key + Q

2. Move mouse to top right corner and search, type in Command Prompt, Right click and Run as Administrator.




Next, you will need to change the directory path so that it isn't pointing to the default of C:\Windows\System32.



Type in: cd C:\Users\%currentuser%\Desktop\Drivers - Then press Enter.

*Note: Make sure to change the %currentuser% to that of the user profile where the 'Drivers' folder was saved.






5. Update the 'boot.wim' file.


In the cmd line now displaying the cd pointing to the right directory, type in these commands pressing enter after each one.



dism /mount-wim /wimfile:boot.wim /index:2 /mountdir:mount

Explanation: This command mounts the boot.wim file, index points it
to the correct boot parameters for the correct OS, and /mountdir:mount
points it to mount the file to the 'mount' folder we created in this
directory earlier.




dism /image:mount /add-driver:"USB" /recurse

Explanation: This command automatically grabs the driver files that
it locates in the 'USB' folder that we created earlier and copied the
drivers to. This can take a while depending on the number of driver
files that it locates.




dism /unmount-wim /mountdir:mount /commit

Explanation: This command unmounts the boot.wim file and saves the
information. Think of this as a file transfer/compression process.






6. Determine which index you're going to update the driver files for on the 'install.wim' file



This process wasn't necessary on the 'boot.wim' file, but
it is in the 'install.wim' file. Each version of Windows can have a
specific index number and we will need to locate which one it is in
order to issue the command for the version of Windows you plan on
installing. This is specific to the install media you are using because
some install media only comes with one version of Windows 7, such as
Professional, but some others may have multiple version of Windows 7,
such as Home, Ultimate and Professional, just to name a few.




Issue the following command to determine what your version is:



dism /Get-WimInfo /WimFile:install.wim



You'll see in the screenshot that I have an index of 1.





7. Update the 'install.wim' file.


You should still be pointed to the correct directory, so
now issue the following commands to update the 'install.wim' file, using
the index information you got from the step above.




dism /mount-wim /wimfile:install.wim /index:1 /mountdir:mount

Explanation: All exactly the same as the boot.wim file command, except the index is the only difference.




dism /image:mount /add-driver:"USB" /recurse



dism /unmount-wim /mountdir:mount /commit






8. Cut/Paste or Copy/Paste your new 'boot.wim' and 'install.wim' files


Since I used the Cut/Paste method to remove these two
files from the P:\sources location, I'm going to do the same to remove
them from the C:\Users\%currentuser%\Desktop\Drivers folder and place
them back into the P:\sources folder.




Wait for the transfer to finish. This is going to take a little bit
longer to copy back over to the flash drive because the files going back
in are larger than they were before due to the driver files that you've
added to it.






9. You're Done!


Take out the flash drive and pop it into the machine you
want to reinstall Windows 7 on. You should now find that you no longer
receive the pesky CD/DVD driver missing notice.










Conclusion

Thank you all for reading through this. This helped me greatly in
my time of need and these commands can be adapted to suit whichever
folder names you want to use. Good luck!







How To Add Drivers to Windows 7 ISO to Boot/Install USB 3.0

вторник, 2 мая 2017 г.

APIPA или странные IP адреса, вида 169.254.x.x

Microsoft, проявляя неуклонную заботу о пользователях, включает во все системы так называемый IP Autoconfiguration, что означает, что если компьютер не имеет прописанного IP адреса на интерфейсе и невозможности получить его от DHCP, он присваивает интерфейсу случайный адрес из серии 169.254.0.0/16
Ничего хорошего в этом случае не происходит, только с толку сбивает.
Запретить можно так:
  • открыть HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameter
  • добавить ключ IPAutoconfigurationEnabled(REG_DWORD)=0

Подробности тут: https://support.microsoft.com/en-us/kb/244268

Java в Firefox

Renable NPAPI Plugin Support in Firefox 52

If there’s a particular NPAPI plugin that you rely on there is (for now) a way to override Firefox defaults and re-enable NPAPI support.
Reader Grof has all the details.
“This is important, because some websites are still using Java plug-ins, like for example our government site for signing documents. You can’t work with government if no Java plugin is present,” he explains.
“But there is a way to enable Java, Silverlight etc NPAPI plugins in Firefox 52 using an about:config setting. Add new Boolean string "plugin.load_flash_only" and set it to false. Then restart the browser.”
That’s it; assuming your NPAPI plugins are installed correctly they should work as before.

http://www.omgubuntu.co.uk/2017/03/force-enable-firefox-52-npapi-support
 

понедельник, 20 марта 2017 г.

Как научить Google говорить по-английски

Как известно, google определяет на каком языке говорить и искать автоматически. Не каждый раз он правильно определяет местоположение компьютера. В том числе, на десктопе он пытается определить местоположение по IP-адресу.
Чтобы отучить его от этого надо проделать следующее:


1. Создать новый поисковик:
Settings -> Search -> Manage -> New с запросом https://www.google.com/search?q=%s
2. Сбросить текущие установки cookie запросом https://www.google.com/ncr

See https://productforums.google.com/forum/#!topic/websearch/ZagOo2X7ozQ

понедельник, 12 сентября 2016 г.

Подключение сетевого принтера из скрипта

Если надо подключить один или несколько принтеров через скрипт, можно использовать вот это решение:

Adding a network printer from the command line (or bat file)
@Echo Off
REM Change \\COMPUTER\PRINTER by your printer's UNC
REM Add printer
rundll32 printui.dll,PrintUIEntry /in /n\\COMPUTER\PRINTER
REM Set printer as default
rundll32 printui.dll,PrintUIEntry /y /n\\COMPUTER\PRINTER
Work on:
Windows Server 2008 R2
Windows Server 2008
Windows Server 2003
Windows 7
Windows Vista
Windows XP
Windows 2000
Using VBS script
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection "\\PrintServ\Canon"
WshNetwork.SetDefaultPrinter "\\PrintServ\Canon"

среда, 1 июня 2016 г.

Активация Microsoft Office 2010 через KMS сервер

Пусть KMS сервер имеет адрес kmsserver.company.com

Тогда скрипт для активации выглядит так:

cd C:\Program Files\Microsoft Office\OFFICE14

cscript ospp.vbs /sethst:kmsserver.company.com

cscript ospp.vbs /act

Найти KMS сервер в домене domain.company.com можно через запрос
nslookup -type=SRV _vlmcs._tcp.doman.company.com

См. ссылки:
https://blogs.technet.microsoft.com/odsupport/2011/11/14/how-to-discover-office-and-windows-kms-hosts-via-dns-and-remove-unauthorized-instances/

P.S.
Office 2016 иногда НЕ активируется из сети предприятия, но отлично активируется, если компьютер подключить напрямую в интернет.


вторник, 15 марта 2016 г.

Управление сервисами Windows из командной строки (Service Control)

Утилита sc – контролируем сервисы Windows из командной строки

Очень полезная утилита, позволяющая контролировать сервисы из командной строки (значительно более крутая, чем net start / net stop)

C:\> sc
DESCRIPTION:
        SC is a command line program used for communicating with the
        Service Control Manager and services.
USAGE:
        sc <server> [command] [service name] <option1> <option2>...


        The option <server> has the form "\\ServerName"
        Further help on commands can be obtained by typing: "sc [command]"
        Commands:
          query-----------Queries the status for a service, or
                          enumerates the status for types of services.
          queryex---------Queries the extended status for a service, or
                          enumerates the status for types of services.
          start-----------Starts a service.
          pause-----------Sends a PAUSE control request to a service.
          interrogate-----Sends an INTERROGATE control request to a service.
          continue--------Sends a CONTINUE control request to a service.
          stop------------Sends a STOP request to a service.
          config----------Changes the configuration of a service (persistent).
          description-----Changes the description of a service.
          failure---------Changes the actions taken by a service upon failure.
          failureflag-----Changes the failure actions flag of a service.
          sidtype---------Changes the service SID type of a service.
          privs-----------Changes the required privileges of a service.
          qc--------------Queries the configuration information for a service.
          qdescription----Queries the description for a service.
          qfailure--------Queries the actions taken by a service upon failure.
          qfailureflag----Queries the failure actions flag of a service.
          qsidtype--------Queries the service SID type of a service.
          qprivs----------Queries the required privileges of a service.
          qtriggerinfo----Queries the trigger parameters of a service.
          qpreferrednode--Queries the preferred NUMA node of a service.
          delete----------Deletes a service (from the registry).
          create----------Creates a service. (adds it to the registry).
          control---------Sends a control to a service.
          sdshow----------Displays a service's security descriptor.
          sdset-----------Sets a service's security descriptor.
          showsid---------Displays the service SID string corresponding to an ar
bitrary name.
          triggerinfo-----Configures the trigger parameters of a service.
          preferrednode---Sets the preferred NUMA node of a service.
          GetDisplayName--Gets the DisplayName for a service.
          GetKeyName------Gets the ServiceKeyName for a service.
          EnumDepend------Enumerates Service Dependencies.

        The following commands don't require a service name:
        sc <server> <command> <option>
          boot------------(ok | bad) Indicates whether the last boot should
                          be saved as the last-known-good boot configuration
          Lock------------Locks the Service Database
          QueryLock-------Queries the LockStatus for the SCManager Database
EXAMPLE:
        sc start MyService