Sunday, June 30, 2013

Thursday, June 27, 2013

HowTo Windows 7 x64, HP Pavilion dv6000, KA034EA#ABB, USB boot

This tutorial is for HP Pavilion dv6000 with AMD chipset and NVidia Graphic card.

I gues if your HP Pavilion dv6000 have product number KA034EA#ABB on the ass of your laptop then you can keep reading.
Otherwise you can take a look in here to find your own solution.

Back to case..
HP Pavilion dv6000 only boots from USB if the USB device in BIOS is configured as first boot device.
USB device on HP Pavilion dv6000 will not boot via boot device list (F9).

When you first install Windows 7 from USB after first reboot you need to go back to the BIOS setttings and set back the first boot device to Laptop HDD. Othervise the windows setup will launch again and you start the installation from beginning.

After windows setup is done the Wireless, LAN and WEB Cam driver will work out of the box.
Also there will be some audio installed, but the MediaCenter QuickPlay panel will not work.

Now you should install windows update including all hardware devices.
You can exclude language packs.

Windows updates will install HP QuickPlay, Symnatec pointing device, NVidia driver.

After first hundred of updates and restarting few times you computer you can clear windows update cache with
@echo off
net stop wuauserv
rd %systemroot%\SoftwareDistribution /Q /S
SC sdshow wuauserv
SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
wuauclt.exe /detectnow
This will speed up to find more updates quicker.

After windows is completely up to date and there are no hardware updates via windows updates you can finally install last updates:

Chipset driver (Coprocessor)
ftp://ftp.hp.com/pub/softpaq/sp36001-36500/sp36079.exe

Card reader driver (base system device)
ftp://ftp.hp.com/pub/softpaq/sp45001-45500/sp45112.exe

Here are mirror

Sunday, June 23, 2013

Friday, June 21, 2013

View message header, Outlook 2010


Open message in full screen and go File -> Info -> Properties

The black hole is message header

Wednesday, June 19, 2013

Windows Update (WSUS) reset

Simple windows update refresh
@echo off
net stop wuauserv
rd %systemroot%\SoftwareDistribution /Q /S
SC sdshow wuauserv
SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
wuauclt.exe /detectnow
Redirect to original windows update server. This can solve a lot of windows update problem.
@echo off
reg delete "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /f
net stop wuauserv
rd %systemroot%\SoftwareDistribution /Q /S
SC sdshow wuauserv
SC sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
wuauclt.exe /detectnow

Tuesday, June 18, 2013

Launchy as own portable console

The idea is to automatize launchy installation together with your most favourite and must have application.
http://www.launchy.net/downloads/win/Launchy2.5.exe

Install Launchy as portable version.

Do not launch the program yet.

The program is installed.
By default in launchy root directory it have 6 catalogues and and 10 files.


The Launchy.ini config file just contains only one setting
[General]
version=200
If you delete Launchy.ini then it will not longer work as an portable version. So keep mind to keep Launchy.ini side by side with Launchy.exe to make the application portable.

Click on the Launchy.exe first time and go to options.

Uncheck box about checking updates to make launchys startup more faster.

Since the program do not include option to rescan catalogue at startup make a work around to rescan catalogues after one minute when launchy goes at first time.


Close Launcy from system tray


