+ Post New Thread
Results 1 to 4 of 4
Coding Thread, How do I launch using a batch file? in Coding and Web Development; I am useless at CLI and such, I need t be able to execute the following commands via a batch ...
  1. #1
    Disease's Avatar
    Join Date
    Jan 2006
    Posts
    1,108
    Thank Post
    120
    Thanked 70 Times in 48 Posts
    Rep Power
    57

    How do I launch using a batch file?

    I am useless at CLI and such, I need t be able to execute the following commands via a batch file or something similar, how do I code te batch file so this executes when run?

    Code:
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /inpkey:xxxxxxxxxx
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /sethst:xxxxxxxxxx
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /act
    It's so I can change all my office clients from MAK codes to KMS.

    Also can anyone point me to a useful site that would enable me to learn this black art

  2. #2
    sister_annex's Avatar
    Join Date
    Jan 2009
    Location
    Wolverhampton
    Posts
    613
    Thank Post
    103
    Thanked 143 Times in 124 Posts
    Rep Power
    51
    Quote Originally Posted by Disease View Post
    I am useless at CLI and such, I need t be able to execute the following commands via a batch file or something similar, how do I code te batch file so this executes when run?

    Code:
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /inpkey:xxxxxxxxxx
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /sethst:xxxxxxxxxx
    c:\program files\Microsoft Office\Office14\cscript ospp.vbs /act
    It's so I can change all my office clients from MAK codes to KMS.

    Also can anyone point me to a useful site that would enable me to learn this black art
    Try this...

    Code:
    CD "c:\program files\Microsoft Office\Office14"
    cscript ospp.vbs /inpkey:xxxxxxxxxx
    cscript ospp.vbs /sethst:xxxxxxxxxx
    cscript ospp.vbs /act
    HTH

  3. Thanks to sister_annex from:

    Disease (21st August 2012)

  4. #3

    Join Date
    Feb 2011
    Location
    Australia
    Posts
    109
    Thank Post
    0
    Thanked 10 Times in 10 Posts
    Rep Power
    9
    Even easier, put each line in inverted commas. As long as your path is correct it.

    "c:\program files\Microsoft Office\Office14\cscript ospp.vbs /inpkey:xxxxxxxxxx"
    "c:\program files\Microsoft Office\Office14\cscript ospp.vbs /sethst:xxxxxxxxxx"
    "c:\program files\Microsoft Office\Office14\cscript ospp.vbs /act"

    The issue you'll face is that everytime the computer starts, it will want to run this. This can have disastrous effects on your licence usage.

  5. Thanks to TheMinister from:

    Disease (21st August 2012)

  6. #4
    Disease's Avatar
    Join Date
    Jan 2006
    Posts
    1,108
    Thank Post
    120
    Thanked 70 Times in 48 Posts
    Rep Power
    57
    Thanks, worked a treat I am running it manually so it will only be running once per machine.
    Last edited by Disease; 21st August 2012 at 09:25 AM.



SHARE:
+ Post New Thread

Similar Threads

  1. How do you split a large .MDF file?
    By bandgeekmafia78 in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 1st March 2011, 01:07 PM
  2. how do you check through students image files?
    By DAckroyd in forum How do you do....it?
    Replies: 22
    Last Post: 19th June 2009, 05:13 PM
  3. Prommisor - Installing using a batch file/macro?
    By googlemad in forum Windows
    Replies: 21
    Last Post: 3rd December 2007, 09:17 PM
  4. How do I burn a bootable dmg file to disc in OSX
    By thegrassisgreener in forum Mac
    Replies: 45
    Last Post: 19th November 2007, 10:21 PM
  5. Replies: 2
    Last Post: 3rd February 2006, 11:01 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •