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

How write a simple script file to execute basic commands?

P: n/a
I'm trying to automate our builds and publishes of our Windows application
(deployed to a website via ClickOnce).

I'm getting close, I think, on the commands I need to execute. However, how
do I put these commands in some sort of executable file?

I thought at first a VBScript file (Windows script), but from what I'm
reading that is old techology.

A script in PowerShell? Not too familiar with this?

A Windows Console Application?

Here are the commands I wish to execute nightly:

***************
msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlddev
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlddev /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworldtest
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworldtest /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlduser
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlduser /s
***************

If it matters, being in the Visual Studio 2008 Command Prompt is required (I
don't think it can be done from a regular command prompt).

The last time I dealt with anything like this is was creating autoexec.bat
files in DOS 20 years ago!

Thanks.

Aug 24 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Aug 24, 2:29*pm, "rcook349" <rc...@westinis.comwrote:
I'm trying to automate our builds and publishes of our Windows application
(deployed to a website via ClickOnce).

I'm getting close, I think, on the commands I need to execute. *However, how
do I put these commands in some sort of executable file?

I thought at first a VBScript file (Windows script), but from what I'm
reading that is old techology.

A script in PowerShell? *Not too familiar with this?

A Windows Console Application?

Here are the commands I wish to execute nightly:

***************
msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlddev
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlddev /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworldtest
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworldtest /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlduser
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlduser /s
***************

If it matters, being in the Visual Studio 2008 Command Prompt is required(I
don't think it can be done from a regular command prompt).

The last time I dealt with anything like this is was creating autoexec.bat
files in DOS 20 years ago!

Thanks.
You should be able to use System.Diagnostics.Process.Start to execute
those.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
Aug 24 '08 #2

P: n/a
i think a batch file can do the job
just do not forget the path for msbuild

"rcook349" <rc***@westinis.comwrote in message
news:23**********************************@microsof t.com...
I'm trying to automate our builds and publishes of our Windows application
(deployed to a website via ClickOnce).

I'm getting close, I think, on the commands I need to execute. However,
how do I put these commands in some sort of executable file?

I thought at first a VBScript file (Windows script), but from what I'm
reading that is old techology.

A script in PowerShell? Not too familiar with this?

A Windows Console Application?

Here are the commands I wish to execute nightly:

***************
msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlddev
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlddev /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworldtest
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworldtest /s

msbuild.exe helloworld.vbproj /target:publish
/property:publishurl=http://localhost/helloworlduser
xcopy.exe d:\projects\helloworld\helloworld\bin\debug\app.pu blish
c:\inetpub\wwwroot\helloworlduser /s
***************

If it matters, being in the Visual Studio 2008 Command Prompt is required
(I don't think it can be done from a regular command prompt).

The last time I dealt with anything like this is was creating autoexec.bat
files in DOS 20 years ago!

Thanks.
Aug 24 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.