Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Batch File Help.

Options
  • 14-05-2009 12:09am
    #1
    Registered Users Posts: 8,363 ✭✭✭


    Does anyone know how to make a batch file run this from the command line for me?


    cmd

    net start cryptsvc
    regsvr32 softpub.dll
    regsvr32 wintrust.dll
    regsvr32 initpki.dll
    regsvr32 dssenh.dll
    regsvr32 rsaenh.dll
    regsvr32 gpkcsp.dll
    regsvr32 sccbase.dll
    regsvr32 slbcsp.dll
    regsvr32 cryptdlg.dll

    exit

    -

    Basically I can't remember how to get the return key to function in the batch file for each of the files I want to register.

    -

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



Comments

  • Registered Users Posts: 757 ✭✭✭rockal


    Use
    regsvr32 /s softpub.dll
    regsvr32 /s wintrust.dll
    etc
    in your batch file. This will suppress the popup dialog box and run all commands.


  • Registered Users Posts: 8,363 ✭✭✭Gadgetman496


    rockal wrote: »
    Use
    regsvr32 /s softpub.dll
    regsvr32 /s wintrust.dll
    etc
    in your batch file. This will suppress the popup dialog box and run all commands.

    Thanks rockal,

    Is it exactly as you wrote it, with a space either side of the /s ?

    Will exit as the last line close it out when done or is it something else?

    -

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



  • Registered Users Posts: 757 ✭✭✭rockal


    Yes, spaces as displayed. You do not need 'cmd' (this opens the command console) or 'exit'. If this dos not work you may need to type the full path to the dll's and if using vista 'run as administrator'

    If you don't want things flashing up on screen - begin the batch file with '@echo off'


  • Registered Users Posts: 3,357 ✭✭✭snappieT


    Yes, with the spaces on either side as rockal suggested.

    You don't need an exit at the end, it'll close itself. If you want to have the window stay open, use the PAUSE command.


  • Registered Users Posts: 8,363 ✭✭✭Gadgetman496


    snappieT wrote: »
    Yes, with the spaces on either side as rockal suggested.

    You don't need an exit at the end, it'll close itself. If you want to have the window stay open, use the PAUSE command.

    Thanks snappieT,

    Will something as simple as this work then?

    Do I need to include the cmd?

    Is the net start cryptsvc line ok as it is?
    
    @echo off
    cls
    cmd
    
    net start cryptsvc
    regsvr32 /s softpub.dll
    regsvr32 /s wintrust.dll
    regsvr32 /s initpki.dll
    regsvr32 /s dssenh.dll
    regsvr32 /s rsaenh.dll
    regsvr32 /s gpkcsp.dll
    regsvr32 /s sccbase.dll
    regsvr32 /s slbcsp.dll
    regsvr32 /s cryptdlg.dll
    
    
    

    "Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid."



  • Advertisement
Advertisement