Setting shell privileges

Since the Xojo Date function seems to be read only, I tried using a shell to set the computer date and time with code like [quote]dim sh as new shell
sh.execute("Date " + tfNewDate.text)[/quote] On my Windows 7 machine, the shell result was A required privilege is not held by the client. Is there a way to set the user privilege when using a shell? Or a better way to adjust the time? Eventually, I would also like to deploy this on Linux. Not being an very knowledgeable about Linux, I am hoping that sudo will handle it.

This thread on the old forums shows the Windows API calls to do this. I also checked the Windows Functionality Suite, but I don’t see this API there. Perhaps someone should add it.

I’ll see if I can add this.

Setting the system clock on Windows requires that the calling application both posses and enable the SE_SYSTEMTIME_NAME privilege, which is disabled by default even for administrators. Calling the SetSystemTime API as mentioned will automatically enable this privilege if it is held by the user. You can also enable the privilege yourself, which should let you use the shell without permission errors.

Thanks guys.

I thought I had posted this, but guess not. This is now part of Windows Functionality Suite.

https://github.com/arbp/WFS