# Fix for XP-installation

**URL:** <https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476>\
**Category:** Uncategorized\
**Created:** [June 2, 2006, 9:52am UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476 "2006-06-02T09:52:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [June 2, 2006, 9:52am UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476/1 "2006-06-02T09:52:52Z")

</div>

Hi,  
  
During installation of the newest XP-version of the PTB, I   
experienced the same problems as some other people posted about. I   
could not find a fix here, so i decided to solve them by myself. The   
following is a report of what i did.  
  
=======  
ERROR 1  
=======  
??? Error using ==\> DownloadPsychtoolbox  
Cannot find the specified directory, "C:  
  
PROBLEM:  
It tries do execute   
rmdir(p,'s'), with p = '\Applications\Psychtoolbox'  
What it then tries to remove is (at least on my machine) "C:\MATLAB7  
\work\\Applications\Psychtoolbox", which is not right.  
  
QUICK AND DIRTY SOLUTION:  
Add the following to "DownloadPsychtoolbox.m", line 244 (so, right   
before the line that says [succes,m,m]=etc):  
  
S = pwd; p = [S(1) ':' p];  
  
=======  
ERROR 2  
=======  
??? Error using ==\> DownloadPsychtoolbox  
Can not find specified file or directory.  
  
PROBLEM:  
Same problem basically. The intention is to set the file attributes   
of C:\Applications\Psychtoolbox and subdirs, but it actually tries   
to set those of "\<Workdir\>\\Applications\Psychtoolbox" (where   
\<Workdir\> is "C:\Matlab7\work" in my case).  
  
QUICK AND DIRTY SOLUTION:  
Same as well. In DownloadPsychtoolbox.m, add the line   
  
S = pwd; p = [S(1) ':' p];  
  
right before the line saying [S,m,mm]=fileattrib(p,'+w','a','s');   
(this is line 317 if the previous modification has been applied)  
  
=======  
ERROR 3  
=======  
After solving ERROR 2, i get a very strange error. It says:  
  
Warning: See help sprintf for valid escape sequences.  

> \> In DownloadPsychtoolbox at 323

??? Error using ==\> DownloadPsychtoolbox  
  
and then something like "Hidden file will not be re-set", with all   
letters duplicated about 20 times (HHHHHHHHHHHHHHHHiiiiiiiiiiiiiiii   
etc).  
  
PROBLEM:  
Didn't bother to find out what the exact problem was. Just solved it.  
  
QUICK AND DIRTY SOLUTION:  
Replace the line saying:  
 [s,m,mm]=fileattrib(p,'+w','a','s');  
with:  
 [s,m,mm]=fileattrib(p,'+w','ahs');  
  
(this is line 318 in my version, the line following the one you   
added to solve ERROR 2)  
  
=======  
ERROR 4  
=======  
COPYFILE error. Could not update the UpdatePsychtoolbox.m file to   
latest version.  
??? Error using ==\> DownloadPsychtoolbox  
  
PROBLEM:  
Again a path problem; see above  
  
QUICK AND DIRTY SOLUTION:  
In downloadpsychtoolbox.m, add:  
 S = pwd; pServer = [S(1) ':' pServer];  
right before the line saying  
 [success,m,mm]=copyfile(pLoose,pServer,'f');  
(Line 346 in my version)  
  
Yahoo! Now it works:  
---  
Updated the file UpdatePsychtoolbox.m to latest version.  
You can now use your newly installed Psychtoolbox. Enjoy!  
---  
  
Hope this helped.  
  
Kind regards,  
Ronald vd Berg

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [June 5, 2006, 4:25am UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476/2 "2006-06-05T04:25:43Z")

</div>

Hello,  
  
i've modified the DownloadPsychtoolbox.m  
file to make it hopefully a bit more robust  
on Windows and MacOS-X.  
  
I can' test easily how well it works on Windows,  
so i've uploaded the file into the "Files" section  
of the Psychtoolbox forum. Could some  
Windows users test the new downloader and  
tell me if it works well, so we can upload  
it to the official Psychtoolbox website?  
  
Thanks,  
-mario   
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "rnldvndnbrg" \<rnldvndnbrg@...\> wrote:  
> \>  
> \> Hi,  
> \>   
> \> During installation of the newest XP-version of the PTB, I   
> \> experienced the same problems as some other people posted about. I   
> \> could not find a fix here, so i decided to solve them by myself. The   
> \> following is a report of what i did.  
> \>   
> \> =======  
> \> ERROR 1  
> \> =======  
> \> ??? Error using ==\> DownloadPsychtoolbox  
> \> Cannot find the specified directory, "C:  
> \>   
> \> PROBLEM:  
> \> It tries do execute   
> \> rmdir(p,'s'), with p = '\Applications\Psychtoolbox'  
> \> What it then tries to remove is (at least on my machine) "C:\MATLAB7  
> \> \work\\Applications\Psychtoolbox", which is not right.  
> \>   
> \> QUICK AND DIRTY SOLUTION:  
> \> Add the following to "DownloadPsychtoolbox.m", line 244 (so, right   
> \> before the line that says [succes,m,m]=etc):  
> \>   
> \> S = pwd; p = [S(1) ':' p];  
> \>   
> \> =======  
> \> ERROR 2  
> \> =======  
> \> ??? Error using ==\> DownloadPsychtoolbox  
> \> Can not find specified file or directory.  
> \>   
> \> PROBLEM:  
> \> Same problem basically. The intention is to set the file attributes   
> \> of C:\Applications\Psychtoolbox and subdirs, but it actually tries   
> \> to set those of "\<Workdir\>\\Applications\Psychtoolbox" (where   
> \> \<Workdir\> is "C:\Matlab7\work" in my case).  
> \>   
> \> QUICK AND DIRTY SOLUTION:  
> \> Same as well. In DownloadPsychtoolbox.m, add the line   
> \>   
> \> S = pwd; p = [S(1) ':' p];  
> \>   
> \> right before the line saying [S,m,mm]=fileattrib(p,'+w','a','s');   
> \> (this is line 317 if the previous modification has been applied)  
> \>   
> \> =======  
> \> ERROR 3  
> \> =======  
> \> After solving ERROR 2, i get a very strange error. It says:  
> \>   
> \> Warning: See help sprintf for valid escape sequences.  
> \> \> In DownloadPsychtoolbox at 323  
> \> ??? Error using ==\> DownloadPsychtoolbox  
> \>   
> \> and then something like "Hidden file will not be re-set", with all   
> \> letters duplicated about 20 times (HHHHHHHHHHHHHHHHiiiiiiiiiiiiiiii   
> \> etc).  
> \>   
> \> PROBLEM:  
> \> Didn't bother to find out what the exact problem was. Just solved it.  
> \>   
> \> QUICK AND DIRTY SOLUTION:  
> \> Replace the line saying:  
> \> [s,m,mm]=fileattrib(p,'+w','a','s');  
> \> with:  
> \> [s,m,mm]=fileattrib(p,'+w','ahs');  
> \>   
> \> (this is line 318 in my version, the line following the one you   
> \> added to solve ERROR 2)  
> \>   
> \> =======  
> \> ERROR 4  
> \> =======  
> \> COPYFILE error. Could not update the UpdatePsychtoolbox.m file to   
> \> latest version.  
> \> ??? Error using ==\> DownloadPsychtoolbox  
> \>   
> \> PROBLEM:  
> \> Again a path problem; see above  
> \>   
> \> QUICK AND DIRTY SOLUTION:  
> \> In downloadpsychtoolbox.m, add:  
> \> S = pwd; pServer = [S(1) ':' pServer];  
> \> right before the line saying  
> \> [success,m,mm]=copyfile(pLoose,pServer,'f');  
> \> (Line 346 in my version)  
> \>   
> \> Yahoo! Now it works:  
> \> ---  
> \> Updated the file UpdatePsychtoolbox.m to latest version.  
> \> You can now use your newly installed Psychtoolbox. Enjoy!  
> \> ---  
> \>   
> \> Hope this helped.  
> \>   
> \> Kind regards,  
> \> Ronald vd Berg  
> \>

---

<div class="post-metadata">

**Author:** ![harshilshah83](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@harshilshah83](https://psychtoolbox.discourse.group/u/harshilshah83)\
**Post date:** [June 5, 2006, 7:10pm UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476/3 "2006-06-05T19:10:34Z")

</div>

Hi friends,

&nbsp;

&nbsp;Can someone plzz help me with a matlab code for Biological motion &nbsp;simulation.

* * *
[Yahoo! Messenger with Voice.](http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com) PC-to-Phone calls for ridiculously low rates.

---

<div class="post-metadata">

**Author:** ![anblick](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anblick](https://psychtoolbox.discourse.group/u/anblick)\
**Post date:** [June 5, 2006, 8:03pm UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476/4 "2006-06-05T20:03:19Z")

</div>

Dear Harshil,  
  
Someone can probably help, but you'll need to report the problem   
you're having more precisely.  
  
keith  
  

> On Jun 5, 2006, at 3:10 PM, harshil shah wrote:  
>    
> \>  
> \> Hi friends,  
> \>  
> \> Can someone plzz help me with a matlab code for Biological motion   
> \> simulation.

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [June 7, 2006, 1:34am UTC](https://psychtoolbox.discourse.group/t/fix-for-xp-installation/1476/5 "2006-06-07T01:34:57Z")

</div>

Ok,  
  
the improved DownloadPsychtoolbox.m is now  
available from the www.psychtoolbox.org website.  
  
The file in the Files-Section has been deleted.  
  
-mario  
  
  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "Mario Kleiner" \<mario.kleiner@...\> wrote:  
> \>  
> \> Thanks for testing.  
> \>   
> \> I've modified it slightly again to reduce the number of warnings and  
> \> the weird trash that it printed instead of the C:\...   
> \>   
> \> Update available in the Files section again. This one will show up on  
> \> the www.psychtoolbox.org website soon.  
> \>   
> \> best,  
> \> -mario  
> \>   
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), Yasuo Nagasaka \<nyasuo@\> wrote:  
> \> \>  
> \> \> Thanks Mario,  
> \> \>   
> \> \> Here are the outputs in running the new DownloadPsychtoolbox.m.  
> \> \> I got some subtle warnings, however, Psychtoolbox was  
> \> \> installed correctly.  
> \> \> I didn't check all demos, but some worked fine.  
> \> \>   
> \> \> Machine: IBM X23+WindowsXP Pro SP2+MATLAB R14 SP3  
> \> \>   
> \> \> \>\> DownloadPsychtoolbox('beta','C:®yToolboxes')  
> \> \> Warning: See help sprintf for valid escape sequences.  
> \> \> \> In DownloadPsychtoolbox at 188  
> \> \> DownloadPsychtoolbox('beta','C:Requested flavor is: beta  
> \> \> Requested location for the Psychtoolbox folder is inside: C:®yToolboxes  
> \> \>   
> \> \> Good. Your privileges suffice for the requested installation into   
> \> \> folder C:®yToolboxes.  
> \> \>   
> \> \> Hmm. You already have an old Psychtoolbox folder.  
> \> \> C:®yToolboxesÏ±sychtoolbox  
> \> \> The old one should be removed before we can install a new one.  
> \> \> First we remove "Psychtoolbox" from the MATLAB path.  
> \> \> Success.  
> \> \> Shall I delete the old Psychtoolbox folder and all its contents   
> \> \> (recommended in most cases),  
> \> \> (yes or no)? yes  
> \> \> Now we delete "Psychtoolbox" itself.  
> \> \> Success.  
> \> \>   
> \> \> Will now download the latest Psychtoolbox for Windows.  
> \> \> Requested flavor is: beta  
> \> \> Target folder for installation: C:®yToolboxes  
> \> \> The following CHECKOUT command asks the Subversion client to download   
> \> \> the Psychtoolbox:  
> \> \> svn checkout svn://svn.berlios.de/osxptb/beta/Psychtoolbox/   
> \> \> C:®yToolboxes±sychtoolbox  
> \> \> Downloading. It's nearly 100 MB, which can take several minutes   
> \> \> without any output to the Matlab window, so please standby ...  
> \> \> Download Success!  
> \> \> Now adding the new Psychtoolbox folder (and all its subfolders) to   
> \> \> your MATLAB path.  
> \> \> Warning: Function C:®yToolboxes±sychtoolbox±sychBasicÓethrow.m   
> \> \> has the same name as a MATLAB builtin. We suggest you rename the   
> \> \> function to avoid a potential name conflict.  
> \> \> \> In path at 113  
> \> \> In addpath at 100  
> \> \> In DownloadPsychtoolbox at 365  
> \> \> Success.  
> \> \>   
> \> \> Psychtoolbox is now installed and configured for use on your Computer,  
> \> \>   
> \> \> Now setting permissions to allow everyone to write to the   
> \> \> Psychtoolbox folder. This will  
> \> \> allow future updates by every user on this machine without requiring   
> \> \> administrator privileges.  
> \> \> Success.  
> \> \>   
> \> \> You can now use your newly installed Psychtoolbox. Enjoy!  
> \> \> Whenever you want to upgrade your copy of Psychtoolbox, simply  
> \> \> change into the Psychtoolbox root folder C:®yToolboxes±sychtoolbox,  
> \> \> and execute the UpdatePsychtoolbox - script.  
> \> \>   
> \> \> If you are new to this, you might try this:  
> \> \> help Psychtoolbox  
> \> \> Useful websites with information about Psychtoolbox are:  
> \> \> [http://www.psychtoolbox.org](http://www.psychtoolbox.org) and   
> \> \> [http://en.wikibooks.org/wiki/Matlab:Psychtoolbox](http://en.wikibooks.org/wiki/Matlab:Psychtoolbox)  
> \> \> An archive of official announcements regarding Psychtoolbox is  
> \> available under:  
> \> \> [http://lists.berlios.de/pipermail/osxptb-announce/](http://lists.berlios.de/pipermail/osxptb-announce/)  
> \> \> \>\>  
> \> \>   
> \> \>   
> \> \> Yasuo  
> \> \>   
> \> \>   
> \> \>   
> \> \> At 4:25 AM +0000 06.6.5, Mario Kleiner wrote:  
> \> \> \>Hello,  
> \> \> \>  
> \> \> \>i've modified the DownloadPsychtoolbox.m  
> \> \> \>file to make it hopefully a bit more robust  
> \> \> \>on Windows and MacOS-X.  
> \> \> \>  
> \> \> \>I can' test easily how well it works on Windows,  
> \> \> \>so i've uploaded the file into the "Files" section  
> \> \> \>of the Psychtoolbox forum. Could some  
> \> \> \>Windows users test the new downloader and  
> \> \> \>tell me if it works well, so we can upload  
> \> \> \>it to the official Psychtoolbox website?  
> \> \> \>  
> \> \> \>Thanks,  
> \> \> \>-mario  
> \> \> \>  
> \> \> \>--- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "rnldvndnbrg" \<rnldvndnbrg@\>  
> \> wrote:  
> \> \> \>\>  
> \> \> \>\> Hi,  
> \> \> \>\>  
> \> \> \>\> During installation of the newest XP-version of the PTB, I  
> \> \> \>\> experienced the same problems as some other people posted about. I  
> \> \> \>\> could not find a fix here, so i decided to solve them by myself. The  
> \> \> \>\> following is a report of what i did.  
> \> \> \>\>  
> \> \> \>\> =======  
> \> \> \>\> ERROR 1  
> \> \> \>\> =======  
> \> \> \>\> ??? Error using ==\> DownloadPsychtoolbox  
> \> \> \>\> Cannot find the specified directory, "C:  
> \> \> \>\>  
> \> \> \>\> PROBLEM:  
> \> \> \>\> It tries do execute  
> \> \> \>\> rmdir(p,'s'), with p = '¢pplications±sychtoolbox'  
> \> \> \>\> What it then tries to remove is (at least on my machine) "C:®ATLAB7  
> \> \> \>\> ØorkàApplications±sychtoolbox", which is not right.  
> \> \> \>\>  
> \> \> \>\> QUICK AND DIRTY SOLUTION:  
> \> \> \>\> Add the following to "DownloadPsychtoolbox.m", line 244 (so, right  
> \> \> \>\> before the line that says [succes,m,m]=etc):  
> \> \> \>\>  
> \> \> \>\> S = pwd; p = [S(1) ':' p];  
> \> \> \>\>  
> \> \> \>\> =======  
> \> \> \> \> ERROR 2  
> \> \> \>\> =======  
> \> \> \>\> ??? Error using ==\> DownloadPsychtoolbox  
> \> \> \>\> Can not find specified file or directory.  
> \> \> \>\>  
> \> \> \>\> PROBLEM:  
> \> \> \>\> Same problem basically. The intention is to set the file attributes  
> \> \> \>\> of C:¢pplications±sychtoolbox and subdirs, but it actually tries  
> \> \> \>\> to set those of "\<Workdir\>àApplications±sychtoolbox" (where  
> \> \> \>\> \<Workdir\> is "C:®atlab7Øork" in my case).  
> \> \> \>\>  
> \> \> \>\> QUICK AND DIRTY SOLUTION:  
> \> \> \>\> Same as well. In DownloadPsychtoolbox.m, add the line  
> \> \> \>\>  
> \> \> \>\> S = pwd; p = [S(1) ':' p];  
> \> \> \>\>  
> \> \> \>\> right before the line saying [S,m,mm]=fileattrib(p,'+w','a','s');  
> \> \> \>\> (this is line 317 if the previous modification has been applied)  
> \> \> \>\>  
> \> \> \>\> =======  
> \> \> \>\> ERROR 3  
> \> \> \>\> =======  
> \> \> \>\> After solving ERROR 2, i get a very strange error. It says:  
> \> \> \>\>  
> \> \> \>\> Warning: See help sprintf for valid escape sequences.  
> \> \> \>\> \> In DownloadPsychtoolbox at 323  
> \> \> \>\> ??? Error using ==\> DownloadPsychtoolbox  
> \> \> \>\>  
> \> \> \>\> and then something like "Hidden file will not be re-set", with all  
> \> \> \>\> letters duplicated about 20 times (HHHHHHHHHHHHHHHHiiiiiiiiiiiiiiii  
> \> \> \>\> etc).  
> \> \> \>\>  
> \> \> \>\> PROBLEM:  
> \> \> \>\> Didn't bother to find out what the exact problem was. Just  
> \> solved it.  
> \> \> \>\>  
> \> \> \>\> QUICK AND DIRTY SOLUTION:  
> \> \> \>\> Replace the line saying:  
> \> \> \>\> [s,m,mm]=fileattrib(p,'+w','a','s');  
> \> \> \>\> with:  
> \> \> \>\> [s,m,mm]=fileattrib(p,'+w','ahs');  
> \> \> \>\>  
> \> \> \>\> (this is line 318 in my version, the line following the one you  
> \> \> \>\> added to solve ERROR 2)  
> \> \> \>\>  
> \> \> \>\> =======  
> \> \> \>\> ERROR 4  
> \> \> \>\> =======  
> \> \> \>\> COPYFILE error. Could not update the UpdatePsychtoolbox.m file to  
> \> \> \>\> latest version.  
> \> \> \>\> ??? Error using ==\> DownloadPsychtoolbox  
> \> \> \>\>  
> \> \> \>\> PROBLEM:  
> \> \> \>\> Again a path problem; see above  
> \> \> \>\>  
> \> \> \>\> QUICK AND DIRTY SOLUTION:  
> \> \> \>\> In downloadpsychtoolbox.m, add:  
> \> \> \>\> S = pwd; pServer = [S(1) ':' pServer];  
> \> \> \>\> right before the line saying  
> \> \> \>\> [success,m,mm]=copyfile(pLoose,pServer,'f');  
> \> \> \>\> (Line 346 in my version)  
> \> \> \>\>  
> \> \> \>\> Yahoo! Now it works:  
> \> \> \>\> ---  
> \> \> \>\> Updated the file UpdatePsychtoolbox.m to latest version.  
> \> \> \>\> You can now use your newly installed Psychtoolbox. Enjoy!  
> \> \> \>\> ---  
> \> \> \>\>  
> \> \> \>\> Hope this helped.  
> \> \> \>\>  
> \> \> \>\> Kind regards,  
> \> \> \> \> Ronald vd Berg  
> \> \> \>\>  
> \> \> \>  
> \> \>   
> \> \>   
> \> \> --   
> \> \> \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> \> \> Yasuo Nagasaka  
> \> \>   
> \> \> Department of Psychology  
> \> \> University of Iowa  
> \> \> 11 Seashore Hall E, Iowa City  
> \> \> IA 52242, USA  
> \> \>  
> \>
