Windows 10: Passing a parameter to a batch file for code signing

Discus and support Passing a parameter to a batch file for code signing in Windows 10 Network and Sharing to solve the problem; I am using MS Access and would like to pass an exe name to my code signing cert batch file. Been trying to figure this one out, but cannot get there.... Discussion in 'Windows 10 Network and Sharing' started by JerryBall_800, Dec 31, 2018.

  1. Passing a parameter to a batch file for code signing


    I am using MS Access and would like to pass an exe name to my code signing cert batch file. Been trying to figure this one out,

    but cannot get there. I created a batch file called. SignFile.bat. It contains everything I need to sign the file, but I need to pass the exe name to the file. The exe name has spaces and is supposed to be enclosed in double quotes "Test File Sign.exe" and I thins this is causing me the issue.


    The SignFile.bat is as follows:

    The SignFile.bat is as follows and is located in C:\Cloud Data\Devl\:

    Where "%1" should be the file name with the double quotes.

    Signtool sign /f “C:\Cloud Data\Code_Signing_Cert\

    if errorlevel 1 goto error

    goto end

    :error
    echo Failed with error #%errorlevel%.
    exit /b %errorlevel%

    :end
    ==============================
    it should end up being "Dealer 1 Acura_ISS.exe"

    1. SignPath is where the batch file

    SignPath = CurrentProject.Path & "\SignFiles.bat"

    2. SignName is where the exe file is located

    SignName = CurrentProject.Path & "\" & rstDelFldr!DlrName & "_ISS\" & rstDelFldr!DlrName & "_ISS.exe"


    SignStr = SignPath + " " + SignName
    Call Shell("cmd.exe" & SignStr, 1)
    ============================
    I only need to figure out how to pass the SignName into the batch file
    ==============================
    Passing a parameter to a batch file for code signing [​IMG]

    Error Message:

    Passing a parameter to a batch file for code signing [​IMG]


    :)
     
    JerryBall_800, Dec 31, 2018
    #1

  2. Batch file

    thank you for your reply. how to merge the codes so that the batch file does this

    the batch file displays the options below

    1. open the *.spl file in notepad
    2. delete the *.shd and *.spl files
    3.exit

    commands execute as options are selected
     
    Sandeep Bhugoo, Dec 31, 2018
    #2
  3. Steevo Win User
    Batch file to ping network

    No, batch files are extremely easy.

    A "If" requires three extra steps.

    Code is not how much you can put in, but how lite can you make it and still perform the functions.

    So

    @ echo off


    ping 1.4.1.4 >a.txt

    findstr /m "Request timed out" a.txt
    if %errorlevel%%==0 (
    echo Save our nets!!!
    )

    pause
     
    Steevo, Dec 31, 2018
    #3
  4. ryanly Win User

    Passing a parameter to a batch file for code signing

    GPU-Z what command line parameter ?

    Current /? (-?) or / help (-help) parameter is invalid
     
    ryanly, Dec 31, 2018
    #4
Thema:

Passing a parameter to a batch file for code signing

Loading...
  1. Passing a parameter to a batch file for code signing - Similar Threads - Passing parameter batch

  2. What is %..% sign means in CMD batch files?

    in Windows 10 Gaming
    What is %..% sign means in CMD batch files?: What is %..% sign means in CMD batch files? Ex:@echo offset /p var="Enter no.: "set /p var2="Enter no.: "set /a result=%var%+%var2%echo Your result is %result%pauseexit /b...
  3. What is %..% sign means in CMD batch files?

    in Windows 10 Software and Apps
    What is %..% sign means in CMD batch files?: What is %..% sign means in CMD batch files? Ex:@echo offset /p var="Enter no.: "set /p var2="Enter no.: "set /a result=%var%+%var2%echo Your result is %result%pauseexit /b...
  4. What is %..% sign means in CMD batch files?

    in Windows 10 Network and Sharing
    What is %..% sign means in CMD batch files?: What is %..% sign means in CMD batch files? Ex:@echo offset /p var="Enter no.: "set /p var2="Enter no.: "set /a result=%var%+%var2%echo Your result is %result%pauseexit /b...
  5. Create batch files with Batch?

    in Windows 10 Software and Apps
    Create batch files with Batch?: How to create Batch and VBS files with Batch? So I write a batch file which I then convert to exe that creates new folders in a certain directory and then creates batch and VBS files with a certain content and saves them in the created folder. So it's similar to a program...
  6. Batch ddos code?

    in AntiVirus, Firewalls and System Security
    Batch ddos code?: Good morning I'm trying to write a ddos great with batch at the moment but unfortunately I can't get any further(To test my own server).... i already have a menu where you can enter everything like ip and port or strength. But unfortunately I have no idea how to make a...
  7. Passing parameters in a bat file

    in Windows 10 Support
    Passing parameters in a bat file: I am trying to run a bat file from a desktop shortcut. If I run it from DOS it works fine. If I try to run it from a desktop shortcut, I can not pass the parameter inside the bat file. See attached for the example of the bat file. The first part works (from the DOS prompt)....
  8. Pass partial parameter in bat file

    in Windows 10 Support
    Pass partial parameter in bat file: I have about 200 files examples: 20200101 FILE10.TXT 20200102 FILE10.TXT 20200103 FILE10.TXT 20200104 FILE10.TXT I need a way to accept only the first 8 positions in a bat file and copy the whole file to another directory. If enter 20200101 and it will pass the file...
  9. invalid INF passed as parameter

    in Windows 10 Network and Sharing
    invalid INF passed as parameter: hello i decided to update my laptop drivers but when i start the command thingy it says invalid INF passed as parameter and it restarts help https://answers.microsoft.com/en-us/windows/forum/all/invalid-inf-passed-as-parameter/ab19feaa-4fc0-4294-8fd8-0b7481b6d07e"
  10. By-pass sign in

    in AntiVirus, Firewalls and System Security
    By-pass sign in: I went through the procedure of not having to sign in whenever I restart my AIO or when I wake it from sleep mode, but it still asks me to sign in. What else can I do...