How do you execute command line tools without using batch file in Inno Setup

前端 未结 1 995
孤城傲影
孤城傲影 2020-12-09 12:21

I now understand that \"Inno Setup can execute command line tools for you without utilizing batch file.\" (Can Inno Setup install set up a Windows security group?) It makes

相关标签:
1条回答
  • 2020-12-09 12:37

    It was meant that you don't need to create and execute a batch script (with a single command), nor execute the tool through the command prompt (like shown below):

    Exec('cmd.exe', '/c "net localgroup ..."', '', SW_SHOW, ewWaitUntilTerminated, Result);
    

    But you directly execute the tool instead:

    Exec('net.exe', 'localgroup ...', '', SW_SHOW, ewWaitUntilTerminated, Result);
    

    The same applies to the [Run] section:

    [Run]
    Filename: "{cmd}"; Parameters: "/c ""net localgroup ..."""
    

    Better would be this:

    [Run]
    Filename: "net.exe"; Parameters: "localgroup ..."
    
    0 讨论(0)
提交回复
热议问题