SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change Win NT System Time with Silk?

    I thought I had seen a function someplace (in Silk manual, maybe elsewhere) that allows you to change the system time on Windows NT from within Silk.

    Does anyone know what this function is or where I can get it? I need to do some testing that, in concept, will span a year.


    ------------------
    David Genrich
    Icarian
    333 Moffett Park Drive
    Sunnyvale, CA 94089
    davidg@icarian.com


  2. #2
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    Technically it's a security violation to be able to do that.

    The only way I can think of to make this possible is to run the Clock app (bottom right corner) and declare it, them write a method to do that.

    This was on my "todo" list for a while. I just have not gotten around to it.


    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

  3. #3
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    Hmm.. I really thought I saw a function someplace for doing that....

    But, if not, an easier way would be to run a WSH file that changes the time/date - would be allot fast than trying to use Silk to control the Change Date dialog.

    ------------------
    David Genrich
    Icarian
    333 Moffett Park Drive
    Sunnyvale, CA 94089
    davidg@icarian.com


  4. #4
    Junior Member
    Join Date
    Sep 1999
    Location
    Fuquay-Varina,MC,USA
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    Hmmm, Perhaps you where thinking of the Timer functions in Silk (which allow you to time blocks of 4Test, perf, metrics, etc.)

    Massaging the date/clock dialog would be a little bit of a pain, how about just spawing a DOS window and send (typekeys) "date" followed by a short delay and then your date string, then another short pause, then "exit".

    The DATE command is the same on all win32 (and even DOS for that matter) platforms.


    ------------------
    Scott Kavanagh
    mailto:automater@mindspring.com
    mailto:thekman@mindspring.com
    Scott Kavanagh
    mailto:automater@mindspring.com
    mailto:thekman@mindspring.com

  5. #5
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    I did make a workaround using the DOS Date command. From Silk, I call a function that then calls a WSH function. The date gets changed without a problem

    There may be a more eligent way, but I wanted to pass a date STRING and have the option of having an offset to that date (like 9/9/99 with offset -8 would set the date to 9/1/99).


    ------------------
    David Genrich
    Icarian
    333 Moffett Park Drive
    Sunnyvale, CA 94089
    davidg@icarian.com


  6. #6
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Change Win NT System Time with Silk?

    If system time is what you want to change, then you can simple call the TIME command in DOS using SYS_EXECUTE. Just make sure that, if you plan on changing the date/time backwards from the current system date/time, you'll need to add in the "System Properties/Environment tab" a variable that sets QAP_DISABLE_STARTDATE = 1
    or less you'll run into problems executing your scripts. For Win95/98, you'll need to set this variable in your autoexec.bat file.

  7. #7
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    I did at first try to use the SYS_EXECUTE function with the DOS DATE command, but it wasn't working correctly.

    I won't be going backwards in time from teh time Silk starts. I will however go backwards in time about 5 months, then run Silk going forward in time.

    ------------------
    David Genrich
    Icarian
    333 Moffett Park Drive
    Sunnyvale, CA 94089
    davidg@icarian.com


  8. #8
    Super Member
    Join Date
    Jul 1999
    Location
    Rancho Santa Margarita, CA
    Posts
    1,439
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Change Win NT System Time with Silk?

    Maybe you should show a sample of how you use SYS_EXECUTE.
    The sample below has never failed working for me (from QAP 4.6x to SilkTest 5.0):
    STRING sDate
    sDate = "Date 09/11/99"
    SYS_EXECUTE (sDate)

  9. #9
    Junior Member
    Join Date
    Sep 1999
    Location
    Atlanta, GA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Change Win NT System Time with Silk?

    There is a nifty way of using the Win32 API to change the date and/or time. I found it on a website that apparently has been moved. It works great, I used it during a Y2K automation test. It has directions, but I only have a hard copy of the function. Would be happy to forward it to you by fax.
    Derek Howard
    Chief Technologist
    Client/Server Labs, Inc
    dhoward@cslinc.com
    Derek Howard
    Chief Technologist
    Client/Server Labs, Inc.
    dhoward@cslinc.com

 

 

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 09:03 PM.

Copyright BetaSoft Inc.