V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
SJ2050cn
V2EX  ›  问与答

windows 下怎么给某个软件单独设置一个系统时间

  •  
  •   SJ2050cn · 2022-01-13 13:51:37 +08:00 · 1316 次点击
    这是一个创建于 806 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我现在用的某一款软件的试用期是根据本地系统时间判断的,也就是我可以通过将系统时间调到之前就可以一直试用,但把电脑的系统时间调前后,会对其他软件产生影响,我想问一下有没有办法仅修改某个软件内的时间从而达到欺骗的目的?
    6 条回复    2022-01-13 16:27:17 +08:00
    x66
        1
    x66  
       2022-01-13 13:59:28 +08:00
    把软件装到虚拟机里面去
    0o0O0o0O0o
        2
    0o0O0o0O0o  
       2022-01-13 14:18:15 +08:00 via iPhone   ❤️ 1
    hook 吧,类似 Locale Emulator 的做法
    https://github.com/xupefei/Locale-Emulator-Core

    有个现成的闭源给出了需要 hook 的 API
    https://www.nirsoft.net/utils/run_as_date.html
    > How does it work ?
    > RunAsDate intercepts the kernel API calls that returns the current date and time (GetSystemTime, GetLocalTime, GetSystemTimeAsFileTime, NtQuerySystemTime, GetSystemTimePreciseAsFileTime), and replaces the current date/time with the date/time that you specify.
    byasm32
        3
    byasm32  
       2022-01-13 14:19:30 +08:00   ❤️ 1
    RunAsDate 应该能满足需求了
    xuc
        4
    xuc  
       2022-01-13 14:22:30 +08:00   ❤️ 1
    就是楼上说的 RunAsDate Web http://www.nirsoft.net
    SJ2050cn
        5
    SJ2050cn  
    OP
       2022-01-13 14:49:05 +08:00
    @x66 #1 不想就为了一个软件装一个虚拟机啊😂
    jones2000
        6
    jones2000  
       2022-01-13 16:27:17 +08:00
    把这个软件获取系统时间的函数勾掉, 换成自己的函数就行了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5352 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 07:59 · PVG 15:59 · LAX 00:59 · JFK 03:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.