Monday, December 26, 2011

Auto KMS schedule fix

Fix for Auto KMS (EZ-Activator / Microsoft Toolkit) schedule (it wants to run at every reboot + every day, while required only once per 180 days, so we changing it to run once per month).

Place these files at AutoKMS folder and run AutoKMS.bat by hands (from admin account) once.


AutoKMS.bat
c:
cd c:\windows\AutoKms
start /WAIT AutoKMS.exe
c:
cd c:\windows\AutoKms
powershell -command "Set-ExecutionPolicy RemoteSigned"
powershell -file autokms.ps1 > autokms.schedulelog
powershell -command "Set-ExecutionPolicy AllSigned"

AutoKMS.ps1
$n = "AutoKMS"
$s = new-object -com("Schedule.Service")
$s.connect()
$f = $s.getfolder("\")
$t = $f.gettask($n)
$d = $t.Definition
$r = $d.Triggers.Item(1)
$r.DaysInterval = 30
$r = $d.Triggers.Item(2)
$r.Enabled = $false
$a = $d.Actions.Item(1)
$a.Path= $a.Path.replace(".exe", ".bat")
$f.RegisterTaskDefinition($n, $d, 0x24, $null, $null, 5, $null)

Saturday, September 24, 2011

Receiving fax (manually) with Samsung SCX-4623FN MFD


Recently we had bought a Samsung SCX-4623FN multifunction device (MFD or MFP). We were very happy with our purchase for some days, until I found we can’t receive a fax in manual mode (during call, especially if it is outgoing call). In some cases you can ask other party to call you back and wait for MFP to answer to incoming call automatically, but as you understand that is not perfect solution. Googling, forums, Samsung support – nothing helped.
For the next 3 weeks I was spending several hours each few days playing with MFD trying to solve that problem. One day it suddenly worked for one time, but then I wasn’t able to reproduce that for another hour or two. Ouch :) Anyway, finally I found a way to do it, and here is my instruction (to save your precious time).

This method was only tested with SCX-4623FN and Panasonic DECT phone, but should also work with other Samsung MFDs (I’m not so sure about other manufacturers).

How to receive fax in manual mode with Samsung MFD:
  1. During outgoing or incoming calls. The phone (one you are speaking with) SHOULD be plugged into EXT socket of MFD.
    1. Continue talking on the phone until other party will turn on fax for sending.
    2. Switch MFD to the Fax mode (with first button of Fax/Copier/Scanner buttons column). This might not be required, but it is safer to do it, than not.
    3. Press Off Hook button (small button with Handset close to Start button). Phone will become muted (you won’t hear the other party), but sound will appear from MFD speaker immediately.
    4. Press Off Hook button again. Sound will reappear in phone, MFD might show some text on the screen ("Enter the number to dial and press start" or some other crap).
    5. Dial *9* on the phone. MFD should show “Receiving fax…” on the display. Dial *9* again if it is not appearing.
    6. Try to repeat from 3) in case it didn’t work out.
  1. During incoming call (only if phone and fax ringed at least once).
    1. Answer to call from the phone plugged into MFD EXT socket, continue talking until you will hear other’s party Fax tones.
    2. Switch MFD to the Fax mode (with first button of Fax/Copier/Scanner buttons column). This might not be required, but it is safer to do it, than not.
    3. Press Off Hook button (small button with Handset close to Start button). Phone will become muted (you won’t hear the other party), but sound will appear from MFD speaker immediately.
    4. IMPORTANT: Hang up the PHONE (not MFD device).
    5. Press Start button on MFD device. MFD should show “Receiving fax…” on the display.
You can find the same instructions in Russian here: прием факса вручную на МФУ Samsung SCX-4623FN (при исходящем звонке).
seo: принять получить получение факса вручную исходящий звонок

Wednesday, September 14, 2011

Adobe bug: apps terminated after 2 minutes

I spent several hours today trying to resolve the following problem: after several minutes from start, any program from Adobe Master Collection 5.5 (Photoshop CS5.1, Illustrator, Premier) will show message box with following text (MSVCR90.dll was mentioned in caption):

Runtime Error. This application has requested the Runtime to terminate it it an unusual way.

