Archive for Computing

Print Spool service has stop and printer stop working

Print Spool

I came across this problem on at work today.

Printer gone missing and first thing I checked was print spool service and I notice it has been off in service.smc, try re-enable it and it stop itself after a little while…

Turns out there is a cache problem on the spool printer files issue.

Removing files in C:\Windows\System32\spool\PRINTERS\*, restarting “Print Spooler” service solved the problem.

Excel popup issue on opening csv file with extension xls

I am currently working on some files with csv data in a xls file, and Excel popup an alert everytime it tries to open it.

“The file you are trying to open, ‘[filename]’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?”

Clicking Yes simply open the file, and No to quit.

This annoying popup is “stealing” focus of windows and gives me problem on my scripts.

A bit of searching comes with a Registy edit to suppress this popup.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]
“ExtensionHardening”=dword:00000000

This works with Office 2010 and it solved my problem, kind of…

Link
MSDN Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site: http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx

Downloading youtube video by CLI in Ubuntu


群星-《寶記正傳Part 1》MV

I came across this song the other day in a local pub with old buddies, so I did a youtube search and turns out it was in youtube, like it so much I think it can go to my video list on my new Nexus 7 FHD.

There are lots of tools to download youtube video, but don’t we just love CLI?

youtube-dl is the tools.

> sudo apt-get install youtube-dl
you will need to make sure it is in the latest version,
> sudo youtube-dl –update

and download with:
> ~/youtube-dl http://www.youtube.com/watch?v=wGYXp563FKM
[youtube] Setting language
[youtube] wGYXp563FKM: Downloading video webpage
[youtube] wGYXp563FKM: Downloading video info webpage
[youtube] wGYXp563FKM: Extracting video information
[download] Destination: 群星-《寶記正傳Part 1》MV-wGYXp563FKM.mp4
[download] 100.0% of 149.55MiB at 309.02KiB/s ETA 00:00

I am now enjoying it on my devices!

SPFS.Context menu in Explorer right click menu.

I am very picking when it comes to my right-click options.

I suddenly notice this “SPFS.Context menu” appears in my right-click options, quick googleing appears that is a leftover for SkyDrive Pro Microsoft Office 2013 preview.

A quick Regedit fixes the problem.

Links
Microsoft Community – what is SPFS. ContextMenu?

3TB Hard Disk cannot be access in Windows 8

Minimus USB 3

I recently obtain a couple Lacie Minimus USB 3 casing from a friend, they were RMA but in great condition, price were very great so yeah I took a couple..

During the Easter holiday as usual I was sick (Flu again) so I have the extra time to do some house keeping, so I decided to clean up a bit on my “Harddisk Mountain”..

Everything went smooth, but I was having problem with one of the 3TB Seagate ST3000DM001 9YN166 with the case, the problem HDD works fine with directly SATA connection to mainboard but not with the case, it does not mount correctly, I cannot even create GPT/MBR nor format it in Windows (All option was grey out), while I have another same HDD (same model and serial, same batch) with the case running just fine.

Took me few hours of Google, which most of the answer were not that related (Mostly about 3TB GPT issue, which of coz not the problem in our case), and finally I came across some post complaining about formatting drives with Acronis TrueImage installed, and Bingo, that seems to be the problem we have.

Long story short, seems Acronis TrueImage is not working well with Windows 8 build-in Disk Management, I will have to add the disk from TrueImage instead of Windows build-in function.

acronis_trueimage_000

acronis_trueimage_001

