How write a simple script file to execute basic commands?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rcook349

    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.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworlddev
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldd ev /s

    msbuild.exe helloworld.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworldtest
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldt est /s

    msbuild.exe helloworld.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworlduser
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldu ser /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.

  • rowe_newsgroups

    #2
    Re: How write a simple script file to execute basic commands?

    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.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworlddev
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldd ev /s
    >
    msbuild.exe helloworld.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworldtest
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldt est /s
    >
    msbuild.exe helloworld.vbpr oj /target:publish
    /property:publis hurl=http://localhost/helloworlduser
    xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
    c:\inetpub\wwwr oot\helloworldu ser /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.Diagnost ics.Process.Sta rt to execute
    those.

    Thanks,

    Seth Rowe [MVP]

    Comment

    • Gillard

      #3
      Re: How write a simple script file to execute basic commands?

      i think a batch file can do the job
      just do not forget the path for msbuild

      "rcook349" <rcook@westinis .comwrote in message
      news:23E587D5-4527-42C4-92F4-A318C500552A@mi crosoft.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.vbpr oj /target:publish
      /property:publis hurl=http://localhost/helloworlddev
      xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
      c:\inetpub\wwwr oot\helloworldd ev /s
      >
      msbuild.exe helloworld.vbpr oj /target:publish
      /property:publis hurl=http://localhost/helloworldtest
      xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
      c:\inetpub\wwwr oot\helloworldt est /s
      >
      msbuild.exe helloworld.vbpr oj /target:publish
      /property:publis hurl=http://localhost/helloworlduser
      xcopy.exe d:\projects\hel loworld\hellowo rld\bin\debug\a pp.publish
      c:\inetpub\wwwr oot\helloworldu ser /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.
      >

      Comment

      Working...