DMDX Help.


Remote Testing Overview.


    I get asked from time to time if DMDX can be used over the web.  Pfft.  However I recently came up with a similar sort of a mechanism for a study here where subjects could not be expected to come in to the lab.  Basically what I did was zip up a DMDX executable, an item file, a program of mine to send email and a batch file to run the whole shebang into a self extracting and executing archive.  Subjects only have to be able to run a program from an URL, where the only choices they can make are basically to do it or not.

    You need to have some way of making a self extracting zip file execute a batch file, appropriating a self installer works well enough -- I used Winzip with it's Winzip Self Extractor package.  Not freeware but cheap enough.  You can't be expecting miracles in accurate timing either as we have to use DMDX's EZ mode where there's no synchronization with the raster.  However I'm betting +/- a tick is going to still be a whole lot better than some custom bit of javascript running in a browser.  Not to mention a whole lot easier to use as you can use all of DMDX's capabilities instead of having to write new javascript for every single thing...  You'll also need a SMTP server that doesn't require all sorts of authentication unless you're happy sticking passwords into batch files (which I really don't recommend).

    So first off the script.  WinZip will have created a temporary directory and extracted all the files there, it'll be the current directory so as long as there's no path information on anything DMDX should be able to find images and so on.  The only thing that's different here is using the desktop's video mode with <vm desktop>, but that's normal for EZ mode.  The emailer I'm using is my custom code and it's not super (it certainly won't deal with SSL email server connections) but there are a number of other programs out there if you need them.  If you want to use mine it's on the DMDX page in a an example of the remote testing I'm describing, http://www.u.arizona.edu/~jforster/dmdx/remotedmdx.exe (you'll have to pull it out of the .EXE).  Then the batch file to run them:

start /wait "DMDX" dmdx.exe -ez -buffer 2 -run eztest.rtf
start /wait "sending results" sendemail.exe -hsmtpserver.yourdomain.org tester@yourdomain.org "ez testing" eztest.azk


    The first line runs DMDX in EZ mode and waits for it to finish.  It runs it with a limited number of video buffers (because who knows how wretched the destination machine is) and tells it to run our item file, in this case eztest.rtf.  Once DMDX has finished the batch file runs the emailer and tells it to send eztest.azk which DMDX will have left behind after running eztest.rtf.  If you're using my emailer you'll have to tell it the name of your SMTP machine with -h because the UofA's server sure ain't gonna accept connections that aren't SSL from anywhere off campus.  Once the emailer is done WinZip deletes the files and temporary directory it put the files in and about the only thing left will be a few registry keys.  It won't need to execute as an administrator.  For testing purposes you can stick a pause command at the end of the batch file if things aren't working and you need to find out what's up.  As the batch file is paused you can go look in C:\Documents and Settings\Username\Local Settings\Temp\WZXXXX.XX and see the files before they get whacked.

    You'll want to drag all your files to WinZip to make the initial .ZIP file, images and the files I've mentioned all go in.  I guess if you really cared you could use a subdirectory for images and sound files but I'm not.  Next you'll tell WinZIp to make a self extracting archive out of it and once you've bought the Self Extractor extension you can tell it to make an archive for software installation.  I included an optional message to the users when the extractor is first extracting telling them that DMDX is sensitive to other applications popping up windows and for them to log out of IM sessions and to otherwise disable anything that might pop up a window as DMDX is running.  When it asks for the name of the command to run you tell it the name of your batch file, here it's eztest.bat, but you'll want to put a .\ in front of it as they recommend (so .\eztest.bat).  And then a few more prompts and you'll have your .EXE that you can stick on a web page and tell users to point their browsers at.  They'll have to actually run the thing and answer all the security nags but it doesn't have to run as administrator (for Vista should anyone be using it) and should be fairly straight forward.  Hopefully you get an email with the subject "ez testing" with the .AZK for it's body.

    An extension to the batch file I recently made was to make it send the diagnostics if the run failed with a couple of IF EXIST statements in the batch file.  Makes it much easier to figure out what went wrong if things fail:

start /wait "DMDX" dmdx.exe -ez -buffer 2 -run eztest.rtf
if exist eztest.azk start /wait "sending results" sendemail.exe -hsmtpserver.yourdomain.org tester@yourdomain.org "ez testing" eztest.azk
if not exist eztest.azk start /wait "sending diagnostics" sendemail.exe -hsmtpserver.yourdomain.org tester@yourdomain.org "ez diagnostics" diagnostics.txt

    And then there's the ultimate script that actually tries different ports if one is blocked (now that sendemail has been expanded with a -p switch for the port number):

start /wait "DMDX" dmdx.exe -ez -buffers 2 -run eztest.rtf
if not exist eztest.azk goto diags
sendemail.exe -hpsy1.psych.arizona.edu jforster@psy1.psych.arizona.edu "ez testing results" eztest.azk
if errorlevel 1 sendemail.exe -p2525 -hpsy1.psych.arizona.edu jforster@psy1.psych.arizona.edu "ez testing 2525 results" eztest.azk
goto end
:diags
sendemail.exe -hpsy1.psych.arizona.edu jforster@psy1.psych.arizona.edu "ez testing diagnostics" diagnostics.txt
if errorlevel 1 sendemail.exe -p2525 -hpsy1.psych.arizona.edu jforster@psy1.psych.arizona.edu "ez testing 2525 diagnostics" diagnostics.txt
:end
 

 

    And then to add insult to injury after buying the Winzip Self Extractor Package I find an article about a hidden built in installer in XP already!  The article that follows just outlines the simple use of it, we'd want to be making use of the self installer features the author doesn't go into but it looks like it would work.  Many thanks to PC Mechanic who I ripped the following from (http://www.pcmech.com/article/hidden-installer-creator-in-windows-xp/) in case their page disappears:

Hidden Installer Creator in Windows XP

Category: How Do I - December 3rd, 2007. Posted by Rich Menga.

Some people like to create their own installation executables because it looks professional and it’s just plain cool.

Windows XP has a utility called IExpress that will do just that.

Note before continuing: Yes you can do this with WinRAR and WinZIP also, however this is free and free is good. 

To Access: Start / Run / Type iexpress / Click OK

You get this:

image

Hit Next.

image

Let’s say we want to create an installer that will extract some photos to a specific part of the hard drive. We’ll select Extract files only and click Next

You get this:

image

I called my Package title “Rich’s Photos”. You can name yours whatever you want. Hit Next when ready to proceed.

image

You can opt to prompt the user with a message or not before install. I decided to put in a message. When done hit Next.

image

You can opt to use a text file for a license agreement if you wish. I decided not to. Hit Next

image

This is the part where you choose the files that will be installed. I chose 5 photos. You can add as many as you wish. Hit Next.

image

It’s suggested you leave this screen as Default. Hit Next.

image

You can have the installer display a message once completed if you wish. I decided to put one in. Hit Next when done.

image

On this screen you tell IExpress the path an the file name to create. I clicked Browse and set the file name as fotos.exe. Click Next when finished.

image

You can opt to save this whole process if you want, but since I wasn’t interested in doing that I ticked Don’t save. Hit Next when finished.

image

Windows XP is now ready to create your package. Click Next.

image

You will get a black Command Prompt window and the window above while the package is being created…

image

Ta-da… your package is finished. Click Finish.

On a test install of the package I just created, this is what happens:

image

image

Note on above: I had to click “Browse” to choose my desktop.

image

Yep, it works!

 



DMDX Index.