Jump to content

stevecharon

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Posts posted by stevecharon

  1. :hello:

    Hi, I have changed the beginning of ussf.au3 to check, if it got a file as parameter (rightclick and open with ussf).

    And also to check where peid.exe is sitting (3 locations: scriptdir (dir of ussf), windowsdir and systemdir)

    Only 1 file is checked, so no multiselect please. If more files are selected prior to rightclick the one under the mouse is checked.


    ; <AUT2EXE VERSION: 3.1.0.1>

    ; ----------------------------------------------------------------------------
    ; <AUT2EXE INCLUDE-START: D:\Dokumente\AutoIT Test\USSF.au3>
    ; ----------------------------------------------------------------------------

    AutoItSetOption ( "TrayIconHide", 1)

    If FileExists(@ScriptDir & "\peid.exe") Then
    $peiddir = @ScriptDir
    ElseIf FileExists(@WindowsDir & "\peid.exe") Then
    $peiddir = @WindowsDir
    ElseIf FileExists(@SystemDir & "\peid.exe") Then
    $peiddir = @SystemDir
    Else
    MsgBox(0,"Error", "peid.exe not found!")
    Exit
    EndIf

    If $CMDLINE[0] <> 0 Then
    $FileName = $CMDLINE[1]
    ;MsgBox (0, "Parameter", "Es wurde: " & $pars & " eingegeben.")
    Else
    $FileName = FileOpenDialog("Select Installer to analyse", @WorkingDir, "(*.exe)", 1)
    EndIf


    ;msgbox(0,"Info","" & $FileName)
    If @error <> 1 Then

    Run ($peiddir & "\peid.exe -hard " & '"' & $FileName & '"' ,"", @SW_HIDE)
    WinWait ("PEiD v0.9")
    $IDString= ControlGetText("PEiD v0.9", "", "Edit2")
    SplashTextOn("USSF 0.11", "Scanning...",300,200)

    While ($IDString ="Scanning...") or ($IDString ="")
    Sleep (100)
    $IDString= ControlGetText("PEiD v0.9", "", "Edit2")
    WEnd

    SplashOff()

    WinClose ("PEiD v0.9")
    $foundsomething = "n"
    ;msgbox(0,"Universal Silent Switch Finder 0.1",$IDString)
    If StringInStr ($IDString, "Inno Setup") Then
    msgbox(0,"Results","This is an Inno Setup installer." & @CR & @CR & _
    "Silent switches are:" & @CR & _
    "/SILENT or /VERYSILENT" & @CR & @CR & _
    "Additional switches are: " & @CR & _
    "/SP- Disables the ""This will install... Do you wish to continue?"" prompt at the beginning of Setup." & @CR & _
    "/NOCANCEL Prevents the user from cancelling during the installation process." & @CR & _
    "/NORESTART Instructs Setup not to reboot even if it's necessary." & @CR & _
    "/SAVEINF=""filename"" Instructs Setup to save installation settings to the specified file." & @CR & _
    "/LOADINF=""filename"" Instructs Setup to load the settings from the specified file after having checked the command

    line." & @CR & _
    "/DIR=""x:\dirname"" Overrides the default directory name displayed on the Select Destination Location wizard page." & @CR

    & _
    "/COMPONENTS=""comma separated list of component names"" Overrides the default components settings.")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "Wise") Then
    msgbox(0,"Results","This is a Wise installer." & @CR & @CR & _
    "Silent switch is:" & @CR & _
    "/s" & @CR & _
    "Alternative switches are: " & @CR & _
    "/x ""x:\dirname"" Extract (don't install) files to path")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "Nullsoft") Then
    msgbox(0,"Results","This is a Nullsoft NSIS installer." & @CR & @CR & _
    "Silent switch is:" & @CR & _
    "/S (all switches must be upper case)" & @CR & @CR & _
    "Additional switches are: " & @CR & _
    "/D=""x:\dirname"" Install program to path" & @CR & _
    "/NCRC Skip CRC check")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "Installshield AFW") Then
    msgbox(0,"Results","This is an Installshield installer." & @CR & @CR & _
    "First unpack the monolithic setup file with WinRar." & @CR & _
    "You either have a .CAB or .MSI based installer." & @CR & _
    "For CAB based:" & @CR & _
    "Record an installation with this command:" & @CR & _
    "Setup.exe /r /f1""c:\setup.iss""" & @CR & _
    "Now you can perform a silent installation with the iss file:" & @CR & _
    "Setup.exe /s /f1""c:\setup.iss""" & @CR & _
    " "& @CR & _
    "For MSI based:" & @CR & _
    "Msiexec /i setup.msi /qb")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "Installshield 2003") Then
    msgbox(0,"Results","This is an Installshield 2003 installer." & @CR & @CR & _
    "Try to retrieve the MSI file from the temp folder during installation." & @CR & _
    "Then install with:" & @CR & _
    "Msiexec /i setup.msi /qb")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "RAR SFX") Then
    msgbox(0,"Results","This is a selfextracting RAR archive." & @CR & @CR & _
    "The RAR comment contains the setup script.")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "ZIP SFX") Then
    msgbox(0,"Results","This is a selfextracting ZIP archive." & @CR & @CR & _
    "Extract the files and investigate further.")
    $foundsomething = "y"
    EndIf

    If StringInStr ($IDString, "WinZip") Then
    msgbox(0,"Results","This is a selfextracting WinZip archive." & @CR & @CR & _
    "Extract the files and investigate further.")
    $foundsomething = "y"
    EndIf

    If $foundsomething <> "y" Then
    msgbox(0,"Results","Sorry, unknown installer.")
    EndIf
    ;msgbox(0,"Universal Silent Switch Finder 0.11",$IDString)
    EndIf

    ; ----------------------------------------------------------------------------
    ; <AUT2EXE INCLUDE-END: D:\Dokumente\AutoIT Test\USSF.au3>
    ; ----------------------------------------------------------------------------

    Don't know if this code is the most recent. But I hope you get the point.

    If anyone has newer versions please update in order to have those rightclick-feature often mentioned in this thread.

    To use it, import this:


    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\exefile\shell\Identify with USSF\command]
    @="\"C:\\Windows\\ussf.exe\" \"%1\""

×
×
  • Create New...