Maya LT Batch mode - maya

I'm trying to run a MEL script from the command line (OS X) using Maya LT 2015. Instructions on how to do this can be found here:
Autodesk Maya LT - Start Maya from the command line
But when I try Maya -prompt or Maya -batch -script "test.mel" is just get this:
Flags:
-v prints the product version and cut number
-proj [dir] look for files in the specified project dir
-file [file] opens the specified file (use complete file name)
-archive [file] displays a list of files required to archive the specified scene
-noAutoloadPlugins do not auto-load any plug-ins.
-help prints this message
Seems like it doesn't support the -batch flag. Any ideas?

After lots of testing I came to the conclusion that Maya LT doesn't support batch mode. The documentation on Autodesk's website is incorrect (it's a copy of the regular Maya documentation).

Related

How to run batch file inside Visual Studio 2022 Developer Command Prompt

I recently upgraded to VS2022 I cannot find a way to start developer command prompt and run a batch file inside it. Previously I called vsvars32.bat and it set all variables and paths, allowing me to continue in my .bat file. In the current version it does not work and when I call VsDevCmd.bat, the rest of commands in my batch file are not executed.
Is there a way to call developer command prompt or set paths and variables from batch file and continue?
I did not find any other solution so ended up using pipe like this:
type cmds.txt | "c:\Program Files\Microsoft Visual
And cmds.txt contains batch file invocation:
buildall.bat
Not pretty, but works.
I just want to thank you and confirm that this was the only way to automate compilation of a C++ project trhough VS Code.
I tried setting up tasks.json in VS Code and multiple other setups but after 4 days of that nothing worked except your solution PiotrK.
So I ended up preparing a TXT file with a list of commands like so:
set PATH=%PATH%;"C:\Users\DEKOLEV\AppData\Local\Programs\Microsoft VS Code\bin"
cd "C:\path\to\some\folder\with\C++\source\code\files"
code .
}
and I piped the text file directly to the Developer Console link. So now I have a batch file containing the following
type "C:\Some\path\to\file\commands.txt" | "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools\VC\x64 Native Tools Command Prompt for VS 2022.lnk"
Starting the batch file starts the x64 developer command prompt and runs VS Code from it which enables VS Code to compile the source C++ files with the environment x64 Native Tools Command Prompt for VS 2022 provides.
I don't have enough points to post a comment so I am posting this feedback as an answer. :)

Why are .exe files not generating output when called from batchfile within IAR?

I stumbled upon a strange issue where commandline executables (not build-ins!) do not generate any output, when invoked through a batch file in the Pre-Build or Post-Build actions of IAR Embedded Workbench 8.0 in Windows 10.
I did a simple test where the IAR Pre-Build action is configured to run pre_build.bat:
The batch file simply contains the following line:
git status > c:\some_specific_directory\status.txt 2>&1
When called from PowerShell or cmd the result is as expected: the output of git status is stored in status.txt. If git is invoked directly from IAR (without calling batch-file), git works as expected, too. If the batch file is invoked through the IAR pre-build actions, status.txt is empty.
This issue seems to affect any tools that are .exe files. So far, I have noticed this behaviour with where, git, python.
It also seems that these commands are opened in a new shell (the more commands in the batch-file, the more batch windows seem to quickly pop open and immediately close again).
Versions used:
Windows 10 1703
IAR Embedded Workbench for ARM 8.20.1.14188
git 2.13.2.windows.1
From: IAR Tech Note Build Actions, you want:
CMD /C "CMD /C "git status > c:\some_specific_directory\status.txt 2>&1""

'tar' is not recognized as an internal or external command

I am trying to extract a zip file in Windows 10 using a batch script.
It a simple command:
tar zxf "logstash-5.4.0.tar.gz"
ECHO "installed"
But I am getting following error:
'tar' is not recognized as an internal or external command
I have seen that I have to install the tar but how can I do that?
How can I do this?
EDIT Tar is pre installed in windows or we have to externally add it? Still how can i extract without using third party tool.
You can download Tartool Application in your desktop and paste it into
C:\Windows\system32\
For eg:-(C:\Windows\system32\tartool.exe)
By doing this it work as internal command when you want to extract your file you can simply use
C:>TarTool.exe D:\sample.tar.gz ./
For more commands you can read documention part of that Tool
Starting windows 10 build 17063, TAR is an inbuilt tool and no need to install it separately. MSDN link
For example, to uninstall a file named XYZ.zip you can execute the following in Command Prompt.
tar -xvf XYZ.zip

Creating .exe from command line in installshield

can we make .exe file from command line in installshield, and that .exe file will open a text file? I know how to create .exe file from Install shield UI but i'm not finding any stuff on creating an exe from command line using installshield.
If your InstallShield project has release (in my examples release called "Othello Beta") which produces .exe package and you would like to build it from command line, you need to use automation. For this you would use:
ISCmdBld.exe: Hot to use ISCmdBld.exe and example would be:
ISCmdBld.exe -p "C:\InstallShield 2012 Spring Projects\My Othello Project\Othello.ism" -r "Othello Beta" -c COMP -a "Build 245"
IsSABld.exe: This will looks like the following:
IsSABld.exe" -p "C:\InstallShield 2012 Spring Projects\My Othello Project\Othello.ism" -b "C:\InstallShield 2012 Spring Projects\My Othello Project" -r "Othello Beta"

Unzip tar.gz in Windows

I would like to unzip Filename.tar.gz to Filename using single command in windows batch script
All the files inside zip should go inside the Filename Folder
I am trying to do in windows . I am not getting correct output.
Can anyone suggest an idea
Windows Command line now supports tar from Windows 10 insider build 17063. You may try run the below command in cmd or PowerShell to see if it works:
tar xzvf your-file-name.tar.gz
7 zip can do that: http://www.7-zip.org/
It has a documented command line. I use it every day via scripts.
Plus: it is free and has 32 and 64 bit versions.
Windows 10 command line supports tar command
Write the tar command as general to the Linux terminal.
tar -zxvf tar-filename.tar.gz --directory destination-folder
Another option is the Arc program:
arc unarchive test.tar.gz
https://github.com/mholt/archiver
in windows compand promt use quotation marks ("") when specifying the path. It will work properly
Exaple : tar -xvzf "C:/PATH/TO/FILE/FILE-NAME.tar.gz" -C "C:/PATH/TO/FOLDER/EXTRACTION"
tar -xvzf "C:/PATH/TO/FILE/FILE-NAME.tar.gz"

Resources