QUOTE (totoymola @ Sep 29 2005, 03:17 AM)
MHz is the AutoIt master here. Maybe he has a dirrerent method of doing this.

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 attachmentUsing 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.