View Single Post
Old 31st January 2016, 23:18   #795  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 124
Quote:
Originally Posted by r0lZ View Post
OK, I'll try it that way.

But is it really necessary to provide the full path if the exe is in the current directory? IMO, that doesn't make sense, and it's a major drawback for BD3D2MK3D. Currently, a project generated by BD3D2MK3D can be moved elsewhere, because I have paid attention to never use absolute paths (except to the toolset directory). I really want to keep that feature.
You need absolute path only for cmd.exe. In the script above I'm showing how to get it without specifying full path, e.g. "c:\Windows\system32\cmd.exe"
Just replace
Code:
dir "c:\Program Files" ^| ^
more
with the command you want to execute. And don't forget to escape with ^ i/o redirection characters: | < >, as I did in this example.

Last edited by slavanap; 31st January 2016 at 23:20.
slavanap is offline