跳到主内容

搜索

搜索

Windows Environment Variables With Commander?

评论

4 条评论

  • Avatar
    Ian Cummings
    版主

    The use of Commander/Enviromental variables is with the percent sign syntax.  For example, the most commonly used is something like /D="%Trigger File Name%" to set the data file name of the print job to be equal to the file that Commander just detected and renamed.  Does that help you?

    0
  • Avatar
    Legacy Poster

    The use of Commander/Enviromental variables is with the percent sign syntax.  For example, the most commonly used is something like /D="%Trigger File Name%" to set the data file name of the print job to be equal to the file that Commander just detected and renamed.  Does that help you?

    Thanks, Ian, but I still cannot get it to work. In windows 2008, Commander 10.1 I have a user variable defined under environment variables called TESTTEMPLATE, which points to c:\commander\label.btw. When I navigate in windows file explorer to %TESTTEMPLATE%, it loads that file up properly.

     

    To confirm proper printing of a hard-coded BTW, I have a file with this at its beginning, WEV_1 (see attachment). That works well.

     

    I then copied/pasted that file, and renamed it slightly and confirmed the renamed file worked. I then changed only the file lable location to call %TESTTEMPLATE%, and tried again, but now nothing prints (WEV_2 attachment), this whether I enclose the %TESTTEMPLATE% in double quotes or not. To confirm that file was otherwise still good, I also finally changed %TESTTEMPLATE% again back to the hard-coded location, saved, and tried the file again and it ran.

     

    So basically I have confirmed that %TESTTEMPLATE% is a proper environment variable, but when commander runs, it just doesn't seem to translate it. 

     

    Thanks!

    0
  • Avatar
    Ian Cummings
    版主

    Is that a user or system based ENV variable?  If user then you'd need to make sure that the Commander application/service is also running under that same account.  Any reason why you don't just setup a custom Commander varaible?  Do this via the, "File>Task List Options" menu item, select the "Variables" tab, and specify your name/value variable pairs.

    0
  • Avatar
    Legacy Poster

    Is that a user or system based ENV variable?  If user then you'd need to make sure that the Commander application/service is also running under that same account.  Any reason why you don't just setup a custom Commander varaible?  Do this via the, "File>Task List Options" menu item, select the "Variables" tab, and specify your name/value variable pairs.

    Hi Ian, it was a user based variable and Commander running under application mode as the current user, but your comment gave me some ideas of where else to look.

     

    However, task list variables are going to work perfectly--I had not used this before, and they fit the bill precisely. Just tested and working in my test. Kinda scary I never noticed them before   :o

     

    Thanks for your help! I'm good to go now.

    0

请先登录再写评论。