1

Windows 7 64 ビットに IBM DOORS をインストールしています。DOORS DXL 関数の tempFileName() を実行すると、C:\Users\\AppData\Local\Temp などではなく \ が返されます。この問題をグーグルで検索しましたが、問題について何も表示されません。誰にもアイデアがありますか?

問題を示すサンプルコードは...

string productDetailsFile = tempFileName()
print "productDetailsFile = " productDetailsFile "\n"
if(canOpenFile(productDetailsFile, true))
print "Can write to file\n"
Stream out = write productDetailsFile
out << "Created by " doorsname " at " dateAndTime today ""   
if (null out)
{
    print "Could not create file " productDetailsFile ""
    halt
}
flush out
close out
string directory = getDirOf (productDetailsFile)
print "directory = " directory "\n"
string newFileName = directory NLS_("\\") NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
print "newFileName = " newFileName "\nAttempting to rename now\n"
string errorMsg = renameFile(productDetailsFile, newFileName)
if (!null errorMsg)
{
    print "Rename failed with error - " errorMsg "\nTrying with modified file name now\n"
    newFileName = directory NLS_("DOORS_") doorsInfo(infoVersion) (NLS_(".xml_new"))
    print "newFileName = " newFileName "\nAttempting to rename now\n"
    errorMsg = renameFile(productDetailsFile, newFileName)
    if(!null errorMsg)
        print "Still fails. Stopping script now, please send the DXL Output to Support"
 }
 else
     print "Rename successful"
4

1 に答える 1

1

根本的な原因は、DOOR を実行しているコンピューターの TEMP の「システム変数」が C:\Users\user-name\AppData\Local\Temp に設定されており、TEMP に「ユーザー変数」が設定されていなかったことです。

関数を機能させるには:

  1. TEMP の「システム変数」が「%SystemRoot%\TEMP」に変更されました
  2. 「TMP」という別の「システム変数」を作成し、「%SystemRoot%\TEMP」にも設定しました。
  3. 2 つの「ユーザー変数」: TEMP と TMP を作成し、それらを「%USERPROFILE%\AppData\Local\Temp」に設定します。
于 2013-06-27T15:55:07.803 に答える