SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Ithaca, NY, USA
    Posts
    199
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    I assume you are working on a machine with an NT based OS. There you can call the shell command "net" from within a script.

    net stop <service_name>
    net start <service_name>

    You might also want to put waitstates after each of these commands, since it usually takes a while to stop/start a service. How long, you probably have to find out by trial and error.

    ------------------
    Convenience is the first step to enslave yourself. Freedom is inconvenient.

    [This message has been edited by KlausK (edited 04-08-2003).]
    Convenience is the first step to enslave yourself. Freedom is inconvenient.

  2. #2
    Junior Member
    Join Date
    May 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    I am using windows 2000 os.
    How to use this statement in silkscript. I got error in compiling this. say sqlServerAgent is the service to stop. Can you please update the following script
    [-] testcase t1()
    [ ] net stop SqlServerAgent
    [ ]


    ------------------

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Ithaca, NY, USA
    Posts
    199
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    It's a shell command, you can't call it directly from within a script or function.

    I do not recall the function name for executing external programs anymore, but SilkTest has an excellent online reference where you can easily find this info.

    ------------------
    Convenience is the first step to enslave yourself. Freedom is inconvenient.
    Convenience is the first step to enslave yourself. Freedom is inconvenient.

  4. #4
    Junior Member
    Join Date
    May 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    Thanks a lot. I found the way. It is as follow:

    [-] testcase t1()
    [ ] Sys_Execute("net stop SqlServerAgent")
    [ ] sleep(3)
    [ ] Sys_Execute("net start SqlServerAgent")


    ------------------

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Ithaca, NY, USA
    Posts
    199
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    Yeah... SYS_Execute.

    It's been too long that I worked with SilkTest. I miss it, was far better than Robot.

    Anyway, glad I could help.

    ------------------
    Convenience is the first step to enslave yourself. Freedom is inconvenient.
    Convenience is the first step to enslave yourself. Freedom is inconvenient.

  6. #6
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    Hi Klaus,

    Where are you now?

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  7. #7
    Junior Member
    Join Date
    May 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Starting and stopping services using SilkTest

    Does anyone knows to stop and start a service?I got one function SYS_Kill for killing a process but nothing for starting a process. How to get the processID of the service running(e.g. I want to stop/start Web Publishing service to run a batch file)

    ------------------

  8. #8
    Junior Member
    Join Date
    May 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    Thanks a lot Klaus. It was really helpful for me. Keep up the good work. I really appreciate it.

    Thanks

    ------------------

  9. #9
    Senior Member
    Join Date
    Jul 2001
    Location
    Ithaca, NY, USA
    Posts
    199
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by jamesso:
    Hi Klaus,

    Where are you now?

    <HR></BLOCKQUOTE>

    I am currently sitting in Ithaca, NY :-) Nice area but not many opportunities.

    ------------------
    Convenience is the first step to enslave yourself. Freedom is inconvenient.
    Convenience is the first step to enslave yourself. Freedom is inconvenient.

  10. #10
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Starting and stopping services using SilkTest

    Definately a nice area...let me know if we can help get you a real tool in there.

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

 

 
Page 1 of 2 12 LastLast

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:15 PM.

Copyright BetaSoft Inc.