home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch.nt      Fun with Windows NT batch files      68,980 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 67,659 of 68,980   
   Zaidy036 to Robert Roland   
   Re: System Time   
   06 Nov 20 16:25:25   
   
   From: Zaidy036@air.isp.spam   
      
   On 11/6/2020 2:55 PM, Robert Roland wrote:   
   > On Fri, 6 Nov 2020 12:37:24 -0500, Zaidy036    
   > wrote:   
   >   
   >> I am using NirSoft\runasdate-x64\RunAsDate.exe to run a batch but then   
   >> time is "frozen" and I still want to read the system time.   
   >   
   > So, you want to see both the real time and the fake time at the same   
   > time?   
   >   
   >> Any suggestions to directly retrieve the system time or have batch   
   >> commands to run its own timer function independent of the system time?   
   >   
   > There is a hint in the description for RunAsTime.exe:   
   >   
   > RunAsDate Limitations:   
   > RunAsDate will not affect applications that take the current date/time   
   > from another source. For example: application that loads the current   
   > date from remote server.   
   >   
   > If we simply use our own computer as a remote server, it seems to   
   > work:   
   >   
   >   
   > echo Apparent time is %date% %time%   
   >   
   > for /F "tokens=6,7" %%n in ('NET TIME \\%computername%^|find "Current   
   > time"') do set realdate=%%n&set realtime=%%o   
   >   
   > echo Real time is %realdate% %realtime%   
   >   
   I did not know of "Net Time" so I turned the service on and ran the   
   following test batch using RunAsDate:   
      
   NET TIME \\i7 > F:\Timex1.txt   
   TIMEOUT 10   
   NET TIME \\i7 > F:\Timex2.txt   
   TYPE F:\Timex1.txt   
   TYPE F:\Timex2.txt   
   PAUSE & EXIT   
      
   It Worked....Thank you for pointing me to this command   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca