Run program from relative path

Viewed 30

I was trying to, from powershell, to make an executable to run another program like this:

PS> $env:userprofile\program.exe $env:userprofile\program2.exe

doing this I get

At line:1 char:17
+ $env:userprofile\program.exe $env:userprofile\program2.exe
+                 ~~~~~~~~~~~~~~~~~~~~~~~~
Unexpected token 'program.exe' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

both programs are in the same folder

Is such thing possible?

0 Answers
Related