Passing parameters locally and on a remote machine


i can't recognize splash parameter

 

$exe

 

 

= "c:\program files (x86)\somevendor\someapp\launch.exe"

$cmdline

 

 

= "splash"

&

 

$exe $cmdline

this target box looks in shortcut.

"c:\program files (x86)\somevendor\someapp\launch.exe" splash

from get-help about_operators:

&  call operator
        description: runs command, script, or script block. because call
        operator not parse, cannot interpret command parameters.
        call operator, known "invocation operator, indicates
        value precedes command. enables run commands
        stored in variables , represented strings.

i think invoke-expression might work better in application:

 

$exe = '"c:\program files (x86)\somevendor\someapp\launch.exe" '

$cmdline = "splash"

invoke-expression  ($exe + $cmdline)


[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B