Reputation: 21
I have query related to this topic. Here is my script. I'm using below script to edit users on HP ILo board
, it works fine, no error at all.
BUT here I can see cmd prompt, how do I run it in silent mode, i.e I do not want to see any cmd prompt, because I use BMC
, so let it run in background, I will check the output later.
As you said I can simply change WScript
to CSrcipt
. But that does not work.
Any help please, please let me know where to modify.
Set wshShell = WScript.CreateObject ("WScript.Shell")
WshShell.Run "cmd.exe /v:on /k (set MYDIR=C:\Program Files\HP\hponcfg) & cd /d ""!MYDIR!"" & HPONCFG.exe /f Add_User1.xml /l log1.txt > output1.txt"
WScript.Sleep 1*60*1000
WshShell.Run "cmd.exe /v:on /k (set MYDIR=C:\Program Files\HP\hponcfg) & cd /d ""!MYDIR!"" & HPONCFG.exe /f Add_User2.xml /l log2.txt > output2.txt"
Set wshShell = Nothing
Wscript.quit
Regards
Upvotes: 1
Views: 783
Reputation: 38745
Use the second parameter of the .Run method
intWindowStyle Optional. Integer value indicating the appearance of the program's window. Note that not all programs make use of this information.
As I know nothing about BMC, I'd start with minimized (7, 6) before I'd try hidden (0).
Upvotes: 1