The Launchy.ini contains:
[General]
version=250
donateTime=@Variant(\0\0\0\x10\0%{\xa3\x4h\x10l\xff)

[GenOps]
skin=Default
hotkey=134217760
showtrayicon=true
alwaysshow=false
alwaystop=false
updatecheck=false
decoratetext=false
hideiflostfocus=false
alwayscenter=3
dragmode=0
showHiddenFiles=false
showNetwork=true
wildcardFileSearch=false
condensedView=0
autoSuggestDelay=1000
updatetimer=1
numviewable=4
numresults=10
maxitemsinhistory=20
opaqueness=100
fadein=0
fadeout=20

[gcalc]
url="/search?source=launchy&q="
matchExpression="<h2 class=r style=\"font-size:\\d+%\"><b>(.*)</b>"

[runner]
cmds\1\name=cmd
cmds\1\file=C:\\Windows\\System32\\cmd.exe
cmds\1\args=/K $$
cmds\size=1
version=2

[weby]
sites\1\name=Google
sites\1\query="http://www.google.com/search?source=launchy&q=%1"
sites\2\name=Bing
sites\2\query="http://www.bing.com/search?q=%1"
sites\3\name=Yahoo
sites\3\query="http://search.yahoo.com/search?p=%1"
sites\4\name=Weather
sites\4\query=http://www.weather.com/weather/local/%1
sites\5\name=Amazon
sites\5\query="http://www.amazon.com/gp/search?keywords=%1&index=blended"
sites\6\name=YouTube
sites\6\query="http://www.youtube.com/results?search_query=%1"
sites\7\name=Wikipedia
sites\7\query="http://en.wikipedia.org/wiki/Special:Search?search=%1&fulltext=Search"
sites\8\name=Dictionary
sites\8\query=http://dictionary.reference.com/browse/%1
sites\9\name=Thesaurus
sites\9\query=http://thesaurus.reference.com/browse/%1
sites\10\name=Netflix
sites\10\query="http://www.netflix.com/Search?v1=%1"
sites\11\name=MSDN
sites\11\query="http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=%1"
sites\12\name=E-Mail
sites\12\query=mailto:%1
sites\13\name=IMDB
sites\13\query="http://www.imdb.com/find?s=all&q=%1"
sites\14\name=Maps
sites\14\query="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%1&ie=UTF8&z=12&iwloc=addr&om=1"
sites\size=14
version=2.2

[WebProxy]
hostAddress=
port=

[directories]
1\name=C:\\ProgramData\\Microsoft\\Windows\\Start Menu
1\types=*.lnk
1\indexDirs=false
1\indexExes=false
1\depth=100
2\name=C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu
2\types=*.lnk
2\indexDirs=false
2\indexExes=false
2\depth=100
3\name=Utilities\\
3\types=*.lnk
3\indexDirs=false
3\indexExes=false
3\depth=100
4\name=%appdata%\\Microsoft\\Internet Explorer\\Quick Launch
4\types=*.*
4\indexDirs=false
4\indexExes=false
4\depth=100
size=4

[calcy]
outputRounding=10
outputGroupSeparator=true
copyToClipboard=true

[Display]
pos=@Point(361 296)
Interesting that version number are changed.

I replace
2\name=C:\\Users\\Administrator\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu
with
2\name=%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu
to make Launchy more portable

Add new entry to support your own directory
5\name=Portable\\
5\types=*.lnk
5\indexDirs=false
5\indexExes=true
5\depth=100
and replace the size=4 with size=5.

Here is how it looks like at the end:
[General]
version=250
donateTime=@Variant(\0\0\0\x10\0%{\xa3\x4t'\xad\xff)

[GenOps]
skin=Default
hotkey=134217760
showtrayicon=true
alwaysshow=false
alwaystop=false
updatecheck=false
decoratetext=false
hideiflostfocus=false
alwayscenter=3
dragmode=0
showHiddenFiles=false
showNetwork=true
wildcardFileSearch=false
condensedView=0
autoSuggestDelay=1000
updatetimer=1
numviewable=4
numresults=10
maxitemsinhistory=20
opaqueness=100
fadein=0
fadeout=20

[gcalc]
url="/search?source=launchy&q="
matchExpression="<h2 class=r style=\"font-size:\\d+%\"><b>(.*)</b>"

[runner]
cmds\1\name=cmd
cmds\1\file=C:\\Windows\\System32\\cmd.exe
cmds\1\args=/K $$
cmds\size=1
version=2

[weby]
sites\1\name=Google
sites\1\query="http://www.google.com/search?source=launchy&q=%1"
sites\2\name=Bing
sites\2\query="http://www.bing.com/search?q=%1"
sites\3\name=Yahoo
sites\3\query="http://search.yahoo.com/search?p=%1"
sites\4\name=Weather
sites\4\query=http://www.weather.com/weather/local/%1
sites\5\name=Amazon
sites\5\query="http://www.amazon.com/gp/search?keywords=%1&index=blended"
sites\6\name=YouTube
sites\6\query="http://www.youtube.com/results?search_query=%1"
sites\7\name=Wikipedia
sites\7\query="http://en.wikipedia.org/wiki/Special:Search?search=%1&fulltext=Search"
sites\8\name=Dictionary
sites\8\query=http://dictionary.reference.com/browse/%1
sites\9\name=Thesaurus
sites\9\query=http://thesaurus.reference.com/browse/%1
sites\10\name=Netflix
sites\10\query="http://www.netflix.com/Search?v1=%1"
sites\11\name=MSDN
sites\11\query="http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=%1"
sites\12\name=E-Mail
sites\12\query=mailto:%1
sites\13\name=IMDB
sites\13\query="http://www.imdb.com/find?s=all&q=%1"
sites\14\name=Maps
sites\14\query="http://maps.google.com/maps?f=q&hl=en&geocode=&q=%1&ie=UTF8&z=12&iwloc=addr&om=1"
sites\size=14
version=2.2

[WebProxy]
hostAddress=
port=

[directories]
1\name=C:\\ProgramData\\Microsoft\\Windows\\Start Menu
1\types=*.lnk
1\indexDirs=false
1\indexExes=false
1\depth=100
2\name=%userprofile%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu
2\types=*.lnk
2\indexDirs=false
2\indexExes=false
2\depth=100
3\name=Utilities\\
3\types=*.lnk
3\indexDirs=false
3\indexExes=false
3\depth=100
4\name=%appdata%\\Microsoft\\Internet Explorer\\Quick Launch
4\types=*.*
4\indexDirs=false
4\indexExes=false
4\depth=100
5\name=Portable\\
5\types=*.lnk
5\indexDirs=false
5\indexExes=true
5\depth=100
size=5

[calcy]
outputRounding=10
outputGroupSeparator=true
copyToClipboard=true

[Display]
pos=@Point(361 296)
Backup this your own customized Launchy.ini.
Delete launchys directory and install it again like in start of this post.
Do not run it.

Paste and overwrite you predefined Launchy.ini config file.

Copy your own portable folder to Launchy's root directory.

Select Launchy directory and make as self extracting archive.

Click, click, click, ..

Go to Advance and click "SFX Options"

Write the place where default launchy should be installed. Here you can also write %appdata% to install launchy without administrative rights.

Add option to launch Launchy after startup

Make the installation in unattended mode

Configure launchy as start up application to launch Launchy automatically after computer restart.

Choose startup and write few data

This section will overwrite launchy folder if there already exist one

Press two times [OK] button to finally make self extracting archive.

When you launch your installer it will automatically create a startup item

Pretty cool :)

I do not know why but Lauchy rescan catalogs automatically after it has launched second time.

After minute is gone you are able to launch your own application by holding Alt and press Space then write the first letters of application and press Enter. Awesome and handy

Sunday, June 16, 2013

Rosy cheeks

Saturday, June 15, 2013

Google Drive silent install

Download offline installer:
https://dl.google.com/drive/gsync_enterprise.msi

silent-install.cmd
@echo off
set n=Google Drive
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
setlocal EnableDelayedExpansion
reg query "HKLM\SOFTWARE\%x%Microsoft\Windows\CurrentVersion\Uninstall" /s | find "%n%"
if not !errorlevel!==0 (
for /f "tokens=*" %%a in ('dir /b "%~dp0gsync*.msi"') do (
echo %n%
%systemroot%\system32\msiexec.exe /i "%~dp0%%a" /qn
)
) else echo %n% already exists!
endlocal

Friday, June 14, 2013

Create Windows Service, Visual Studio 2008


When you install Visual Studio 2008 you need only to install
Smart Device Programmability

Open Visual Studio and create new Windows Service application
Write a project name and keep in mind where the project is located.

Switch to code view

This is the default template. It looks like this

It will work out with no additional commands at OnStart function at this example so you can keep 1:1 like in screenshot.

Next steps will let you install later this service.
We can call this situation like "add your service the possibility to be intalled".
At the solution explorer right click at the project name and choos add -> Class..

Choose template Class and write the class name
MyWindowsServiceInstaller.cs

A new obejct class appears with the default content

A have never tell you but working with services need two additional References
Righht click at the references objects and choose Add Reference

Add System.Configuration.Install

Add System.ServiceProcess

The Reference window should loke like

Replace whole MyWindowsServiceInstaller.cs content with:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration.Install;
using System.ServiceProcess;
using System.ComponentModel;


namespace Apple
{
    [RunInstaller(true)]
    public class MyWindowsServiceInstaller : Installer
    {
        public MyWindowsServiceInstaller()
        {
            ServiceProcessInstaller serviceProcessInstaller =
                              new ServiceProcessInstaller();
            ServiceInstaller serviceInstaller = new ServiceInstaller();

            //# Service Account Information
            serviceProcessInstaller.Account = ServiceAccount.LocalSystem;
            serviceProcessInstaller.Username = null;
            serviceProcessInstaller.Password = null;

            //# Service Information
            serviceInstaller.DisplayName = "A is for apple";
            serviceInstaller.StartType = ServiceStartMode.Automatic;

            //# This must be identical to the WindowsService.ServiceBase name
            //# set in the constructor of WindowsService.cs
            serviceInstaller.ServiceName = "apple";

            this.Installers.Add(serviceProcessInstaller);
            this.Installers.Add(serviceInstaller);
        }
    }
}
Edit red fields to suit your needs.

At the end click Build -> Build Solution

Open command prompt in "Run as Administrator" mode

Change dir to
%windir%\Microsoft.NET\Framework\v2.0.50727
and now run
installutil.exe D:\MyProjects\Apple\Apple\bin\Debug\Apple.exe
Success story should look like this

Failed story is presented in next screen. This can occurs if you already have service with same name installed.

Now your service can be found under services

To uninstall your own service use
installutil.exe /u D:\MyProjects\Apple\Apple\bin\Debug\Apple.exe
it will report

Related:
https://www.youtube.com/watch?v=RSHWX2jPMyA
http://www.codeproject.com/Articles/3938/Creating-a-C-Service-Step-by-Step-Lesson-I
http://www.docstorus.com/viewer.aspx?code=7c7ccc28-6503-4779-877e-f350faab6741
http://projectys.wordpress.com/author/projectys/

Monday, June 10, 2013

What is a windows bug? Example on Windows 7


When you copy content with slashes and backslashes and
then you accidentally paste this content on file name.
Now the content in cliboard is damaged. All backslashes are gone.

For example you copy this content to the clipboard
@echo off
setlocal EnableDelayedExpansion
set sw=HKLM\SOFTWARE
set u=Microsoft\Windows\CurrentVersion\Uninstall
set k=
if not "%ProgramFiles(x86)%"=="" set x=Wow6432Node\
reg query "%sw%\%x%%u%\%k%" > nul 2>&1
if not !errorlevel!==0 (

)
endlocal
Then you accidentally paste the content to file name.

You recieve



You type a real file name and go inside the file to paste again content of clipboard.

And NOW the the content of clipboard is
@echo off
setlocal EnableDelayedExpansion
set sw=HKLMSOFTWARE
set u=MicrosoftWindowsCurrentVersionUninstall
set k=
if not %ProgramFiles(x86)%== set x=Wow6432Node
reg query %sw%%x%%u%%k% nul 2&1
if not !errorlevel!==0 (

)
endlocal
What the cake? Where is \ and >? :o