Announcement

Collapse
No announcement yet.

Set date under Vista

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Set date under Vista

    Date$ is not capable to set date under Vista.
    When i change it manually i get this remark to continue yes/no.
    So maybe this became a big deal??

    Thanks,
    hellobasic

  • #2
    I think this came up here before and the answer was, "insufficient permission"

    Do you get a PB error after executing DATE$, and if so what does it tell you?
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Not sure if a tweak will allow it.
      http://articles.techrepublic.com.com...1-6153509.html
      http://www.pcstats.com/articleview.cfm?articleID=2238
      Tip 79 might get around UAC.

      Does DATE$ work with UAC disabled?

      Comment


      • #4
        You won't be able to disable UAC on other systems. See Mike Stefanik's posts in this link.

        Vista setting the date and time
        Last edited by Greg Lyon; 30 Jun 2008, 04:05 PM.

        Comment


        • #5
          Forget it, i would like to change the system besides the date.
          It seems not possible in an easy way.
          Odd that date/time is such an issue..
          hellobasic

          Comment


          • #6
            Edwin,

            It's not that difficult. Attached is the HelloWin sample program that requests elevation at startup. I simply added the manifest file to the resource file. Notice the line in the manifest that contains <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />. The program will bring up the UAC dialog, if you allow it, the program runs with Administrator privileges. That's all there is to it
            Attached Files

            Comment


            • #7
              Thanks for your help
              hellobasic

              Comment


              • #8
                Setting Date in Vista

                Does this problem only happen when setting the date with Date$,
                or does this also include simply loading the system date into a variable?

                Comment


                • #9
                  Jose,

                  Only when setting the date. Reading the date does not require Administrator privileges.
                  Last edited by Greg Lyon; 1 Jul 2008, 10:08 PM.

                  Comment


                  • #10
                    Ok, I'll ask...

                    Why would a 'general purpose' application program want/need to change the system date at all?

                    Seems to me if the system clock goes wonky, that's why system adminstrators have phones on their desks.

                    Inquiring Minds Want to Know!!
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11
                      Oh something silly but i was curious why it is put behind admin stuff..

                      Just forget it..
                      hellobasic

                      Comment


                      • #12
                        Originally posted by Michael Mattias View Post
                        Ok, I'll ask...

                        Why would a 'general purpose' application program want/need to change the system date at all?

                        Seems to me if the system clock goes wonky, that's why system adminstrators have phones on their desks.

                        Inquiring Minds Want to Know!!
                        Well, maybe you need to journal (audit) all changes made to sensitive information (like patient records) and you need to make sure that you can track each change chronologicly. If the local clock is "wonky" then your journal (audit) is worthless. So you sync to a central time server when your "general purpose" application starts. Problem solved!

                        Comment


                        • #13
                          If that is a requirement, there are plenty of ways to get the correct time, such as the network time function or an internet server. Using TIME$ or DATE$, or modifying the system time would not be a first choice - a simple offset to keep in sync will work.

                          The point of maintaining privileges is that they are not available to just any user - for example: adjusting the access tokens or requesting an admin password will simply not work with limited user accounts. Same as with the UAC and "protected" folders: you just have to learn to work within these set limitations.
                          kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

                          Comment


                          • #14
                            Originally posted by Kev Peel View Post
                            If that is a requirement, there are plenty of ways to get the correct time, such as the network time function or an internet server. Using TIME$ or DATE$, or modifying the system time would not be a first choice - a simple offset to keep in sync will work.

                            The point of maintaining privileges is that they are not available to just any user - for example: adjusting the access tokens or requesting an admin password will simply not work with limited user accounts. Same as with the UAC and "protected" folders: you just have to learn to work within these set limitations.

                            I don't disagree one bit with what you posted. MCM wanted an example of when futzing with the system time was pertinent. I gave him one.

                            Comment


                            • #15
                              In your example, resetting the system time has (at least) TWO flaws...

                              First, as pointed out if you want to have many users storing chronologically, you don't need the system time reset. You can use an external time source or an offset from a 'trusted source'

                              Second, you could simply append records to the journal. As long as "Time Itself" is the same for all users, this will result in chronological storage.

                              I can see setting the system time on a network client when the system boots to synch it up with some reference, but I would think you would do that with something using a manifest to elevate that bootup program to the requisite privileges.

                              I like Edwin's answer... curiosity is a perfectly valid reason for asking.
                              Michael Mattias
                              Tal Systems (retired)
                              Port Washington WI USA
                              [email protected]
                              http://www.talsystems.com

                              Comment


                              • #16
                                Anyone care to test my Nuke-Time under Vista?

                                It's been shareware for 7 or 8 years, had a minor issue with the new DST but I run it on my server..

                                http://www.tngbbs.com/ccs

                                Reason I ask is that I request the permission to set time, just curious if it works on VIsta...

                                The only bug I've had is that if the time packet comes back empty, on RARE occasions it sets the clock year to 1900.....

                                That's rare though, only started after the new DST and only until the OLD DST date...
                                Scott Turchin
                                MCSE, MCP+I
                                http://www.tngbbs.com
                                ----------------------
                                True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

                                Comment

                                Working...
                                X