Launch Acronis True Image, Go to Add new disk, and select the disk (this is also confuse, it was marked as “Unsupported” but it would work, click next and create a GPT disk, follow the screen and finish, and now we are good to go on formatting it under Windows build-in Disk Management.

Anyway when I do my search I came across Lacie support page with Firmware upgrades for the Minimus 3 USB, is always good to update while we can.
Lacie – LaCie Win USB Firmware Updater

HP Lasterjet P2035n on Windows 7 Home Premium

I need to setup a network printers (HP Lasterjet P2035n) at work on Windows 7 Home Premium (64bit)

Went to Devices and Printers. Add a printer, Add a network, wireless or Bluetooth printer, next, everything went smooth…

Until I try to print a page, the printer keeps on printing until there is no paper in tray, I cannot even cancel the print queue…

A bit of search results me in the page on answers.microsoft.com, seems this is a known problem since 2009, I wonder what HP or Microsoft has been doing for this problem to still exist in 2013?

Anyway the quick solution, after you setup the printer, before you do ANY print job, right click on the Printer > Printer properties > Ports > Untick “Enable bidirectional support” and it should fix the issue.

Links:
Answer.microsoft.com – HP P2035n (network printer) is printing non-stop instead of a single page after upgrade to Win-7 from Vista Home Premium.

Checking TRIM enabled or disabled on Windows.

Recently I built my new computer set, and I installed a Intel 330 120GB SSD as my OS drive.

I was reminded by many to make sure TRIM command has been enabled to prevent SSD performance degrade, as of many search and report, TRIM was suppose to be enabled by default on Windows 7, anyway just to be sure.

in CMD>
>fsutil behavior query disabledeletenotify
DisableDeleteNotify = 0 (enabled)
DisableDeleteNotify = 1 (disabled)

Links
Wikipedia – TRIM
Tom’s hardware – How to enable TRIM

Blocking input when executing AutoHotkey scripts.

When we are doing some UI automation with AutoHotkeys script, we really would not like other user to be able to move / input which may result in errors.

By using:

BlockInput, on
Sleep, 2000
BlockInput, off

We would be able to block user input while Autohotkey still be able to work with the system (MouseMove, x, y etc)

I thought it works well till B tell me that it was not working on his box, I retested it and no it was not working on the new installed x64 win7 too (I am sure it was working before, on a x32 win7…)

It turns out it was related to UAC in Win7, scripts has to be run with Admin rights to get BlockInput working (it was not documented on the API ref.).

A bit of Google gave me some solutions:

Howtogeek – Add “Run as Administrator” for AutoHotkey Scripts in Windows 7 or Vista

Make the scripts into exe (compile scripts), setup registry to force autohotkey to run as Admin fixes the problem.

Links
Blockinput not working under windows vista

Canon Canoscan n670u on Ubuntu 12.04 Server.

Begins

I still own an old scanner given by my cousin (Thanks Cousin L, yes I still uses it), this scanner was dated back from the year 2k era, I think Aunt gave 1 set to me first and I left it behind in AUS for mate YX, and in about 2005 Cousin L decided to upgrade his second set so this was given to me too, nice scanner to have, it runs with the 5V power from USB (at the time most scanner require extra power), it does fair speed on scanning, it works without much trouble on Windows XP.

It was severing me well for quite some time, I even developed code allowing me to scan by Web (PHP > shell_exec to my share folder and dropbox, from my Android and iPad), till I upgraded to 64bits Windows, dear Canon decided NOT to support this device any more (Curse the person who decided to make a SAME Hardware configuration with 64bit support), I was left alone..

I just hate throwing good hardware away because some greedy company wants more $$ from my pocket! so I try to get my hands dirty and get so workaround!

By first, I try to run it under a Lited version of  32bit XP (which only consume me like 90MB RAM), it works ok but the problem is virtualbox runs USB device like a 99 years old man, scanning a page of  B5 would take me more than 4 minutes….well can’t complain much as it still works, since I only uses it to scan books cover, which I tolerated that for a while…

Recently, I started to use VMware instead of Virtualbox, which give me much better USB support and speed on VMs, so I started to make this old baby works again on my system…

On the VM, I am running Ubuntu 12.04 Server LTS.

By reading some Ubuntu hardware compatible list, it sure does list as supported natively by Ubuntu, good start!

Ubuntu Wiki – https://wiki.ubuntu.com/HardwareSupportComponentsScannersCanon
Hardware4linux – http://hardware4linux.info/component/11206/

A bit of search leads me to SANE, Scanner Access Now Easy, the scanning solution on Ubuntu, sounds good too!!
SANE – http://www.sane-project.org/

And I also found someone who happens to have the same scanner, sweet!!!

Wrestling a Canoscan N670U / N676U / LiDE20 scanner in Edgy – http://www.soours.com/wordpress/archives/2007/01/27/wrestling-a-canoscan-n670u-n676u-lide20-scanner-in-edgy/

Ok, lets start rolling:

Installation

apt-get install sane

apt-get install sane-utils

Done done, follow the above page example,

nano /etc/sane.d/plustek.conf

The part that confuse me a bit was the file, he actually means copying the block from the link http://linuxplusvalue.be/mylpv.php?id=302

The second part is to edit the dll.conf of SANE

nano /etc/sane.d/dll.d/dll.conf

What we do is just comment out all unneeded modules, you can follow the link too if you are unsure.

by running “lsusb” and “sane-find-scanner”

lsusb
>Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
>Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
>Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
>Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
>Bus 002 Device 009: ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20

sane-find-scanner

># sane-find-scanner will now attempt to detect your scanner. If the
># result is different from what you expected, first make sure your
># scanner is powered up and properly connected to your computer.

># No SCSI scanners found. If you expected something different, make sure that
># you have loaded a kernel SCSI driver for your SCSI adapter.

>found USB scanner (vendor=0x04a9 [Canon], product=0x220d [CanoScan], chip=LM9832/3) at libusb:002:009
># Your USB scanner was (probably) detected. It may or may not be supported by
># SANE. Try scanimage -L and read the backend’s manpage.

># Not checking for parallel port scanners.

># Most Scanners connected to the parallel port or other proprietary ports
># can’t be detected by this program.

Good, SANE sees my scanner, now to the scanning part, running “scanimage -L” (part of sane-utils, -L list devices)

scaniamge -L
>device `plustek:libusb:002:009′ is a Canon CanoScan N670U/N676U/LiDE20 flatbed scanner

I am good to go! a bit more digging for config needs, runs:

scanimage –help -d “plustek:libusb:002:009”

This output all the config I would need for scans.

My final command for the scan:

scanimage -d “plustek:libusb:002:009″ -x 215 -y 190 –resolution 600 –format=tiff > /mnt/ramdrv/output.tiff”

I am able to scan my books cover again!!!

Results

With the better USB speed on VMware compare to Virtualbox, I get my B5 book cover in 600dpi in about 118.5 secs, a bit below 2 minutes, not that bad for a 12 years old scanner!!

BTW, I do most of my scanning job now by my other scanner Canon P-150, which has a auto paper feeder and do double side, 5ppm (10pages) at 600dpi , but this 12 years old baby is still working good, colors are fine and I am happy it still serves me, and once again thanks to Aunt and Cousin L, I had such a nice scanner and fun with it!!!

Maybe when I have more free time, I shall make my old Webbase scanning code to work with my new Raspberry Pi, a Wireless (Power of coz) Scanning server is just fun!

Extra reading.

Scanning from Terminal – http://askubuntu.com/questions/106769/scanning-from-terminal
SANE how to – http://www.howtoforge.com/sane_xsane_scanner
SANE Documentation – http://www.sane-project.org/lj98/doc003.html
MAN scanimage – http://manpages.ubuntu.com/manpages/hardy/man1/scanimage.1.html
Canon USA n670u – Canon USA n670u

Backupmania…the urge of backups…..

I am currently being a bit of a urge over backups, thinks it is a good time to start doing more backups myself.

Currently, I had my own backup solutions by bits and bytes, example:
Mail – I setup my own mail server at base to do pulling ALL IMAP/POP account I had, off site backup on the mbox time by time.
Invoices – they are all in PDFs, update ones were synced by dropbox, older ones offsite archived.
MSN – message log are all exported to XML, offsite archived.
SMS – XML backup by Android App.
Calllog – XML backup by Android App.
Phone Calls – important ones are logged to .amr/.mp4, offsite archive time to time.
GoogleReader Stared – developed my own PERL script to back them up in HTML with a index file.
GoogleEarth – profile XML were synced across dropbox/SFTP, don’t want to miss this one, it contain most of the places/logs I being in the last few years.
Photos – don’t really backup at all, older photos are archived in older HDD when my routine upgrade (one/year), newer photos from S95 and mobile sync across dropbox.
Code, Personal – fun little code I dev for my own use were backup/sync var dropbox/SFTP
Code, Work – sync across 3 sets of computer, SFTP.

I would love to do more backups, example:
Twitter – my different twitter accounts, since I already did OAuth code on the other project, I think I can do my own backup code.
Google Chrome Bookmark – I really shouldn’t trust the cloud that much….
Google Contacts/Calendar – Hum…….did I even ever back that up??

I think I really really should spend some time on this….
but anyway, why the urge??? hum………