понедельник, 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

вторник, 9 февраля 2016 г.

Смена языка операционной системы

Сменить язык системы в Windows 7 Professional, в том числе с русского на английский, можно с помощью программы Vistalisator:

http://www.froggie.sk/download.html

P.S.
На сайте приведены системные патчи, которые имеет смысл поставить ДО смены языка!

понедельник, 21 декабря 2015 г.

Как запретить google переключать страницу поиска на национальную

Google, как известно, обажает переключать страницу поиска на "локальную", типа на ту страну, в которой он думает, что вы находитесь. А ему, понятное дело, лучше знать, где вы и что вам надо.

До 15 декабря 2015 года эту прыть можно было обойти, обратившись по адресу https://www.google.com/ncr 

Ныне эта опция перестала действовать (не смотря на то, что до сих пор есть на сайте поддержки google).

На данный момент удалось справиться с проблемой, установив плагин с сайта http://mycroftproject.com/google-search-plugins.html 

Теперь среди поисковиков появился 'Google US', который честно открывает страницу www.google.com и не даёт с неё уйти.