batch file to check 64bit or 32bit OS

This is the correct way to perform the check as-per Microsoft’s knowledgebase reference ( http://support.microsoft.com/kb/556009 ) that I have re-edited into just a single line of code. It doesn’t rely on any environment variables or folder names and instead checks directly in the registry. As shown in a full batch file below it sets an … Read more

Hide Command Window of .BAT file that Executes Another .EXE File

Using start works for me: @echo off copy “C:\Remoting.config-Training” “C:\Remoting.config” start C:\ThirdParty.exe EDIT: Ok, looking more closely, start seems to interpret the first parameter as the new window title if quoted. So, if you need to quote the path to your ThirdParty.exe you must supply a title string as well. Examples: :: Title not needed: … Read more

Cannot run Maven using `mvn -D` argument within Microsoft Powershell, but works in Command Prompt

When you run into problems with PowerShell’s interpretation of arguments to be passed to a console EXE, try using the echoargs.exe utility that comes with the PowerShell Community Extensions. With this tool you can see how PowerShell supplies the arguments to the EXE e.g.: PS> echoargs mvn clean install -Dmaven.test.skip=true Arg 0 is <mvn> Arg … Read more

How to run a python script from IDLE interactive shell?

Python3: exec(open(‘helloworld.py’).read()) If your file not in the same dir: exec(open(‘./app/filename.py’).read()) See https://stackoverflow.com/a/437857/739577 for passing global/local variables. Note: If you are running in windows you should use double slash “//” otherwise it gives error In deprecated Python versions Python2 Built-in function: execfile execfile(‘helloworld.py’) It normally cannot be called with arguments. But here’s a workaround: import … Read more

tech