0
ResGen.exeでリソースファイルを生成するためにVBScriptで作業していて、ResGenのエラーメッセージを収集してこれをファイルに書き込む必要があります。 objShell.Runライン後)ここでスクリプトのショーに存在するが、私はそれを行う方法を知っていないResGen.exeのVBscriptログ応答
'' Folder that contains the files
folderpath = "C:\Users\Administrator\Desktop\Author\author\"
'Destination folder from generated files
destfolder = "C:\Users\Administrator\Desktop\Author\author\"
'Folder contains the text file with list of files names
listfolder = "C:\Users\Administrator\Desktop\Author\"
listfile = listfolder + "list.txt"
logfile = listfolder + "log.txt"
resgen = "ResGen.exe /compile"
Set objShell = CreateObject("WScript.Shell")
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Wscript.echo listfile
Set objFile = objFSO.OpenTextFile(listfile, ForReading)
Wscript.echo "Reading file"
Do While objFile.AtEndOfStream = False
strLine = objFile.ReadLine
cmdexec = Chr(34) + folderpath + strLine + "resx" + Chr(34) + " " + Chr(34) + destfolder + strLine + "resources" + Chr(34)
execommand = resgen + " " + cmdexec
objShell.Run execommand,1,TRUE
Loop
objFSO.Close
、私は、このコマンドの応答を保存するために置くために必要なもの?コマンドの後に ">>" C:\ log.txt ""を追加しようとしましたが、このリソースファイルは生成されず、txtファイルにのみ応答が保存されます。
私は正しく説明しました。
ありがとうございます!
は