Hirdetés

Új hozzászólás Aktív témák

  • simisoma22

    csendes tag

    válasz kraftxld #44397 üzenetére

    Köszi kraftxld!

    megpróbáltam:

    Kód:
    $proc = $null
    $proc = get-process - ProcessName 'DOSPrinter.exe'
    if ($proc -eq $null)
    {
    Start-Process 'C:\Program Files\DOS Printer\start.bat'
    }

    Eredmény:
    Windows PowerShell
    Copyright (C) 2009 Microsoft Corporation. All rights reserved.

    PS Z:\> $proc = $null
    PS Z:\> $proc = get-process - ProcessName 'DOSPrinter.exe'
    Get-Process : A positional parameter cannot be found that accepts argument 'Pro
    cessName'.
    At line:1 char:20
    + $proc = get-process <<<< - ProcessName 'DOSPrinter.exe'
    + CategoryInfo : InvalidArgument: (:) [Get-Process], ParameterBin
    dingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell
    .Commands.GetProcessCommand

    PS Z:\> if ($proc -eq $null)
    >> {
    >> Start-Process 'C:\Program Files\DOS Printer\start.bat'
    >> }

    A program elérhetősége a gépen: C:\Program Files\DOS Printer\DOSPrinter.exe
    de egy start.bat-ra indúl paraméterezés miatt....

    Mi lehet a gond?

Új hozzászólás Aktív témák