Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can anyone help me with this VBS script? Thanks in advance.

  1. User logs in to a XP computer and a PowerPoint presentations or web page starts
  2. They read through the presentation and then click a links that says: “Click here to complete presentation”.
  3. When they click the link it will send their username and time/date stamp to a text file on a server.
  4. The next time they log in they will not get the PowerPoint or web page presentation.
share|improve this question

1 Answer 1

User logs in to a XP computer and a PowerPoint presentations or web page starts

Copy the presentation or the .url shortcut to %UserProfile%\Start Menu\Programs\Startup\.

They read through the presentation and then click a links that says: “Click here to complete presentation”.

When they click the link it will send their username and time/date stamp to a text file on a server.

In the presentation - create a macro that sends a HTTP POST request using WinHttp as described in MSDN and this page. (You can enable WinHttp for PowerPoint macros by opening Visual Basic editor, and enabling "Microsoft WinHTTP" under Tools -> References.)

In a web page - do the same using XmlHttpRequest() (there are way too many tutorials for it).

Some suggestions:

  • Don't send timestamps. Instead use the server's time.
  • Use HTTP authentication instead of sending the username as data -- this way it will be harder to fake.
  • Do not use GET for submitting data, even if it seems simpler at first.
  • Think about whether you really need this information, and what would happen if users closed the presentation by simply pressing Esc.

The next time they log in they will not get the PowerPoint or web page presentation.

Remove the file copied in step 1.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.