This isn't a bug, it's working as intended. There is no attempt in the Windows installer to set up a file association with .cmd. It is done, intentionally, only for .rex.
You can add an association for .cmd yourself, if you want to.
The Windows installer sets up, correctly, the RexxScript file type. The .rex extension is associated with Rexxscript:
Starting with 32-bit Windows, the .CMD extension (in addition to the .BAT extension) is used by Windows itself to run batch commands. If ooRexx changed .CMD from cmdfile to RexxScript, it might have a big (unwanted) impact.
You can easily make this change by issuing the command assoc .cmd=RexxScript
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Starting with 32-bit Windows, the .CMD extension (in addition to the .BAT extension) is used by Windows itself to run batch commands. If ooRexx changed .CMD from cmdfile to RexxScript, it might have a big (unwanted) impact.
You can easily make this change by issuing the command
assoc .cmd=RexxScript
It's interesting to note that the ooRexx Reference manual for 3.1.2 shows the following in section 8.2.1 - stating that it will look for .CMD files
The search order for external functions is as follows:
1. Functions defined on ::ROUTINE directives within the program.
2. Public functions defined on ::ROUTINE directives of programs referenced with ::REQUIRES.
3. Functions that have been loaded into the macrospace for preorder execution. (See the Open Object
Rexx: Programming Guide for details.)
4. Functions that are part of a function package. (See the Open Object Rexx: Programming Guide for
details.)
5. Rexx functions in the current directory, with the current extension.
6. Rexx functions along environment PATH, with the current extension.
7. Rexx functions in the current directory, with the default extension (.REX or .CMD).
8. Rexx functions along environment PATH, with the default extension (.REX or .CMD).
9. Functions that have been loaded into the macrospace for postorder execution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I could be wrong, but I thought that there was an environment variable that could be set that would define the suffices and suffix search order. Perhaps in the programmers reference.
Bruce
Starting with 32-bit Windows, the .CMD extension (in addition to the .BAT extension) is used by Windows itself to run batch commands. If ooRexx changed .CMD from cmdfile to RexxScript, it might have a big (unwanted) impact.
You can easily make this change by issuing the command
assoc .cmd=RexxScript
I don't think you got the point I was trying to make.
Something change in ooRexx.
I am running ooRexx 3.1.2 on Windows 7 and there is no association in Windows between .cmd and RexxScript. Windows only shows .cmd associated with cmdfile. Something within ooRexx knew to look for rexx in .cmd files, but not Windows. Why was this changed? Why is ooRexx not backward compatible?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This isn't a bug, it's working as intended. There is no attempt in the Windows installer to set up a file association with .cmd. It is done, intentionally, only for .rex.
You can add an association for .cmd yourself, if you want to.
The Windows installer sets up, correctly, the RexxScript file type. The .rex extension is associated with Rexxscript:
C:\temp>ftype RexxScript
RexxScript="C:\Rexx\ooRexx\rexx.exe" "%1" %*
C:\temp>assoc .rex
.rex=RexxScript
If you want to add the .cmd extension, you just need to associate .cmd with RexxScript. You can do that from the command line by typing:
C:\temp>assoc .cmd=RexxScript
.cmd=RexxScript
Normally, you would also need to add .cmd to PATHEXT, but on Windows systems, it is already in the PATHEXT:
C:\temp>set PATHEXT
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.rex;.rexg;.rexp
The reason it is already in the PATHEXT is because normally, on Windows, .cmd files are associated with the Windows command processor.
It is up to you if you want to change that. I normally wouldn't recommend it to someone, but it's your system and you can do what you want with it.
However, since it is actually Windows that sets up this association, we are not going to over-ride it.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
This worked in ooRexx 3.x and all the back to the original IBM Ojbect Rexx. What about backward compatibility? Why was this changed?
Starting with 32-bit Windows, the .CMD extension (in addition to the .BAT extension) is used by Windows itself to run batch commands. If ooRexx changed .CMD from cmdfile to RexxScript, it might have a big (unwanted) impact.
You can easily make this change by issuing the command
assoc .cmd=RexxScript
In the Rex language reference it has details on how an external Rex file is found in section 7.2.1.1 "Locating External Rexx Files"
Sent by Magic!
Related
Bugs:
#960View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
It's interesting to note that the ooRexx Reference manual for 3.1.2 shows the following in section 8.2.1 - stating that it will look for .CMD files
The search order for external functions is as follows:
1. Functions defined on ::ROUTINE directives within the program.
2. Public functions defined on ::ROUTINE directives of programs referenced with ::REQUIRES.
3. Functions that have been loaded into the macrospace for preorder execution. (See the Open Object
Rexx: Programming Guide for details.)
4. Functions that are part of a function package. (See the Open Object Rexx: Programming Guide for
details.)
5. Rexx functions in the current directory, with the current extension.
6. Rexx functions along environment PATH, with the current extension.
7. Rexx functions in the current directory, with the default extension (.REX or .CMD).
8. Rexx functions along environment PATH, with the default extension (.REX or .CMD).
9. Functions that have been loaded into the macrospace for postorder execution.
I could be wrong, but I thought that there was an environment variable that could be set that would define the suffices and suffix search order. Perhaps in the programmers reference.
Bruce
Sent by Magic!
Related
Bugs:
#960View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I don't think you got the point I was trying to make.
Something change in ooRexx.
I am running ooRexx 3.1.2 on Windows 7 and there is no association in Windows between .cmd and RexxScript. Windows only shows .cmd associated with cmdfile. Something within ooRexx knew to look for rexx in .cmd files, but not Windows. Why was this changed? Why is ooRexx not backward compatible?