Jump to content

Recommended Posts

Posted

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.

  • 4 months later...

  • 9 months later...
Posted
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

+
Posted
[b]Original installer[/b]
Doubleclick on the installer and a window opens with "Nullsoft Install System v2.0" on it. [b]/S[/b] is the switch to use.
Posted
the /S worked great - except one thing - the program opens and also an internet window opens after the install. any way to stop these?
Posted (edited)

[quote name='a06lp' date='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?
[right][post="396030"][/post][/right][/quote]

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 [b]"Image Hijack Installation"[/b] All you need to do is to identify the name of the unwanted process. In your case, I assume it is [b]iexplore.exe[/b].

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[/code]

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"[/code]

DELHIJACK.REG
[code]Windows Registry Editor Version 5.00

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

You can apply this on other applications too. There are a lot of ways to do this. Just be creative! :)

Edited by totoymola
Posted
Interesting concept totoymola. Have you any good links that can explain the operation of this registry key
Posted (edited)

Hey MHz! :)

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"[/code]

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!! :lol: But I changed it back after a day. Hehehehe.. :)

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

[url="http://blogs.msdn.com/junfeng/archive/2004/04/28/121871.aspx"]http://blogs.msdn.com/junfeng/archive/2004/04/28/121871.aspx[/url]

:)

Edited by totoymola
Posted
@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?
Posted (edited)

Nope, that isn't a problem. :)

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. :)

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[/code]
MHz is the AutoIt master here. Maybe he has a dirrerent method of doing this. :)

Alternatively, you can try the MSI on my sig. :)

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.

Edited by totoymola
Posted (edited)

[quote name='totoymola' date='Sep 29 2005, 03:17 AM']MHz is the AutoIt master here.  Maybe he has a dirrerent method of doing this. :)
[right][post="396341"][/post][/right][/quote]
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'[/code]

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[/code]

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[/code]

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[/code]

Full script attached.
[attachment=12119: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.

[b]Edit:[/b]
Added script update to attachment. Up to date script has OS check etc.

Edited by MHz

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...