473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How create batch file using Windows SDK Command Prompt?

Currently (manually), I 1) open a Windows SDK Command Prompt and 2) navigate
to a particular folder. Then I 3) type a command and press enter. The
command is irrelevant (WCF-related) but here it is FYI:

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB

All works fine, but I need to do this over a hundred times changing "Pen" to
the names of the other classes and re-executing.

QUESTION: How can I create a batch file that I can list all the lines in and
have it run them under the Windows SDK Command Prompt?

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB
svcutil http://localhost/COWFeedyardService/Services/Lot.svc /out:Lot.vb
/config:App.config /language:VB
svcutil http://localhost/COWFeedyardService/Services/Animal.svc
/out:Animal.vb /config:App.config /language:VB
etc...

Thanks,
Ron

Apr 10 '07 #1
4 4666
Ronald,

You don't need to have it run under the Windows SDK Command Prompt. Why
not just include the full path to svcutil? That's really all you need.
That, and you need to specify a full path for the out and config parameters
as well, but that's a simple task.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Ronald S. Cook" <rc***@westinis.comwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
Currently (manually), I 1) open a Windows SDK Command Prompt and 2)
navigate to a particular folder. Then I 3) type a command and press
enter. The command is irrelevant (WCF-related) but here it is FYI:

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB

All works fine, but I need to do this over a hundred times changing "Pen"
to the names of the other classes and re-executing.

QUESTION: How can I create a batch file that I can list all the lines in
and have it run them under the Windows SDK Command Prompt?

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB
svcutil http://localhost/COWFeedyardService/Services/Lot.svc /out:Lot.vb
/config:App.config /language:VB
svcutil http://localhost/COWFeedyardService/Services/Animal.svc
/out:Animal.vb /config:App.config /language:VB
etc...

Thanks,
Ron

Apr 10 '07 #2
"Ronald S. Cook" <rc***@westinis.comwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
Currently (manually), I 1) open a Windows SDK Command Prompt and 2)
navigate to a particular folder. Then I 3) type a command and press
enter. The command is irrelevant (WCF-related) but here it is FYI:

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB

All works fine, but I need to do this over a hundred times changing "Pen"
to the names of the other classes and re-executing.

QUESTION: How can I create a batch file that I can list all the lines in
and have it run them under the Windows SDK Command Prompt?
Call SDKVARS.BAT from your batch file.

You can right click the "Windows SDK Command Prompt" shortcut to see what
it's really doing, look at the target.


Apr 10 '07 #3
So would you guys create the batch file in Notepad or something? I keep
hearing about "PowerShell" but not sure how to work with that.

Thanks for any ideas.
"John Vottero" <JV******@mvpsi.comwrote in message
news:E2**********************************@microsof t.com...
"Ronald S. Cook" <rc***@westinis.comwrote in message
news:uD**************@TK2MSFTNGP05.phx.gbl...
>Currently (manually), I 1) open a Windows SDK Command Prompt and 2)
navigate to a particular folder. Then I 3) type a command and press
enter. The command is irrelevant (WCF-related) but here it is FYI:

svcutil http://localhost/COWFeedyardService/Services/Pen.svc /out:Pen.vb
/config:App.config /language:VB

All works fine, but I need to do this over a hundred times changing "Pen"
to the names of the other classes and re-executing.

QUESTION: How can I create a batch file that I can list all the lines in
and have it run them under the Windows SDK Command Prompt?

Call SDKVARS.BAT from your batch file.

You can right click the "Windows SDK Command Prompt" shortcut to see what
it's really doing, look at the target.


Apr 10 '07 #4
"Ronald S. Cook" <rc***@westinis.comwrote in message
news:ev**************@TK2MSFTNGP03.phx.gbl...
So would you guys create the batch file in Notepad or something? I keep
hearing about "PowerShell" but not sure how to work with that.
PowerShell is MUCH better than batch scripts. It sounds like you're new to
batch scripts and PowerShell, if so, your time would be better spent
learning PowerShell.

You can use Notepad or any other text editor to create a PowerSell script.
You could also use one of these PowerShell specific editors:

http://www.powershellanalyzer.com

http://www.powershell.com

Apr 11 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows...
2
by: Herb Stevenson | last post by:
Hello all. I need to set up a batch file to work w/ the Visual Studio.NET 2003 command prompt. However, when I run the batch file it uses the standard command prompt. Is there a way to...
15
by: Viviana Vc | last post by:
How can I programatically do the equivalent of the following: cacls "C:\Program Files\test" /T /G Everyone:f ? Thanks, Viv
14
by: Mark C. | last post by:
I'm trying to call a batch file that I've built using the FileSystemObject and CreateObject("Wscript.Shell"), oShell.Run... in an asp script. Naturally, I can get the script to work from a command...
4
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup)...
6
by: Charles Neitzel | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
5
by: anand4nk | last post by:
Hi, I am installing postgreSQL 8.2 using batch files in windows xp machine. I am installing postgres using postgresql-8.2.msi installer. Installation was successful. When i tried to run...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.