mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
Add new VideoConference module for muting mic/cam (#11798)
* add new VideoConference module for muting mic/cam Co-authored-by: PrzemyslawTusinski <61138537+PrzemyslawTusinski@users.noreply.github.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
@@ -245,6 +245,13 @@ void ReportDotNetInstallationInfo(const filesystem::path& tmpDir)
|
||||
}
|
||||
}
|
||||
|
||||
void ReportVCMLogs(const filesystem::path& tmpDir, const filesystem::path& reportDir)
|
||||
{
|
||||
error_code ec;
|
||||
copy(tmpDir / "PowerToysVideoConference_x86.log", reportDir, ec);
|
||||
copy(tmpDir / "PowerToysVideoConference_x64.log", reportDir, ec);
|
||||
}
|
||||
|
||||
int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
{
|
||||
// Get path to save zip
|
||||
@@ -270,10 +277,9 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
auto settingsRootPath = PTSettingsHelper::get_root_save_folder_location();
|
||||
settingsRootPath = settingsRootPath + L"\\";
|
||||
|
||||
// Copy to a temp folder
|
||||
auto tmpDir = temp_directory_path();
|
||||
tmpDir = tmpDir.append("PowerToys\\");
|
||||
if (!DeleteFolder(tmpDir))
|
||||
const auto tempDir = temp_directory_path();
|
||||
auto reportDir = temp_directory_path() / "PowerToys\\";
|
||||
if (!DeleteFolder(reportDir))
|
||||
{
|
||||
printf("Failed to delete temp folder\n");
|
||||
return 1;
|
||||
@@ -281,10 +287,10 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
|
||||
try
|
||||
{
|
||||
copy(settingsRootPath, tmpDir, copy_options::recursive);
|
||||
copy(settingsRootPath, reportDir, copy_options::recursive);
|
||||
|
||||
// Remove updates folder contents
|
||||
DeleteFolder(tmpDir / "Updates");
|
||||
DeleteFolder(reportDir / "Updates");
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -293,28 +299,30 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
}
|
||||
|
||||
// Hide sensitive information
|
||||
HideUserPrivateInfo(tmpDir);
|
||||
HideUserPrivateInfo(reportDir);
|
||||
|
||||
// Write windows settings to the temporary folder
|
||||
ReportWindowsSettings(tmpDir);
|
||||
ReportWindowsSettings(reportDir);
|
||||
|
||||
// Write monitors info to the temporary folder
|
||||
ReportMonitorInfo(tmpDir);
|
||||
ReportMonitorInfo(reportDir);
|
||||
|
||||
// Write windows version info to the temporary folder
|
||||
ReportWindowsVersion(tmpDir);
|
||||
ReportWindowsVersion(reportDir);
|
||||
|
||||
// Write dotnet installation info to the temporary folder
|
||||
ReportDotNetInstallationInfo(tmpDir);
|
||||
ReportDotNetInstallationInfo(reportDir);
|
||||
|
||||
// Write registry to the temporary folder
|
||||
ReportRegistry(tmpDir);
|
||||
ReportRegistry(reportDir);
|
||||
|
||||
// Write compatibility tab info to the temporary folder
|
||||
ReportCompatibilityTab(tmpDir);
|
||||
ReportCompatibilityTab(reportDir);
|
||||
|
||||
// Write event viewer logs info to the temporary folder
|
||||
EventViewer::ReportEventViewerInfo(tmpDir);
|
||||
EventViewer::ReportEventViewerInfo(reportDir);
|
||||
|
||||
ReportVCMLogs(tempDir, reportDir);
|
||||
|
||||
// Zip folder
|
||||
auto zipPath = path::path(saveZipPath);
|
||||
@@ -325,7 +333,7 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
|
||||
try
|
||||
{
|
||||
ZipFolder(zipPath, tmpDir);
|
||||
ZipFolder(zipPath, reportDir);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -333,6 +341,6 @@ int wmain(int argc, wchar_t* argv[], wchar_t*)
|
||||
return 1;
|
||||
}
|
||||
|
||||
DeleteFolder(tmpDir);
|
||||
DeleteFolder(reportDir);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user