New FakeInstaller for testing at
http://dl.dropbox.com/u/3269968/FakeRubyInstaller_1.9.1-p243_PATHEXT-FIX-1.exe
This version also installs a "fakeruby.exe" stub that spits out some useful info to confirm PATH and PATHEXT are what they should be. To use, simply open up a new command prompt after install and type things like
>fakeruby
>fakeruby -c test the args blah.rb
> > During uninstall, remove additional values (rb, rbw)
> > if the only thing left if %PATHEXT%, remove it.
This isn't going to work out as well as we thought and will likely get us a few bug reports.
For example, Octagon's example of a user have %PATHEXT%;.RB;.RBW as their HCKU PATHEXT value. What could happen is
* standard user installs and selects options to modify PATH and file assocs
* installer sees a non-empty HKCU with .RB/.RBW so it doesn't change it
* sometime later user uninstalls
* uninstaller updates PATH, removes .RB/.RBW from PATHEXT
* uninstaller sees that only thing left is %PATHEXT% so it removes it, and the empty value
* user unhappy that their original %PATHEXT%;.RB;.RBW was removed by the installer
After toying with things a bit this weekend, I've reverted back to a very simple solution that I think may be better.
In summary, if a user has selected the file assoc option, upon uninstall the uninstaller will clean up only the Software\Classes part of file assoc but will not touch the Environment\PATHEXT value that makes up the second part of file assocs. PATH will still be cleaned up as it has been in the past.
This option is not perfect by any means, and it needs more testing from you guys to see if it's what we want for Final. I'm not tied to this option by any means, but I currently like it better than our earlier version.
The current diff from the fake branch is:
C:\Users\Jon\Documents\RubyDev\rubyinstaller-trunk>git diff
diff --git a/resources/installer/fake-rubyinstaller.iss b/resources/installer/fake-rubyinstaller.iss
index ef2bf7e..07c7700 100644
--- a/resources/installer/fake-rubyinstaller.iss
+++ b/resources/installer/fake-rubyinstaller.iss
@@ -167,8 +167,10 @@ begin
if GetPreviousData('PathModified', 'no') = 'yes' then
ModifyPath([ExpandConstant('{app}') + '\bin']);
+{* leave PATHEXT reg value as-is instead of guessing wrong
if GetPreviousData('FilesAssociated', 'no') = 'yes' then
ModifyFileExts(['.rb', '.rbw']);
+*}
end;
end;
end;
diff --git a/resources/installer/util.iss b/resources/installer/util.iss
index 354bc51..f720d2d 100644
--- a/resources/installer/util.iss
+++ b/resources/installer/util.iss
@@ -61,6 +61,13 @@ begin
RegQueryStringValue(RootKey, SubKey, RegValue, OrigData);
Log('Original ' + AnsiUppercase(RegValue) + ': ' + OrigData);
+ // ensure originally empty users PATHEXT also contains system values
+ if (RootKey = HKCU) and (AnsiUppercase(RegValue) <> 'PATH') and (OrigData = '') then
+ begin
+ Log('Empty HKCU ' + AnsiUppercase(RegValue) + ', prepending %PATHEXT% to new value');
+ OrigData := '%' + AnsiUppercase(RegValue) + '%';