Set objFSO=CreateObject("Scripting.FileSystemObject")
outFile="C:\Program Files\number2.vbs"
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.WriteLine "Set objWshShell = CreateObject(""WScript.Shell"")"
objFile.WriteLine "objWshShell.RegWrite ""HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFileMenu"", 1, ""REG_DWORD"" "
objFile.WriteLine "Set objWshShell = Nothing"
objFile.Close
------------------Below part doesnt work in script-------------------------------
ObjFile.Attributes = objFile.Attributes XOR 2
---------------------------Below part doesnt work in script-------------------
Set objShell = Wscript.CreateObject("WScript.Shell")
objShell.Run "C:\Program Files\number2.vbs"
Set objShell = Nothing
當我做objshell.run它說它無法找到指定的文件和objfile屬性它說它無法找到屬性的方法?我運行的文件沒有運行部分,它的工作原理和創建文件,所以最後混淆了爲什麼運行無法工作,如果它首先創建文件?爲什麼不會objshell工作