How to call the command line in vb6 [duplicate] - vb6

This question already has answers here:
How do I call a Windows shell command using VB6?
(6 answers)
Closed 6 years ago.
I want to call the below command line in VB6. How can i call this:
hh.exe "ms-its:c:/Program Files (x86)/GST/Timken Syber Program/TimkenAnalysisHelp.chm::/01_Quick_Start_Guide/quickstart_initial_program_setup.htm"

To call the command line you use Shell:
Shell "notepad.exe", vbNormalFocus
If there are quotation marks, encode these by providing them twice:
Shell "notepad.exe ""Test.txt""", vbNormalFocus
I can't test your command line, as it features things and locations I don't have, but presumably the following should work:
Shell "hh.exe ""ms-its:c:/Program Files (x86)/GST/Timken Syber Program" & _
"/TimkenAnalysisHelp.chm::/01_Quick_Start_Guide/quickstart_initial_program_setup.htm""", _
vbNormalFocus

Related

How to execute an .exe file including blank spaces in it [duplicate]

This question already has answers here:
How to create batch file in Windows using "start" with a path and command with spaces
(7 answers)
Closed 2 years ago.
So normally I have several *.bat files to automate some things in my computer.
But I'm kinda stuck in this call...
cd "C:\Users\user\AppData\Local\Programs\program2Execute"
start program has spaces.exe
I don't get the app executed, instead I get a cmd window with the cd command result, nothing else. I tried to quote "program has spaces.exe" but it doesn't get executed I get the window duplicated instead.
Apologize if this is kinda dumb to ask, but I have spent quite time looking for the answer.
Thanks in advance.
If you use the start command:
start "" "a program with spaces.exe"
start will use the first double quoted string as the title and the 2nd as the command.
Or don't use start:
"a program with spaces.exe"

What is the windows command line equivalent to what role "$" plays in a Linux terminal? [duplicate]

This question already has answers here:
Batch equivalent of Bash backticks
(5 answers)
How to set commands output as a variable in a batch file [duplicate]
(9 answers)
Closed 3 years ago.
As the question title states, I want to know what control character is used in the windows command line when we want all content within the proceeding brackets to be evaluated as the output one expects if that content were executed on a separate command line for example in Linux to assign a value to a variable:
variable=$(a valid command sequence);

Running a command line through shell script is not working [duplicate]

This question already has answers here:
How to execute a bash command stored as a string with quotes and asterisk [duplicate]
(5 answers)
Command not found error in Bash variable assignment
(5 answers)
Closed 4 years ago.
I have an application in Unix. I use the below command to connect to it:
./application -a "connect"
I want to do the same through the shell script, for which i assigned the command line to a variable like:
newcommand = './application -a "connect"'
$newcommand
But this is not working.
However the first part of the code is working. i.e.,:
newcommand = "./application"
$newcommand
Can anyone point out what i am missing.
Believe it or not, this:
newcommand = "./application"
...has the shell run the command, newcommand with the arguments, =, and ./application.
In shell simple assignments cannot have any unprotected whitespace or they'll be interpreted as a command.
Consider:
newcommand=./application
$newcommand
...notice that there's no space around the = sign in the assignment.

copy neo4j command to import graph into script shell and run [duplicate]

This question already has answers here:
Command not found error in Bash variable assignment
(5 answers)
Run bash commands from txt file
(4 answers)
Closed 5 years ago.
I have a script shell that is reading from a file. This is the command line text that i would like to run under the bin folder of neo4j
bin/neo4j-import --into /home/micmal/neo4j-community-3.0.1/data/databases/graph_test.db --id-type string --nodes:
I would like to use a script shell to get that command and go to the folder of neo4j and paste it so it runs.
my shell looks like :
#!/bin/bash
batch_import_value= `cat _batchfile.txt`
cd /home/neo4j-community-3.0.1/
echo $batch_import_value`
it doesn't seem work
Any idea?

Call a function in bash script with & [duplicate]

This question already has answers here:
What does "program &" mean on the command line?
(2 answers)
Closed 5 years ago.
Recently I am learning how to write bash script.
I noticed that in other's code, there is a line calling a function like this:
restartApp ${array[app]} $num &
I know the first two are variables that passing to the function, but I really don't understand what is the last symbol & here?
If you end the line with & the process starts in the background. This means you can continue to use the shell and do not have to wait on the output.

Resources