Jump to content

get full EXE Loc from Input box, Run CMD and sign EXE


RickB75
 Share

Recommended Posts

Guys,

      I have a quick question. Can you help me structure the run command correctly to sign my exe's from an input box? I can sign them now directly from CMD and have been doing so for a while. When I compile the EXE, I have it set to sign after it's compiled.  I'm trying to simplify the signing of the installer EXE .  Here's what I have so far. 

 

While 1
    #Region --- CodeWizard generated code Start ---
    ;InputBox features: Title=Yes, Prompt=Yes, Default Text=No, Width=400, Height=150
    If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer
    $sInputBoxAnswer = InputBox("Name and location of the file to be signed","Enter the full Location of the file to be signed!",""," ","400","150",Default,Default)
    Select
        Case @Error = 0 ;OK - The string returned is valid

            ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=None
            If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer
            $iMsgBoxAnswer = MsgBox(4,"The File To be signed.",$sInputBoxAnswer)
            Select
                Case $iMsgBoxAnswer = 6 ;Yes

                    Run (@ComSpec &  " /c " & 'C:\Program Files (x86)\Windows Kits\8.0\bin\x64\signtool.exe sign /t http://timestamp.comodoca.com/rfc3161 /a ' & $sInputBoxAnswer,'',@SW_SHOW)

                Case $iMsgBoxAnswer = 7 ;No

                    ContinueCase

            EndSelect

        Case @Error = 1 ;The Cancel button was pushed

            Exit

        Case @Error = 3 ;The InputBox failed to open

    EndSelect
    #EndRegion --- CodeWizard generated code End ---


WEnd

 

Link to comment
Share on other sites

  • 2 weeks later...

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
 Share

  • Recently Browsing   0 members

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