Windows reload Enviroment Variables on the fly

Hi community,

On Windows, I’m installing SQL Server. With SQL Server they distribute some binaries, I’m using sqlcmd to create users and databases.

The initial OS PATH has the following entries:

C:/opscode/chef/embedded/bin;
C:/opscode/chef/embedded/bin;
C:\opscode\chef\bin;
C:\Windows;
C:\Windows\system32;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0;

After installing SQL Server the OS has the following entries:

C:/opscode/chef/embedded/bin;
C:/opscode/chef/embedded/bin;
C:\opscode\chef\bin;
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn;
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn;
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio;
C:\Program Files\Microsoft SQL Server\120\DTS\Binn;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn;
C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn;
C:\Windows;
C:\Windows\system32;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0;

The sqlcmd binary is inside C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;

How can I reload the ENV[‘PATH’] on chef side so the next resources can find the sqlcmd binary?

From the Windows community cookbook. Can we use the following code block to update the path?