0

I am creating a WiX installer that needs to do an AppSearch for a certain folder. The AppSearch works fine in Windows XP, but in Windows 7, it cannot get past C:\Documents and Settings.

If I put the folder in question inside Documents and Settings, my AppSearch property will be set to C:\Documents and Settings\Folder. If I put the folder one directory deeper (eg. C:\Documents and Settings\username\Folder), the AppSearch fails.

In the log file, the error says:

DEBUG: Error 2363: Could not enumerate subfolders for folder: C:\Documents and Settings\

I also get an error from another AppSearch saying:

DUBUG: Error 2363: Could not enumerate subfolders for folder: D:\System Volume Information\

I tried running my installer perUser and perMachine. The error happens for both. Maybe this has to do with the fact that 'Documents and Settings' in Windows 7 is actually a shortcut to 'Users'.

Does anyone know what's going on here?

Here's my AppSearch:

<Property Id="DataSearch">
  <DirectorySearch Id="Search" 
                   Depth="6" 
                   AssignToProperty="yes" 
                   Path="Remindex Local Data"/>
</Property>

Any suggestions would be greatly appreciated.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
user2437443
  • 2,067
  • 4
  • 23
  • 38
  • It's not clear what you are trying search for. What is your requirement, what is your current code? Also, since when does Windows 7 have a folder called Documents and Settings? That's a Windows XP thing. – Christopher Painter Jul 04 '13 at 20:00
  • I'm doing an upgrade from a previous version of a program. I want to keep an old data file from the old version, which is what I'm searching for. While testing, I started moving the data file deeper into my computer's directory structure to make sure it could be found anywhere, but the AppSearch cannot get past 'Documents and Settings'. I know that file doesn't really exist on Windows 7, but apparently a shortcut exists called 'Documents and Settings' which points to the 'Users' Folder. In the log file, wix does not call the Folder 'Users', it calls it 'Documents and Settings'. Very weird... – user2437443 Jul 04 '13 at 20:24
  • I've added my AppSearch if that helps. It's pretty simple – user2437443 Jul 04 '13 at 20:27
  • How does the application find the data? Would a RegistrySearch work? Or a RegistrySearch combined with a DirectorySearch? – Tom Blodget Jul 05 '13 at 05:34

1 Answers1

1

You might want to look at:

System Folder Properties

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • That would help if I knew the file would be in one of those folder that wix has predefined properties for, but I want to be able to search for it no matter where it is. – user2437443 Jul 04 '13 at 21:46
  • Those aren't WiX properties, those are Windows Installer properties. I'd highly advise against searching entire file systems for a file. Very expensive. If you must do it, a custom action might be in order. – Christopher Painter Jul 04 '13 at 21:49
  • I think you're right. Things get too complicated when the installer has to search the entire system. I'm going to do this a different way, thanks for the advice! – user2437443 Jul 05 '13 at 20:09