Help - Search - Members - Calendar
Full Version: Picasa install anyone?
MSFN Forums > Unattended Windows Discussion & Support > Application Installs

   


Google Internet Forums Unattended CD/DVD Guide
blinkdt
Anyone found a way to silently install Google's photo organizer, Picasa? I ended up using InstallRite to get the job done, but I'm curious to know of different methods that may have worked for others. I couldn't locate anything in the way of switches for the funky installer used for Picasa.
dcrowder32
I used AutoIT script.
a06lp
are there built-in switches?

if not, can someone provide the auto-it script?
nonobis
i have extracted the msi and this switches ...

REG ADD %KEY%\010 /VE /D "Google Picasa 2.0" /f
REG ADD %KEY%\010 /V 1 /D "%systemdrive%\install\Google\picasa\Picasa2.msi /qb" /f

it's working to me

+
a06lp
how'd you extract the msi?
usually right-click using winrar works, but i dont have the option...
a06lp
bump
totoymola
Hi. smile.gif

Which MSI are you referring to? The one on my sig?
MHz
Original installer
Doubleclick on the installer and a window opens with "Nullsoft Install System v2.0" on it. /S is the switch to use.
a06lp
the /S worked great - except one thing - the program opens and also an internet window opens after the install. any way to stop these?
totoymola
QUOTE (a06lp @ Sep 27 2005, 06:45 PM)
the /S worked great - except one thing - the program opens and also an internet window opens after the install.  any way to stop these?
*


You can use my trick for all programs that launch an unwanted program after installation. It's pretty easy, and it is a neat way of avoiding the unwanted program's execution. I call it the "Image Hijack Installation" All you need to do is to identify the name of the unwanted process. In your case, I assume it is iexplore.exe.

I'm using a batch file for this example. Just modify it if you use different method of installing softwares.

CODE
@CLS & @ECHO OFF

:: THIS IMPORTS THE "HIJACK"
REGEDIT /S HIJACK.REG

:: THIS INSTALLS YOUR PROGRAM THAT HAS AN ANNOYING PROGRAM EXECUTION
START /W picasa2-current.exe /S

:: SLEEP IS OPTIONAL
SLEEP 3

:: THIS REMOVES IMAGE THE IMAGE HIJACK
REGEDIT /S DELHIJACK.REG


This is the HIJACK.REG
CODE
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\iexplore.exe]
"debugger"="help"


DELHIJACK.REG
CODE
Windows Registry Editor Version 5.00

[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\iexplore.exe]


You can apply this on other applications too. There are a lot of ways to do this. Just be creative! smile.gif
MHz
Interesting concept totoymola. Have you any good links that can explain the operation of this registry key
totoymola
Hey MHz! smile.gif

We basically, the registry modification is called the Image File Execution Options. For example, the registry entry

CODE
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\iexplore.exe]
"debugger"="help"


executes the "HELP" executable (the CMD HELP) everytime you launch Internet Explorer. Since the "HELP" executable needs a command interpreter, it will execute but it will terminate right away. You can acutally use other executables. For example, create dummy executable. Either an AutoIt executable that does nothing, or a Winrar SFX that extracts a 0 byte file to the %temp% dir.

This method is used by hackers. For example, they will modify your registry so everytime you launch NOTEPAD, their keylogger or other hacking files will execute.

I have sin to confess.. When I was mad at my cuz, I hijacked her registry so everytime she launches notepad, paint, and calc, her computer will force-shutdown. Hahahahaha!! laugh.gif But I changed it back after a day. Hehehehe.. smile.gif

About the link, this is a good one. But it doesn't explain the other settings that much.

http://blogs.msdn.com/junfeng/archive/2004/04/28/121871.aspx

smile.gif
a06lp
@totoymola:

yes, that is clever.
however, it poses a problem. i have firefox as an optional install - some systems will have firefox and others will have ie open when picasa is done. i dont want a ton of code, i wanted a simple switch (if possible)...

i appreciate you help, but are there any other ways?
totoymola
Nope, that isn't a problem. smile.gif

