Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
dynamic IWHOME in DCT
System
In a DCT inline, if I have a path to a script or pass a script a parameter that is a path file, and the path includes L:\iw-home, is there some symbol I can put in the DCT instead of L:\iw-home that makes it dynamic instead of hard-coding it? I think that IWHOME will be the same on the DEV, QA and PROD TeamSite servers, but I can't be sure, and if it weren't, how would this issue be addressed?
Everywhere else in all code (except some .cmd files) IWHOME is not hard-coded. Does anyone know how to set IWHOME dynamcially in a batch file (other than using an environment variable)?
Thanks in advance.
Find more posts tagged with
Comments
Adam Stoller
I filed a feature request for something like this, based on a previous DevNet posting.
The feature request id is 36868
The description is: DCT inline should support token for iw-home
Feel free to contact Interwoven Support and ask to have your customer name associated with that request.
--fish
(Interwoven Senior Technical Consultant)
Adam Stoller
Does anyone know how to set IWHOME dynamcially in a batch file (other than using an environment variable)?
Do you mean something like this?
set IWHOME=`iwgethome`
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
That doesn't work for me. I think it may be specific to Perl.
C:\TEMP>type try.cmd
set IWHOME=`iwgethome`
echo %IWHOME%
C:\TEMP>.\try.cmd
C:\TEMP>set IWHOME=`iwgethome`
C:\TEMP>echo `iwgethome`
`iwgethome`
Adam Stoller
I've never done much .bat programming on WIndows - so I'm not sure the answer here - other than the reliance on environment variables or registry values.
Where possible, I use Perl - because it does things like this very easily.
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
Still trying to get around the problem of hard-coding IWHOME in DCTs. If I use a .cmd, the operating system will find it in the path. If I use a .ipl, I have to give it the full path to the .ipl and/or the perl binary, which can't be dynamic. Which I think means even an IWHOME in the environment wouldn't help me. I think there is an environment variable I can set (PATHEXT?) that tells NT which extensions to look for in the path, but I am not sure I want to do that. Maybe I am just spinning my wheels though.
For some things Perl seems like a lot of overhead. I think there are other cases where I need to use .cmd files as well - to make sure the OS uses the Perl binary to open .ipl files. For instance this comes up if someone accidentally use "open with" on an .ipl file, selects an editor, and leaves "always use this application to open files of this type" selected. Not that I've ever done that...anyway I'm sure there's a better fix but I like to be explicit when I can.
Adam Stoller
As I indicated in my first response - there is a feature request for this (36868) - I don't think there is any simple work-around that can be done in the current version of the product. I'm more than willing to be proved wrong, but I don't think it matters if you use .bat, .cmd, .ipl, .pl, .java - you're attempting to pre-process something which itself is part of the pre-processing-process.
For the time being I think you will have to hard-code the path into the DCT
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
The PATHEXT thing seems to work.
Migrateduser
Well, for some reason it works on the command line, but not from within a DCT.
X:\>type.ipl c:\iw-home\custom\config\MetaDCT.cfg
works (type.ipl is in IWHOME/custom/bin). But inline command="type.ipl c:\iw-home\custom\config\MetaDCT.cfg" fails in both iwdctacleval and in the GUI. I have always wondered why SYSTEM environment variables (of which the PATHEXT which is required to support this) are not visible to inlines. Does anyone know?
soka
Has anything happened to this FR lately? Is it out with a SP?
Akos
Migrateduser
This feature request is still open. If it is important to your organization, please open a support case, and ask to have your name added to the feature request.
Regards,
lissa