none
Doubt in executing powershell cmd in VBS RRS feed

  • Question

  • Hello All,

    I have tried to run the below VB script from my machine and it was executed successfully.

    option explicit
    Dim ObjWshell
    
    set ObjWshell = wScript.createObject("WScript.Shell")
    
    ObjWshell.run("powershell -noexit -file 'C:\Users\kpqp890\Desktop\cortanapwrshel.ps1'")

    But when i executed the query, the powershell page was opened for few second and gone away.

    i need to avoid that powershell page during the execution, please help me to modify the vbs to avoid it.


    THANKS SURESH M

    • Moved by Bill_Stewart Wednesday, September 4, 2019 7:15 PM Unanswerable drive-by question
    Friday, March 22, 2019 9:12 AM

All replies

  • What query?  PowerShell does not have pages.  You will need to make your question clear.


    \_(ツ)_/

    Friday, March 22, 2019 10:27 AM
  • Need to execute the above VBS without powershell window pop-up(silently)

    THANKS SURESH M

    Friday, March 22, 2019 10:51 AM
  • Start by reading the command parameters:

    powershell /?


    \_(ツ)_/

    Friday, March 22, 2019 2:43 PM
  • Need to execute the above VBS without powershell window pop-up(silently)

    See https://ss64.com/vb/run.html

    Set the window style. 

    Friday, March 22, 2019 4:02 PM