Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 05-22-2008, 02:13 PM
tan125 tan125 is online now
Registered User
 
Join Date: 08-30-2007
Location: PA
Posts: 15
Send a message via Yahoo to tan125
Powershell step cannot find file specified

I'm running VBP 6.7 and am trying to use the PowerShell step to alphabetize a list by putting the following into the Powershell script window:

$abcList = (get-content %PROJDIR%\CompareFiles_%BASELINE_VERSION%.txt) | sort-object

$abcList | out-file -filepath %PROJDIR%\CompareFiles_%BASELINE_VERSION%.txt

(Above, BASELINE_VERSION is an integer and PROJDIR is a path on the D: drive.)

If I run these lines from the Powershell command line, it works fine. But when running from the Powershell action in VBP, I get "Failed to create process: The system cannot find the file specified."

Any ideas?
Reply With Quote
  #2  
Old 05-22-2008, 02:51 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
It appears that powershell.exe is not in the PATH environment variable of the Visual Build process (normally PowerShell adds itself to the path during installation). You could try entering the full path+filename (typically C:\Windows\system32\WindowsPowerShell\v1.0\powersh ell.exe) in the Override field on the Options tab of the PowerShell action.
http://www.visualbuild.com/Manual/powershellopttab.htm
Reply With Quote
  #3  
Old 05-22-2008, 02:58 PM
tan125 tan125 is online now
Registered User
 
Join Date: 08-30-2007
Location: PA
Posts: 15
Send a message via Yahoo to tan125
Thanks! That was apparently what was missing. It works great now.

-Tom
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:17 PM.


Copyright © 1999-2023 Kinook Software, Inc.