Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Run a little program just before Boot Loader?

hadipardishadipardis Posts: 134Member
Hi. I write a tiny program to set the date of my system to a specific date whenever Windows reboots. Now, How I can run it just before boot loader? In fact, I want to run it before any program. Anyway, do you know any way to set the date of system without any programming?(When system reboots) Can any one help me?

Comments

  • LundinLundin Posts: 3,711Member
    : Hi. I write a tiny program to set the date of my system to a specific date whenever Windows reboots. Now, How I can run it just before boot loader? In fact, I want to run it before any program. Anyway, do you know any way to set the date of system without any programming?(When system reboots) Can any one help me?
    :
    :


    If you wish to do it without programming, you are off topic.
    Post here:

    http://www.programmersheaven.com/c/MsgBoard/wwwboard.asp?Board=19
  • nec2152nec2152 Posts: 18Member
    : Hi. I write a tiny program to set the date of my system to a specific date whenever Windows reboots. Now, How I can run it just before boot loader? In fact, I want to run it before any program. Anyway, do you know any way to set the date of system without any programming?(When system reboots) Can any one help me?
    :
    :

    [blue]
    dude, without any programming, there is only one way to do it...
    go to your bios whenever u want to change system time before windows boots up and change it manually. I guess u know that.

    another way, which involves programming and risk, is as follows...

    write your own code that uses bios calls and changes system time(pretty easy, through INT 1A h)
    write code that saves windows boot loader to another sector and puts your code in the boot sector. that puts your code before windows starts and it will change the time everytime computer boots to a predecided time(the time u provide during coding)

    If u know assembly and fair enough about how an OS boots, it can be done. If you are willing, I'll elaborate more...
    [/blue]
  • Ed HallEd Hall Posts: 395Member
    : Hi. I write a tiny program to set the date of my system to a specific date whenever Windows reboots. Now, How I can run it just before boot loader? In fact, I want to run it before any program. Anyway, do you know any way to set the date of system without any programming?(When system reboots) Can any one help me?
    :
    :
    [blue]This isn't C++ programming, but why don't you just add a line at the front of the autoexec.bat file that sets the date to what you want?

    [code]
    date < datefile.txt
    [/code]

    Then enter the date string you want in the datefile.txt file. (Remember to include a carriage return.)

    Take Care,
    Ed[/blue]


Sign In or Register to comment.