By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 1,647 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

How create batch file using Windows SDK Command Prompt?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.