Skip to content

Commit

Permalink
fixed configuration file issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wsobel committed Jun 4, 2024
1 parent af49a4e commit 12215c7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mtconnect/configuration/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,9 @@ namespace mtconnect {
}
RegCloseKey(mtc);

RegSetValueExA(agent, "ConfigurationFile", 0ul, REG_SZ, (const BYTE *)m_configFile.c_str(),
m_configFile.string().size() + 1);
auto cfgFile = m_configFile.string();
RegSetValueExA(agent, "ConfigurationFile", 0ul, REG_SZ, (const BYTE *)cfgFile.c_str(),
cfgFile.length() + 1);
RegCloseKey(agent);

LOG(info) << "Service installed successfully.";
Expand Down

0 comments on commit 12215c7

Please sign in to comment.