If you are performing a clean installation, Internet Explorer is your default browser until the first time you run Firefox and set it as your default browser. smile.gif

Anyway, just to make sure, you can also try this AutoIt script.

CODE
#cs
AutoIt Version    :    v3.1.0 / v3.1.1.76 Beta
Author      :    TotoyMola [TotoyMola8@gmail.com]
Description  :    Wait for the existence of "iexplore.exe" or "firefox.exe", then terminates it.
#ce
#NoTrayIcon

$IE = "iexplore.exe"
$FF = "firefox.exe"
While 1
    If ProcessExists($IE) Then
 ProcessClose($IE)
 Exit
    ElseIf ProcessExists($FF) Then
 ProcessClose($FF)
 Exit
    EndIf
WEnd

MHz is the AutoIt master here. Maybe he has a dirrerent method of doing this. smile.gif

Alternatively, you can try the MSI on my sig. smile.gif

Is there a new version of Picasa2? Because I'm not sure if the MSI is still the latest version. If not, I will try to create a new one when I get the chance.
MHz
QUOTE (totoymola @ Sep 29 2005, 03:17 AM)
MHz is the AutoIt master here.  Maybe he has a dirrerent method of doing this. smile.gif
*

Ok, that sucked me in. I do not even have an interest in this program but I did a script showing your process block method totoymola.

Let me show the code that does the blocking.

This variable contains the processes to block:
CODE
; Block list for annoying processes. Delimiter is |.
$processblock = 'Picasa2.exe|PicasaMediaDetector.exe|notepad.exe|iexplore.exe|firefox.exe'


The Install() function will call the _ProcessBlock() function if processes are assigned to the $processblock as above.

