Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-17-2004, 10:02 AM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
need help passing params to DOS cmd

I have a step that runs a dos cmd in it I have

%DOSCMD% "C:\My Projects\Sykes Newton\Enterprise\Version 1.0\ConfigManger\ConfigUpdate.exe" "/
configuration/appSettings/add[@key='DatasourceConnection']/@value" "initial catalog=PG_Newton;data source=SQL1;u
ser=USER1;Password=USERPWD1;Persist Security Info=False;" "C:\My Projects\Sykes Newton\Enterprise\Version 1.0\Set
up\Source\Server\Web\RemotingServices\Web.config"


I get this error
Building project step 'Remoting Services - Change the DB Name'...
Error expanding macros in property command: C:\WINDOWS\system32\cmd.exe /C "C:\My Projects\Sykes Newton\Enterprise\Version 1.0\ConfigManger\ConfigUpdate.exe" "/
configuration/appSettings/add<Error at Line 1, Column 5 (Syntax error)
Code: key='DatasourceConnection'>
Build ended.


but I can run the exact command in the dos window......any ideas ??
Reply With Quote
  #2  
Old 05-17-2004, 10:28 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Within step fields, you need to double up bracket chars to insert a literal bracket char (single brackets denote script code to be evaluated):

... [[@key='DatasourceConnection']] ...

Hold the Shift key down when mousing over a field to see the fully expanded value (with all macros expanded and script evaluated). See 'script expressions' in the help index for more details.
Reply With Quote
  #3  
Old 05-17-2004, 01:29 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
thanks that got me furthere in the process I think ...now I get this error

'C:\My' is not recognized as an internal or external command,
operable program or batch file.


but i have double quotes around the "C:\My projects....."
not sure why is complaining
Reply With Quote
  #4  
Old 05-17-2004, 01:44 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Since you're not using anything that requires running under cmd.exe (redirection, an internal command, etc.) you can just drop the %DOSCMD% prefix from the command.
Reply With Quote
  #5  
Old 05-17-2004, 02:06 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
still having issues I took out the %doscmd% and now I have just this

"C:\My Projects\Sykes Newton\Enterprise\Version 1.0\ConfigManger\ConfigUpdate.exe" "/configuration/appSettings/add[[@key='DatasourceConnection']]/@value" "initial catalog=PG_Newton;data source=PHMNL2SQL0033;user=PGNewton;Password=P6N3w0 u48 ?n;Persist Security Info=False;" "C:\My Projects\Sykes Newton\Enterprise\Version 1.0\Setup\Source\Server\Web\RemotingServices\Web.c onfig"

if I take this into cmd prompt and take away the extra "[" and "]" it runs fine.....not sure what I'm doing wrong in the first statement


any ideas ......thanks FOR ALL THE HELP SO FAR.....
Reply With Quote
  #6  
Old 05-17-2004, 02:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
What issues are you having? Have you tried updating the config file within VBP via script instead as shown here: http://www.kinook.com/Forum/showthread.php?threadid=427
Reply With Quote
  #7  
Old 05-17-2004, 02:35 PM
VBuild_Rookie VBuild_Rookie is online now
Registered User
 
Join Date: 05-07-2004
Posts: 23
I have not tried the script method just yet.....I have created a exe (Configupdate.exe) that takes a xpath to change.....it works within the command prompt......but once I place it in visual build I get this error


The filename, directory name, or volume label syntax is incorrect.

Build successfully completed.
Reply With Quote
  #8  
Old 05-17-2004, 03:07 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Not sure. Run Program does essentially the same thing that cmd.exe to run a command (call CreateProcess). It sounds like the error is coming from your exe. Try copying your exe to the root of the drive and invoke it without any parameters (i.e., use a Run Program command of C:\ConfigUpdate.exe), then add your parameters one at a time to determine what it's complaining about.
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 05:19 PM.


Copyright © 1999-2023 Kinook Software, Inc.