MSFN Forum: Changing System Year - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Changing System Year Rate Topic: -----

#1 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 04 September 2004 - 06:26 AM

Hi all,

Its my first time posting at the progarmming section here. Just wanna know though if it would be possible for a javascript or vbscript to:
- get the system year and save it to a variable
- change the system year to a couple years beyond the current
- run a routine (like a program)
- restore the original system year

What i wanna know the most though is the one i bold'ed out.
Hope you could help me with these. Thanks in advanced.


#2 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 04 September 2004 - 09:07 AM

was able to do the same via batch file...

@echo off

setlocal

:this part gets the current system date, removes excess characters and saves the results to a temporary file
date/t>temp.txt
set filename=temp.txt
set /p firstline= < "%filename%"
set IDENTIFIER=%firstline:~4,10%
echo %IDENTIFIER%>temp.txt

:this part modifies the date and runs a set of commands including running an installation
date 05/28/2019
start /wait "setup.exe /silentmode"
start /wait taskkill.exe /F /IM tsr1.exe /IM tsr2.exe

:this part restores the date to the original state and removes the temporary file
date<temp.txt
del temp.txt /f /s /q

endlocal


anyhow, im still open to other approach though, like javascript or vbscripting.
thanks in advanced.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy