суббота, 24 ноября 2012 г.

[EN] Windows 7 boots up too fast, no network

Today I bought a new PC. After optimizing It, I enabled auto log on, installed some network-dependend software, put It to startup and restarted my PC.
After reboot, I saw messages from all software I put to startup about "No network found" or "Host unreachable", etc.
I noticed, that my OS loads starts thoose programs before network comes up. It was a problem.

First, I tried policy "Always wait for network on computer startup". But it did not work (I don't know why. Maybe because I have Auto LogOn, or my machine is not in domain, or because I have no password installed, or my user have a local profile, or (your reason here)).

I started thinking. First, I noticed that my adapter (Intel 82579V, e1express system driver) notifies system ater about 4 sseconds after cable is connected. I went to adapter properties and changed

  • Energy Efficient Ethernet: OFF
  • System Idle Power Saver: DISABLED
  • Priority & VLAN: Priority & VLAN DISABLED
  • Wait for Link: On
It gave me some time, but not enough yet. I had to make something to have a 100% chance to boot with network, if it is connected.
Here is my script on PasteBin (http://pastebin.com/gQLi5tCV)
I've added it to COMPUTER StartupScripts using GPEDIT.MSC
NOTE: Add this as: Executable: CSCRIPT.EXE Parameters: fileName.vbs, then put VBS file into
C:\Windows\System32\GroupPolicy\Machine\Scripts\Startup using Show files button
 Also I enabled Syncronious script execution to prevent async.

All works great!

Principies:
Script gets all physical (PhysicalAdapter = True)  ethernet  (AdapterTypeID = 0) adapters listed in system.
Then counts them, excluding VMware adapters (I use VMware, so, they are excluded)
If it found 1 or more adapters, it begins checking them for connection estabilished status each 500ms (objAdapter.NetConnectionStatus = 2), otherwise exits. If it finds connected adapter, it exits and continues boot.

If no adapters become connected in cnt_timeout = 120 seconds, it exits anyway

пятница, 3 августа 2012 г.

Cleaning Windows 7 print drivers

There was a problem cleaning Windows 7 print drives (HP 1214nfw MFP in my case). A simple howto:

  1. Stop Print Spooler service
  2. Go to C:\Windows\System32\Spool
  3. Create a BACKUP.YYYYMMDD folder
  4. Move Folders 'PRINTERS', 'PRTPROCS', 'SERVERS','TOOLS' here
  5. Go to  C:\Windows\System32\Spool\Drivers and move everything except COLOR folder to  C:\Windows\System32\Spool\ BACKUP.YYYYMMDD
  6. Start Print Spooler service. It must start without errors now
  7. Run command line tool as administrator
  8. Run MMC from command line
  9. Add Print Manager snap-in
  10. Clear everything from here
  11. Stop Print Spooler service
  12. Run REGEDIT from command line window
  13. Navigate to HKLM\System\CurrentControlSet\Control
  14. Export  HKLM\System\CurrentControlSet\Control\Print to file (for backup)
  15. Navigate one by one  HKLM\System\CurrentControlSet\Control\Print\Envinronments\(all branches)\Drivers\(all branches)\ and clear everything from here.
  16. Navigate one by one  HKLM\System\CurrentControlSet\Control\Print\Envinronments\(all branches)\Print processors\ and clear everything except "winprint" from here.
  17. Navigate to  HKLM\System\CurrentControlSet\Control\Print\Monitors and clear everything except 'BJ Language monitor', 'Local Port','USB Monitor','Standard TCP\IP Port','PJL Language Monitor'
  18. Navigate to  HKLM\System\CurrentControlSet\Control\Print\Printers and clear everything here
  19. Close regedit
  20. Return from backup C:\Windows\System32\spool\PRTPROCS\(*)\winprint.dll on It's place
  21. Start Printer Spooler service.


вторник, 31 июля 2012 г.

IIS7.5 FTP 530 error for Isolated users when Server name is too long

IIS7.5 Causes authorization fail when user tries to authorize as isolated local user when server name is longer than 13 letters.

Looking into logs (default to C:\inetpub\logs\LogFiles\FTPSVC* ) is explaiable.
I have server called DATACENTER-PROS2 (16 characters long). According to FTP logs 
2012-07-31 14:42:28 84.17.2.148 DATACENTER-PROS\shopftp 192.168.43.3 21 PASS *** 530 3 3 
So, IIS7.5 FTP takes only 15 symbols of computer name  ( Letter 2 is missing from logs)
Renaming computer solves the problem.

воскресенье, 18 марта 2012 г.

TSDNS (TeamSpeak DNS Server) на Debian Squeeze [RU]


Установка TSDNS (Сервер TeamSpeak DNS на Debian Squeeze)

Про TSDNS. TSDNS на самом деле не имеет ничего общего с DNS, но идеология очень похожа:
Вкратце TSDNS позволяет вам заменить страшный адрес IP:PORT DNS-адресом
Например, про обращении к server1.myts.com клиент на самом деле будет присоединен к myts.com:2001, а при обращении на server2.myts.com его отправят на myts.com:2002, а что-нибудь еще вроде something-else.myts.com будет послано на myts.com:2009 (обратите внимание - один и тот же хост, разные порты)

Когда вы присоединяетесь к somehost.example.com, ваш TeamSpeak Client пытается туда присоединится на порт 41144, затем на тот же порт к родительскому домену, затем к родительскому родительского и так далее. Так,например,если вы скажете TS3 присоединиться к server2.jaguar.melon.sweet.com, он пойдет следующим путем:

  • Попытается присоединиться на server2.jaguar.melon.sweet.com на порт 41144 (Но не сможет и даже имя не отрезолвит)
  • Присоединится к jaguar.melon.sweet.com на порт 41144 (Не получится, причина та же)
  • Присоединится к melon.sweet.com на порт 41144 (Удача)
  • Спросить melon.sweet.com про TS3-сервер server2.jaguar.melon.sweet.com. 
  • melon.sweet.com ответит "Я знаю такой, цепляйся к нему по адресу real-server.sweet.com:10002"
  • Прицепиться на real-server.sweet.com:10002
Итак, благодаря этой штуке,больше нет мороки с портами и IP-шниками.

TSDNS (TeamSpeak DNS Server) on Debian Squeeze [EN]

Installing TSDNS (TeamSpeak DNS server on Debian Squeeze)

About TSDNS. TSDNS is actually have nothing with DNS, but the idea is very near:
TSDNS allows you to replace port with subdomains.
For example, server1.myts.com will really go to myts.com:2001, and server2.myts.com will go to myts.com:2002, and any other like something-else.myts.com will go to myts.com:2009

When you connect to somehost.example.com, yout TeamSpeak Client tries to connect to it to port 41144, then to it's parent, then it its grandparent and so on. So, for example, if you say TS3 connect to server2.jaguar.melon.sweet.com, it will make theese things:

  • Try to connect to server2.jaguar.melon.sweet.com on port 41144 (Could not connect or even resolve a name)
  • Connect to jaguar.melon.sweet.com on port 41144 (Could not connect or even resolve a name)
  • Connect to melon.sweet.com on port 41144 (Connected)
  • Ask melon.sweet.com about server2.jaguar.melon.sweet.com. 
  • melon.sweet.com says us "I know, it refers to real-server.sweet.com:10002"
  • Connect to real-server.sweet.com:10002
So, in this way, you do not need to tell anyone port number anymore (just because it is unusable)

суббота, 17 марта 2012 г.

TS3 MySQL Debian Squeeze [RU]


Установка Team Speak 3 server с MySQL на Debian Squeeze


Сейчас попробую показать, как устанавливать TS3 3.0.2 на Debian Squeeze. Установка описывается для архитектуры amd64

TS3 MySQL Debian Squeeze [EN]

Installing Team Speak 3 with MySQL database server on Debian Squeeze howto


Here we will install TS3 3.0.2 server on Debian Squeeze sever. I'm discribing installation on amd64 architecture.