Google or Adobe Support Forums were not helpful at all, but finally I found answer at one russian forum (forum.ru-board.com, author: romby): disabled AdobeAAMUpdater in windows scheduled tasks.
Indeed, several days ago while performing background processes cleanup, I disabled that AdobeAAMUpdater-1.0-%computername%-%username% task since I don't need automatic every day checking for Adobe products updates at this particular computer. I never started any of Adobe products until today, and since some time passed I never suspected my action as reason for that problem. Re-enabling scheduled task fixed the problem, and scheduling it for the first run on 01.01.2050 did no harm and caused no failures.

While googling  for solution I found a lot of questions regarding similar message boxes (even for much older releases), but I'm not sure if they have the same reason. Anyway, I can't understand how and which Scheduled Task checking code path can lead to such catastrophic program failure (awful job, Adobe), so I just hope that post will be helpful for some of you, folks.

Monday, July 25, 2011

WinApi bug

One of computers in office (Win7 ultimate without any SPs) shows really strange behavior of FindFirstFile/FindNextFile winapi functions (and DIR command too, since it based on them, like any other high level methods): *.tif search mask doesn't return files with .tiff extension (2 f characters at the end).
Same search mask returns both .tif and .tiff files on all other computers, with all different kinds of OSes: win7, win7sp1, winXPsp3, etc.
Looks like major OS compatibility breakdown :)

Sunday, January 23, 2011

ZTE USB modem ZeroCD activation

After installing Vodafone USB modem (ZTE k3571-z) software on the Windows XP it considered the modem won't be used at any other places and disabled ZeroCD (drivers/software CD-ROM emulation based on modem built-in flash) functionality completely.
Windows 7 one same computer detected modem and installed the drivers successfully, but nothing was working properly without the Vodafone (or any other generic ZTE) software. The solution was found at this page:
open any terminal program and use it to connect the main modem port (you can find one at Control Panel/Modems applet), enter the following commands:
AT+ZCDRUN=F
AT+ZCDRUN=9

Reinsert modem, the system should find a new CD-ROM disk and propose to start the modem software installation. Might also work with other ZTE modem's.
SEO: ZTE k3571Z switch flash disk mode cd-rom terminal AT

Sunday, November 28, 2010

Unlock for ZTE K3571-Z

Found some unlocking application for  ZTE K3571-Z (and may be some others ZTE, HUAWEI, etc.) modems. Seemed to work for me...
Get it there.
You'll have to register on forum to get download link (I don't want to steal credits for it)...

Sunday, June 20, 2010

.net 1.1 (vs2003) applications on Windows 7 x64

I needed to create a demo application (LARGE one) built with Net 1.1 Framework for demonstration on Windows 7 x64 computers (it was just easier than prepare a Net 3.5 version). I've met several problems this way, may be some one will find this information useful:

1. Windows 7 misses C-Runtime components for Vs2003, I mean MSVCR71.DLL file. If your program is using it, you should redistribute it (and place it in your program binaries directory or into System32 (for x86 windows)  / SysWow64 (for x64).

2. Emulation (or backward compatibility) of  1.1 framework works fine withing Windows 7 (framework 3.5sp1 integrated), beside one particular moment: NativeOverlapped object. Type of EventHandle field of this object was SILENTLY changed from int to IntPtr in move from Framework 1.1 to 2.0. This is very funny, since now any 1.1 programs using this object won't work at frameworks >=2.0 at all, with error looking like "Unhandled AppDomain Exception (CLR is terminating: True): System.MissingFieldException: Field not found: 'System.Threading.NativeOverlapped.EventHandle'.".
I don't know how you can help yourself if you haven't got source codes of net 1.1 application, otherwise the solution is simple: replace all direct accesses to this (EventHandle) field with indirect one, like this:

Considering this declarations
        NativeOverlapped addrChangeOverlapped = new NativeOverlapped();
        ManualResetEvent addrChangeEvent = new ManualResetEvent(false);


It was (in our application):
        addrChangeOverlapped.EventHandle = addrChangeEvent.Handle.ToInt32();




It become (in version compatible for execution with net 3.5):
        IntPtr aceHandle = addrChangeEvent.Handle;
        FieldInfo aceFI = typeof(NativeOverlapped).GetField("EventHandle");
        aceFI.SetValue(addrChangeOverlapped, 

               aceFI.FieldType == typeof(int)?(object)aceHandle.ToInt32():aceHandle);