28extern "C" __declspec(dllexport) UINT __stdcall InstallStartmenuFolderIcon( MSIHANDLE handle )
30 std::wstring sOfficeMenuFolder =
GetMsiPropertyW( handle, L
"OfficeMenuFolder" );
31 std::wstring sDesktopFile = sOfficeMenuFolder + L
"Desktop.ini";
37 WritePrivateProfileStringW(
41 sDesktopFile.c_str() );
43 SetFileAttributesW( sDesktopFile.c_str(), FILE_ATTRIBUTE_HIDDEN );
44 SetFileAttributesW( sOfficeMenuFolder.c_str(), FILE_ATTRIBUTE_SYSTEM );
50extern "C" __declspec(dllexport) UINT __stdcall DeinstallStartmenuFolderIcon(MSIHANDLE handle)
52 std::wstring sOfficeMenuFolder =
GetMsiPropertyW( handle, L
"OfficeMenuFolder" );
53 std::wstring sDesktopFile = sOfficeMenuFolder + L
"Desktop.ini";
55 SetFileAttributesW( sDesktopFile.c_str(), FILE_ATTRIBUTE_NORMAL );
56 DeleteFileW( sDesktopFile.c_str() );
58 SetFileAttributesW( sOfficeMenuFolder.c_str(), FILE_ATTRIBUTE_NORMAL );
static std::wstring GetMsiPropertyW(MSIHANDLE handle, const std::wstring &sProperty)