On Jan 2, 2008 9:49 AM, Dieter Menne <[EMAIL PROTECTED]> wrote: > Dear R2008, > > In Windows 2000, I used the following shell extension to allow right-click > rgui start in a directory (assuming rgui.exe is on the path: > > ----- > REGEDIT4 > > > [HKEY_CLASSES_ROOT\Directory\shell\Run R] > > > [HKEY_CLASSES_ROOT\Directory\shell\Run R\command] > @="Rgui.exe --no-restore --no-save --internet2" > ---- > > I switched to Vista this year. For reasons I don't understand, I have to > give the full path now, even if rgui is on the path. However, the solution
Try this batch file which is in the devel svn repository of batchfiles: http://batchfiles.googlecode.com/svn/trunk/RguiStart.bat (Also see: http://batchfiles.googlecode.com) Given a directory specified in argument 1 it will find R in the registry (and look in a few other places if not found there) and start Rgui.exe in specified directory. This has the additional benefit that when you upgrade to a new version of R you don't have to change anything. > below does not really work, getwd() is always in \windows\system32. I tried > several cmd.exe "..." variations, without success (strangled by "\""\"?) And > a nasty feature of Vista is the long delay of 19 seconds until a command box > comes up on my computer. > How are you starting up the command line? If I position myself to the right side of the Windows Explorer window in Vista and press Shift-RightClick and then choose Open Command Window Here then the command window comes up instantaneously on my system -- there is no discernable delay at all. > To avoid RTFMs: I know how to do this with setwd(). > > Dieter > > ------ > Windows Registry Editor Version 5.00 > > > [HKEY_CLASSES_ROOT\Directory\shell\Run R] > > [HKEY_CLASSES_ROOT\Directory\shell\Run R\command] > @="\"C:\\Program Files\\R\\R-2.6.0\\bin\\Rgui.exe\" --internet2 --no-save > --no-restore" ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.