Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-Machine installs #337

Merged
merged 14 commits into from
May 11, 2015
Prev Previous commit
Next Next commit
Fix GetUserName usage
anaisbetts committed May 8, 2015
commit b67ce557a06d7c3070cf91694e3da6652c83f661
4 changes: 2 additions & 2 deletions src/Setup/MachineInstaller.cpp
Original file line number Diff line number Diff line change
@@ -126,9 +126,9 @@ bool MachineInstaller::ShouldSilentInstall()

// C:\ProgramData\$pkgName\$username
wchar_t username[512];
DWORD dontcare;
DWORD unamesize = _countof(username);
SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, installFolder);
GetUserName(username, &dontcare);
GetUserName(username, &unamesize);
wcscat(installFolder, L"\\");
wcscat(installFolder, pkgName);
wcscat(installFolder, L"\\");