I want to install an .msi app with a .ps1 script, but I want it to fill some information automatically. For example, see the attached image, what I have to do to instead of C:\ be D:\Example\Example
What should I type on the script?
Thanks
So for the .msi file, in command prompt you can run the following command,
(filename).msi /?
A window should appear with the details of command line parameters that you can pass to the .MSI file. You should be able to install your application using a command prompt and automate this.
Related
I'm trying to launch a python script on windows command prompt, but instead of it doing it, it opens the script on vscode instead. I searched the options in vscode and didn't find anything. How can I stop this behavior?
SOLVED
I simply changed the default program for .py files
You need to change the default application for .py files to python.exe.
This will instruct Windows to pass the filename of the python script you're trying to open to python.exe, which will execute it.
python my_script.py
As a bonus, if you change the PATHEXT environment variable to include .py extension. This will allow you to run a python script without prefixing it with python command when working in a shell.
./my_script.py
Python installer does this by default, but if it isn't there, you can add it.
I want to use commands such as mongodump/mongorestore/mongoexport on my local windows computer and have therefor downloaded the .msi extension version of mongodb database tool and also executed the .msi so it could be installed.
But what do i do now to start using the commands. I cant find any documentaions of this. Is there something i have to configue?
When i execute a command like mongodump on my system command line i get the response:
'mongodump' is not recognized as an internal or external command, operable program or batch file.
Do i maybe have to execute the command from a certain dir location?
Look for the highlighted folder on your system. When you install the database tools this folder is created. Inside this folder there is a bin folder which contains all the commands you are looking for.
Once you find this folder then navigate to bin folder. And open a command prompt at that location. And try running the commands.
Alternatively:-
You can set PATH to bin folder and then you will be able to run the commands from anywhere.
I would like to know if it is possible to run a .exe of .bat file after the build complete(post build)??
I have found where to add the command from the above image. My doubt is how to call .exe or .bat from here ??
Can someone please tell me how I get Powershell to run .sh scripts? It keeps just trying to open the file i need in Notepad when I run this command:
.\update-version.sh 123
I've added .SH to my PATHEXT environment variable and also added the Microsoft.PowerShell_profile.ps1 directory to the Path environment variable.
PowerShell scripts have a .ps1 extension (along with other supported extensions such as psm1,psd1 etc) it will not run other extensions other than that.
I had also got the same issue when i am trying to run .sh files. The solution is you need to enable bash shell by typing bash.After enabling Bash on Windows, you can run .sh files by typing bash ./fileName.sh. But i have tried through git bash with typing . fileName.sh it worked well. These are the two solutions that I have found, and you can try whatever you wish.
I just started playing around to Batch scripts and I was wondering if anybody who is familiar with bash or scripting can give me a great reference.
Right now, I am trying to run DiskPart, but another window pops up for it. Can I pass commands to it so it is automated and close out of it automated?
I was also wondering if it is possible to silently run exe files with a Bash script (e.g. install a JRE) and also run multiple EXE files?
Thank you!!
Can I pass commands to it so it is automated and close out of it automated.
It is a question? Did you try to call diskpart /??
The answer is diskpart /s "full_path_to_diskpart_script_file"
Where full_path_to_diskpart_script_file is plain text file with DiskPart commands.
I was also wondering if it is possible to silently run exe files with a Bash script (e.g. install a JRE) and also run multiple EXE files.
Another question? Look at start /?
For example, you may run from batch
start /min "Installing JRE" "full_path_to\jre-7u5-windows-x64.exe" /s
JRE Installer Options