If the above line has processes listed, then it will call this function and add each process into the Image File Execution Options registry key.
CODE
Func _ProcessBlock()
   ; Add process block for select processes
    Dim $processblock
    Local $key, $command
    If Not @OSTYPE = 'WIN32_NT' Then Return $processblock = ''
    If $processblock <> '' Then
        $key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
        If @Compiled Then
            $command = '"' & @ScriptFullPath & '" /dummy'
        Else
            $command = '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /dummy'
        EndIf
        If StringInStr($processblock, '|') Then
            $processarray = StringSplit($processblock, '|')
            For $i = 1 To $processarray[0]
                RegWrite($key & '\' & $processarray[$i], 'debugger','Reg_sz', $command)
            Next
        Else
            RegWrite($key & '\' & $processblock, 'debugger','Reg_sz', $command)
        EndIf
    EndIf
EndFunc


Blocked Processes will execute the AutoIt script with the /dummy switch and that script execution will immediately exit. This line exits if /dummy switch s used:
CODE
; Exit if executed a 2nd time by blocked process.
If StringInStr($cmdlineraw, '/dummy') Then Exit


Picasa should install silently without annoying processes. Once the script exits, it will call the inbuilt Autoit function OnAutoItExit. OnAutoItExit will remove the registry entries that were added previously.
CODE
Func OnAutoItExit()
   ; Blocked processes will be unblocked.
    Dim $processblock, $silenterror
    Local $key, $exitcode
    If @OSTYPE = 'WIN32_NT' And $processblock <> '' Then
        $key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
        If StringInStr($processblock, '|') Then
            $processarray = StringSplit($processblock, '|')
            For $i = 1 To $processarray[0]
                If RegDelete($key & '\' & $processarray[$i]) = 2 Then
                    $exitcode = 1
                    If Not $silenterror Then
                        MsgBox(0x10, 'Error', 'Registry key for ' & $processarray[$i] & ' still exists', 2)
                    EndIf
                EndIf
            Next
        Else
            If RegDelete($key & '\' & $processblock) = 2 Then
                $exitcode = 1
                If Not $silenterror Then
                    MsgBox(0x10, 'Error', 'Registry key for ' & $processblock & ' still exists', 2)
                EndIf
            EndIf
        EndIf
    EndIf
    If $exitcode Then Exit -1
EndFunc


Full script attached.
Click to view attachment

Using Adlib or OnAutoItExit would perhaps be my usual method to close these processes, but I find AutoIt is quite flexible as to problems so methods may vary.

Edit:
Added script update to attachment. Up to date script has OS check etc.
totoymola
WONDERFUL!! I'M SPEACHLESS! thumbup.gif

Thanks for the script buddy! I'll be using it as a reference. smile.gif
MHz
Thanks totoymola,
The Image File Execution Options concept that you shared with us may come in handy for certain problematic installations. newwink.gif

Edit: As a reference, the functions above are generic code and can be used in other scripts also.
asbsamsf
QUOTE (blinkdt @ Jul 23 2004, 08:12 AM)
Anyone found a way to silently install Google's photo organizer, Picasa? I ended up using InstallRite to get the job done, but I'm curious to know of different methods that may have worked for others. I couldn't locate anything in the way of switches for the funky installer used for Picasa.
*


frist I edit picasa2-current.exe in ResHacker;
CODE
XML > PAYLOAD >0

delete the lines
CODE
 <event>
  <type>URLVISIT</type>
  <src>http://picasa.google.com/help/welcome.html</src>
 </event>

to install I'm using a inf file

CODE
[Version]
Signature=$CHICAGO$
AdvancedINF=2.5

[DefaultInstall]
AddReg=Add_Reg
DelReg=Del_Reg

RunPreSetupCommands =RunPreEverything
RunPostSetupCommands=RunPostEverything

[Strings]
GOOGLE_KEY="Software\Google\Picasa\Picasa2\Preferences"

[Add_Reg]
HKCU,%GOOGLE_KEY%,"usesplashscreen",0x00010001,00000000
HKCU,%GOOGLE_KEY%,"AutoUpgradeCheck",0x00010001,00000000
etc
etc

[Del_Reg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run","Picasa Media Detector"

[RunPreEverything]
picasa2.exe /S

[RunPostEverything]
TASKKILL /F /IM Picasa2.exe /IM PicasaMediaDetector.exe
a06lp
any way to disable the picasa system tray thing?
MHz
QUOTE (a06lp @ Oct 2 2005, 11:53 PM)
any way to disable the picasa system tray thing?
*

By which method. The Inf that asbsamsf displays uses TASKKILL and removes the Run registry entry. The AutoIt script I posted blocks the process and removes the Run Registry key. If you use a DOS cmd then TASKKILL and Reg delete.

The system tray thing you mention is PicasaMediaDetector.exe.
a06lp
yea, the msi makes things easier...
webmedic
I dont have this scripted for silent install but I do the inatall manually and then my script kills the process's associated with picasa. This is all done durring t-12. A nice side effect of this is that after reboot it does not seem the running process even has tome to add some of the registry entries as the program does not start with windows. It was an unexpected thing but It was nice.

I also kill google desktop and google talk in the same way and none of them start with windows either and I dont have to do anything special.
tigerclaw
I don't quite get why you go trough all that trouble just to disable the internet popup. blink.gif
Heres how I do it:

1. Run the setup and go to %temp%, here there will be two files named pay***.tmp.exe (mine was pay1E8.tmp.exe and pay1E9.tmp.exe)

2. Extract the smallest file and rename to whatever you want your installer to be named, this file is actually 200kb smaller than the original installer! rolleyes.gif

3. Run the installer (the new one) with a /S switch, you will notice theres no internet popup! thumbup.gif

4. Run taskkill /f /im Picasa2.exe /im PicasaMediaDetector.exe after the install.

5. Import the necessary registry tweaks

Heres my runonceex.cmd:
CODE
REG ADD %KEY%\095 /VE /D "Picasa 2.1.0" /f
REG ADD %KEY%\095 /V 1 /D "%CDROM%\Software\picasa2.exe /S" /f
REG ADD %KEY%\095 /V 2 /D "taskkill /f /im Picasa2.exe /im PicasaMediaDetector.exe" /f
REG ADD %KEY%\095 /V 4 /D "REGEDIT /S %CDROM%\Software\Registry\picasa2.reg" /f


Heres my picasa2.reg
CODE
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Google\Picasa\Picasa2\Preferences]
"SupportGIF"=dword:00000001
"SupportPNG"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run]
"Picasa Media Detector"=-


SupportGIF and SupportPNG is to enable default support of gif and png files in picasa (duh!)

By the way, what is usesplashscreen and AutoUpgradeCheck registry keys for? I don't need them
Avneet
QUOTE (MHz @ Sep 28 2005, 10:53 PM) *
QUOTE (totoymola @ Sep 29 2005, 03:17 AM)
MHz is the AutoIt master here. Maybe he has a dirrerent method of doing this. smile.gif
*

Ok, that sucked me in. I do not even have an interest in this program but I did a script showing your process block method totoymola.

Let me show the code that does the blocking.

This variable contains the processes to block:
CODE
; Block list for annoying processes. Delimiter is |.
$processblock = 'Picasa2.exe|PicasaMediaDetector.exe|notepad.exe|iexplore.exe|firefox.exe'


Just before install Picasa, this line executes:
CODE
If $processblock <> '' Then _Block()


If the above line has processes listed, then it will call this function and add each process into the Image File Execution Options registry key.
CODE
Func _Block()
    Dim $processblock
    If $processblock <> '' Then
        Local $key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
        If @Compiled Then
            Local $command = '"' & @ScriptFullPath & '" /dummy'
        Else
            Local $command = '"' & @AutoItExe & '" "' & @ScriptFullPath & '" /dummy'
        EndIf
        If StringInStr($processblock, '|') Then
            $processarray = StringSplit($processblock, '|')
            For $i = 1 To $processarray[0]
                RegWrite($key & '\' & $processarray[$i], 'debugger','Reg_sz', $command)
            Next
        Else
            RegWrite($key & '\' & $processblock, 'debugger','Reg_sz', $command)
        EndIf
    EndIf
EndFunc


Blocked Processes will execute the AutoIt script with the /dummy switch and that script execution will immediately exit. This line exits if /dummy switch s used:
CODE
; Exit if executed a 2nd time by blocked process.
If StringInStr($cmdlineraw, '/dummy') Then Exit


Picasa should install silently without annoying processes. Once the script exits, it will call the inbuilt Autoit function OnAutoItExit. OnAutoItExit will remove the registry entries that were added previously.
CODE
Func OnAutoItExit()
    Dim $processblock
    If $processblock <> '' Then
        Local $key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options'
        If StringInStr($processblock, '|') Then
            $processarray = StringSplit($processblock, '|')
            For $i = 1 To $processarray[0]
                If RegDelete($key & '\' & $processarray[$i]) <> 1 Then
                    MsgBox(0 + 16, 'Error', 'Registry key for ' & $processarray[$i] & ' still exists', 2)
                EndIf
            Next
        Else
            If RegDelete($key & '\' & $processblock) <> 1 Then
                MsgBox(0 + 16, 'Error', 'Registry key for ' & $processblock & ' still exists', 2)
            EndIf
        EndIf
    EndIf
EndFunc


Full script attached.
Click to view attachment

Using Adlib or OnAutoItExit would perhaps be my usual method to close these processes, but I find AutoIt is quite flexible as to problems so methods may vary.


how do u use this script..i used autoit and compiled it .. i put it with the picasa instalation file.. and nothing happend ..

plizz help
MHz
QUOTE (Avneet @ Apr 10 2006, 08:12 AM) *
how do u use this script..i used autoit and compiled it .. i put it with the picasa instalation file.. and nothing happend ..

plizz help

Ensure that you have renamed the Picasa installer to the name used in the script or change the name in the script to the same as the installer.
QUOTE
; Installer.
$executable = 'Picasa v2.exe'

I have updated that previous post of mine with an up to date script. Please try it instead.
Do not name your compiled script to similar name as the installer else you may just execute the script itself. I add a underscore infront of compiled script filenames as you can keep a similar filename but the underscore prevents accidental execution of the script itself.
The 2 files need to be within the same directory as the script is setup for it.
You only need to execute the AutoIt script and it will handle the installation of Picasa for you.




Google Internet Forums Unattended CD/DVD Guide

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.