0

I had a CMD command to set VLC media player to record video in certain time period that user requested. It was working until McAfee having updated definition from the corporate server to stop accessing the wscript object on the workstation. As corporate SA is not willing to open exception, I need to find out a way to not calling wscript or cscript to run the command like below:

"C:\Program~1\VideoLAN\VLC\vlc -vvv udp://@ Video101,10.1.1.101:4800,12,03,14,00,0,30,15,C:\Videos\101"

And tried PowerShell and it was blocked as well.

Ansgar Wiechers
  • 193,178
  • 25
  • 254
  • 328
new_IT_us
  • 1
  • 2
  • 1
    [The Windows command prompt is *NOT* a DOS prompt!](https://scalibq.wordpress.com/2012/05/23/the-windows-command-prompt-is-not-a-dos-prompt/) – aschipfl May 07 '19 at 16:16
  • @aschipfl You're correct. It's command within the Windows. – new_IT_us May 07 '19 at 23:46
  • Nothing about the command in your question involves VBScript. You should be able to simply paste it into a Command Prompt and run it from there. Or write it to a batch file and run that batch file. If CMD/batch is blocked as well by your corporate policies you probably cannot run commands like that without violating corporate policies. If you the command is required for your work you need to talk to your superiors and tell them that their policies are preventing you from doing your work. – Ansgar Wiechers May 08 '19 at 09:12
  • Supervisor just demanded to make things happen. That's why I research if possible to make the CMD happen in someway. Thanks @Ansgar Wiechers for your answer. – new_IT_us May 10 '19 at 06:46

1 Answers1

1

Yes.it is possible In VBScript.

For example,If you want to shut down the computer, you can run it via objShell.Run

Here is my way :

rc = objShell.Run "C:\WINDOWS\system32\shutdown.exe -r -t 0", 0, True
If rc <> 0 Then MsgBox "shutdown failed with exit code " & rc & "."