command-line

Run Excel Macro from Outside Excel Using VBScript From Command Line

|▌冷眼眸甩不掉的悲伤 提交于 2020-12-15 01:43:34
问题 I'm trying to run an Excel macro from outside of the Excel file. I'm currently using a ".vbs" file run from the command line, but it keeps telling me the macro can't be found. Here is the script I'm trying to use Set objExcel = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open("test.xls") objExcel.Application.Visible = True objExcel.Workbooks.Add objExcel.Cells(1, 1).Value = "Test value" objExcel.Application.Run "Macro.TestMacro()" objExcel.ActiveWorkbook.Close

Failed to reload nginx.service: Interactive authentication required

放肆的年华 提交于 2020-12-12 05:43:32
问题 I am working on project using symfony 3, the project run on nginx server and i am trying to reload the configuration files with the following command: "systemctl reload nginx" from the controller. /** * @Route("/testReloadConfig") */ public function testReloadConfigAction(Request $request){ $output = []; $result = null; $cmd = 'systemctl reload nginx 2>&1'; exec($cmd, $output, $result); return new JsonResponse([ 'result' => $result, 'output' => $output, ]); } The response: {"result":1,"output

How do I run 2 options of mysql Workbench together?

风流意气都作罢 提交于 2020-12-07 14:48:33
问题 I am trying to write a command-line script which will open Workbench connect to the specified database open an sql file run it export the results into a text file I made use of workbench's guide for command-line guide from (https://dev.mysql.com/doc/workbench/en/wb-command-line-options.html) up to the point of opening the app and connecting to the database. However, I can't combine the options. The options I write after "connect to database" are not read or run properly. My question is how to

How can I pass command line parameters with a value to the Inno Setup Compiler, so I can use them in my code?

半腔热情 提交于 2020-12-06 15:42:19
问题 I have two possible build options. As I don't want my clients to start the installer with some parameters, I'd better pass them to the compiler and do all the job in my code. Let's say I have the variable UNION which may take two values: 0 and 1 . I have to analyze the value of that variable in my code and depending on the result to include some files or not. I know how to pass parameterrs to the installer itself, but how can I pass them to the compiler? Here's some code: procedure

How can I pass command line parameters with a value to the Inno Setup Compiler, so I can use them in my code?

自古美人都是妖i 提交于 2020-12-06 15:34:36
问题 I have two possible build options. As I don't want my clients to start the installer with some parameters, I'd better pass them to the compiler and do all the job in my code. Let's say I have the variable UNION which may take two values: 0 and 1 . I have to analyze the value of that variable in my code and depending on the result to include some files or not. I know how to pass parameterrs to the installer itself, but how can I pass them to the compiler? Here's some code: procedure

How can I pass command line parameters with a value to the Inno Setup Compiler, so I can use them in my code?

扶醉桌前 提交于 2020-12-06 15:33:54
问题 I have two possible build options. As I don't want my clients to start the installer with some parameters, I'd better pass them to the compiler and do all the job in my code. Let's say I have the variable UNION which may take two values: 0 and 1 . I have to analyze the value of that variable in my code and depending on the result to include some files or not. I know how to pass parameterrs to the installer itself, but how can I pass them to the compiler? Here's some code: procedure

When implementing command line flags, should I prefix with a fowardslash (/) or hyphen (-)?

独自空忆成欢 提交于 2020-12-04 20:01:23
问题 Are their any conventions (either written or just generally understood) for when to use a forward slash (/) or a hyphen (-) when reading arguments/flags from a command line? C:\> myprogram.exe -a C:\> myprogram.exe /a The two seem to be interchangeable in my experience, but I haven't used enough command line tools to say I've spotted any rules or patterns. Is there a good reason that either of them are used at all? Could I theoretically use an asterisk (*) if I wanted to? 回答1: You can

How to use PyCharm as a GIT diff tool from the command line?

天大地大妈咪最大 提交于 2020-12-02 08:17:30
问题 On the PyCharm Help Website I see you can use PyCharm as a diff tool from the Command Line to compare two files. That's awesome! However is there a way to take it a step further and use it as a git diff tool. So I can just type pycharm diff file_name.py and get the GIT differences same way you would if you were on PyCharm have setup the GIT integration and press CTRL + D to see the differences. 回答1: Yes you can. First you need to enable the command-line launcher: To enable invoking PyCharm

What's the equivalent of cmd for powershell with ffmpeg

社会主义新天地 提交于 2020-11-27 04:27:07
问题 from https://www.poftut.com/ffmpeg-command-tutorial-examples-video-audio/ ffmpeg -i jellyfish-3-mbps-hd-h264.mkv works in cmd but same on Powershell gives Unexpected token '-i' in expression or statement. what's then the right syntax ? 回答1: As currently shown in your question, the command would work just fine in PowerShell. # OK - executable name isn't quoted. ffmpeg -i jellyfish-3-mbps-hd-h264.mkv However, if you quote the executable path, the problem surfaces . # FAILS, due to SYNTAX ERROR,