Another Newbie question - Error Code=1

General discussions and questions.
Bret Karson
Posts: 14
Joined: Thu Mar 15, 2018 9:53 am

Re: Another Newbie question - Error Code=1

Post by Bret Karson » Thu Mar 15, 2018 1:39 pm

This is from the setup_3dsmax.cmd file, if I am supposed to put double quotes into this file, where exactly do I put them? All paths seem to use double quotes already.
rem Source general for all soft directives:
call %CGRU_LOCATION%\software_setup\setup__all.cmd

For /F "Tokens=*" %%I in ('dir /b "C:\Program Files\Autodesk\3ds Max*"') Do set "MAX_LOCATION=C:\Program Files\Autodesk\%%I"

set "PATH=%CGRU_LOCATION%\plugins\max;%PATH%"

set APP_DIR=%MAX_LOCATION%
set APP_EXE=3dsmax.exe

rem Define location:
set locate_file=%CGRU_LOCATION%\software_setup\locate_3dsmax.cmd
if exist %locate_file% call %locate_file%

set MAX_LOCATION=%APP_DIR%

Bret Karson
Posts: 14
Joined: Thu Mar 15, 2018 9:53 am

Re: Another Newbie question - Error Code=1

Post by Bret Karson » Thu Mar 15, 2018 2:44 pm

Making progress.
After trying to figure out the previous cmd files I noticed that inside \software_setup\bin there are respective cmd-files as well.

They contain a line with an %APP_DIR% variable.

If I change this to an absolute path, from:
"%APP_DIR%\3dsmaxcmd.exe" %*
to:
"C:\Program Files\Autodesk\3ds Max 2017\3dsmaxcmd.exe" %*
the job is successfully launched and rendering.

Likewise if I change aerender.cmd and afterfx.cmd in the same way After Effects will render fine.

So from what I can tell the issue is due to spaces in search paths, but when evaluating the %APP_DIR%\app.exe variable it is not evaluated within double quotes, hence why an absolute path within double quote works, but a variable within double quotes does not.

Bret Karson
Posts: 14
Joined: Thu Mar 15, 2018 9:53 am

Re: Another Newbie question - Error Code=1

Post by Bret Karson » Thu Mar 15, 2018 2:56 pm

I can confirm that it is only the cmd-files inside the \software_setup\bin that needs editing.

User avatar
timurhai
Site Admin
Posts: 384
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Another Newbie question - Error Code=1

Post by timurhai » Thu Mar 15, 2018 4:07 pm

Hm, strange, as this is in quotes too

Code: Select all

"%APP_DIR%\3dsmaxcmd.exe" %*
Timur Hairulin
CGRU 2.3.0 Debian 9, Ubuntu 18.04LTS, MS Windows 7,10 (client only).

Bret Karson
Posts: 14
Joined: Thu Mar 15, 2018 9:53 am

Re: Another Newbie question - Error Code=1

Post by Bret Karson » Thu Mar 15, 2018 4:44 pm

Maybe it is the variable itself that is causing this issue. Like, if it refers to a path that contains spaces, the variable will only yield "C:\Program".

In that case it does not matter if %APP_DIR% is contained within double quotes, because the variable will still be "C:\Program", and the resulting path will be "C:\Program\executable.exe", wich is a file that does not exist.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests