467,894 Members | 1,436 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,894 developers. It's quick & easy.

How write a simple script file to execute basic commands?

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
  • viewed: 5287
Share:
2 Replies
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
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.

Similar topics

10 posts views Thread by EnjoyNews | last post: by
9 posts views Thread by Yaro | last post: by
11 posts views Thread by Gregor Kovač | last post: by
3 posts views Thread by Matthew Warren | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.