jackylee0908 Posted January 10, 2019 Posted January 10, 2019 (edited) Hi sir, I am trying to execute below code in one line but it doesn't work for me, no error message appeared just quickly pass after executing it. RunWait("ipmitool.exe " & "-H" & " " & "172.16.10.100" & " " & "-U" & " " & "Administrator" & " " & "-P" & " " & "Administrator" & " " & "fru" & " " & ">>" & " " & "c:\host\testlog\bmc_log\bmc_fru_org_1.log") Please advise what's the problem, thanks. Jacky Edited January 10, 2019 by jackylee0908
Subz Posted January 10, 2019 Posted January 10, 2019 Is this a Cmd based executable? Does the executable exist? Run the following code in Scite and then use the output directly into Start » Run and see if it runs. $sCommand = "ipmitool.exe -H 172.16.10.100 -U Administrator -P Administrator fru >> c:\host\testlog\bmc_log\bmc_fru_org_1.log" ConsoleWrite($sCommand & @CRLF)
jackylee0908 Posted January 10, 2019 Author Posted January 10, 2019 Hi, @Subz, Thanks, I have solved it, just change it to: RunWait(@ComSpec & " /c" & "ipmitool.exe " & "-H" & " " & $CmdLine[2] & " " & "-U" & " " & $CmdLine[3] & " " & "-P" & " " & $CmdLine[4] & " " & "power" & " " & "status" & " " & ">>" & " " & $sFile2) Thanks.
Subz Posted January 10, 2019 Posted January 10, 2019 Thought that was the case when I saw the ">>" within the code.
jackylee0908 Posted January 10, 2019 Author Posted January 10, 2019 1 minute ago, Subz said: Thought that was the case when I saw the ">>" within the code. Thanks, I have another question and raised to another topic, please help me, thank you.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now