Can't run command in PowerShell but OK in Cmd

Page 2 of 2 FirstFirst 12

  1. Posts : 5,478
    2004
       #11

    tcebob said:
    how can I fix PS to recognize /@?
    Try --%

    That tells Powershell not to try to parse the rest of the line but just pass it as is.

    So
    Code:
    "C:\Program Files\AVAST Software\Avast\ashCmd.exe" --% /@=Quick
      My Computer


  2. Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter
       #12

    Good to know, lxo7. I'll try it. But right now I've avoided the problem by downloading System Scheduler https://www.splinterware.com which ran the command perfectly, using "c:\program files\avast software\avast\ashcmd.exe" as the application and /@=Quick as the parameter. It used cmd automatically.
      My Computer


  3. Posts : 42,988
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #13

    tcebob said:
    dalchina, your idea is brilliant and simple. The batch file works fine when run from the desktop. But, alas, does not run from the task scheduler. It says "Running" but nothing happens. Task scheduler shows in Task Manager while it's running.

    ... Edited out the /@=Quick part and still won't run. So maybe it has something to do with the ashCmd.exe program or with Avast.
    Strange. You could convince yourself the bat file is executed by picking something without a parameter that can be run from a command line- even just
    DIR C:
    Pause

    say.

    Just wondering if there's a difference in running as admin or a standard user for ashCmd?
    I have Avast free, but not that for whatever reason.
      My Computers


  4. Posts : 481
    Windows 10 pro 1903 1862.145
    Thread Starter
       #14

    Don't know. AshCmd.exe has no user interface; if you run it it will open cmd.exe and display help. Similarly, running from within cmd shows help. You have to specify arguments. It probably doesn't come with Avast free.

    I've tried running some scheduled tasks installed by programs. Same results: TS says "Running" but nothing happens and I have to terminate them manually. So something is weird about TM.

    I have System Scheduler, an alternative to TM and it runs ashCmd just fine. But it is unable to wake the computer.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:46.
Find Us




Windows 10 Forums