Help Needed with Coding for Scheduled Task

Discussion in 'Application Software' started by iamanoob, Mar 13, 2010.

  1. iamanoob

    iamanoob MDL Senior Member

    Feb 28, 2010
    402
    54
    10
    #1 iamanoob, Mar 13, 2010
    Last edited: Mar 13, 2010
  2. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #2 MasterDisaster, Mar 13, 2010
    Last edited by a moderator: Apr 20, 2017
    Which language are you using?
    In .NET it would be
    Code:
    ProcessStartInfo psi = new ProcessStartInfo("cscript");
    psi.Arguments = "\"%PROGRAMFILES%\Microsoft Office\Office14\ospp.vbs\" /act";
    Process.Start(psi);
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. iamanoob

    iamanoob MDL Senior Member

    Feb 28, 2010
    402
    54
    10
    #3 iamanoob, Mar 13, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
    i appreciate your help :)

    im not even sure what language this is called .. would you like to try?
    - Start > Run > taskschd.msc
    - That brings up Task Scheduler
    - schedule a task to run; the action is run Command Prompt = i can get this to work..

    the problem i am having is: getting Command Prompt to run with an argument
     
  4. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. iamanoob

    iamanoob MDL Senior Member

    Feb 28, 2010
    402
    54
    10
    that's what i thought too but the Arguments don't work .. Command Prompt launches with no commands .. can you try on your computer to see if it's just my computer ?
     
  6. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    I didn't get you. Creating a task to run cscript with "%PROGRAMFILES%\Microsoft Office\Office14\ospp.vbs" /act" as argument works fine.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. idmanager

    idmanager MDL Junior Member

    Jan 25, 2010
    70
    40
    0
    you are running cmd.exe and should be cscript.exe then in the argument box type "%PROGRAMFILES%\Microsoft Office\Office14\ospp.vbs" /act"
    also dont forget to kill the keygen.exe after