EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Problem with InstallIcon during Install using a CustomAction

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
Posted: 11/05/2013 04:25:13
by Keith Ball (Basic support level)
Joined: 09/03/2013
Posts: 4


I am calling an elevated deferred CustomAction from a WiX MSI to install the Driver. At the same time I am trying to install an icon. This however is failing ...

string installationPath = session.CustomActionData["GetInstallPath"];

         // Install driver
         string driverFilePath = UnpackDriver();

         session.Log("Unpacking driver to " + driverFilePath + " Does driver exist? " + File.Exists(driverFilePath));

         uint reboot = 0;
                              CallbackFileSystem.CBFS_MODULE_NET_REDIRECTOR_DLL | CallbackFileSystem.CBFS_MODULE_MOUNT_NOTIFIER_DLL,
                              ref reboot);

         session.Log("Reboot after driver installed? " + reboot);

         // Install the icon to be used for the drive
         string iconPath = Path.Combine(installationPath, "bsync.ico");

         session.Log("Locating icon to " + iconPath + " Does icon exist? " + File.Exists(iconPath));

         bool iconReboot = false;
         if (File.Exists(iconPath))
               session.Log("Going to init application....");

               // Call initialize before installing the icon

               session.Log("Application is initialized");

               // Install the icon
               CallbackFileSystem.InstallIcon(iconPath, "MyDriveIcon", ref iconReboot);

               session.Log("Reboot after icon install? " + iconReboot);
            catch (Exception exception)
               session.Log("Unable to install icon " + exception);

The code runs fine up until InstallIcon at which point it throws an exception saying "The file could not be found". That is despite the iconPath being confirmed as existing.

Any help would be great!
Posted: 11/05/2013 08:02:19
by Vladimir Cherniga (EldoS Corp.)

Could you check the system events log on application page and find any cbfs5(4) error records ?
Posted: 11/05/2013 08:29:37
by Keith Ball (Basic support level)
Joined: 09/03/2013
Posts: 4

There is an error there:

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <Provider Name="cbfs4" />
  <EventID Qualifiers="0">1</EventID>
  <TimeCreated SystemTime="2013-11-05T14:21:46.000000000Z" />
  <Security />
Posted: 11/05/2013 08:46:12
by Vladimir Cherniga (EldoS Corp.)

Thanks, specify please the version of CallbackFS build.
Posted: 11/05/2013 08:52:56
by Vladimir Cherniga (EldoS Corp.)

And operation system (x32/x64).
Posted: 11/05/2013 08:55:56
by Keith Ball (Basic support level)
Joined: 09/03/2013
Posts: 4

Driver reports

The CBFS4Net.dll reports verison

Operating system is Windows 7 Enterprise (sp1) 32 bit
Posted: 11/05/2013 09:10:28
by Vladimir Cherniga (EldoS Corp.)

It's likely possible that the problem is already fixed in the most recent build of CallbackFS. Please update to v.4.0.138 and recheck the issue. Thank you.
Posted: 11/06/2013 04:54:07
by Keith Ball (Basic support level)
Joined: 09/03/2013
Posts: 4

Thank you for your help. I updated to the latest version, the icon is installed correctly and is set correctly for the drive.
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.



Topic viewed 1873 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!