Windows bootstrap

When I’m bootstrapping windows, chef client is downloading again and again unlike linux. Is there any way to skip this downloading and installing chef client again(if client already installed)?

FYI I am using --msi-url with knife command

knife bootstrap windows winrm <target_node_fqdn> --winrm-user Administrator --winrm-password --node-name -r “role[]” --msi-url http:///chef-client-12.13.37-1-x64.msi
-Thanks in advance

You want to omit the --msi-url since after install, the bootstrap process deletes that file. Then subsequent bootstraps see that and think they need to install that specific msi even though chef is already installed.

But if I omit --msi-url bootstrap will fail, Since my server doesn’t have internet connection(i have created local repo)

In that case, to add a check for whether or not the client is installed, you would need to provide your own script to manage the download and install via --bootstrap-install-command. Unfortunately thats not trivial but the stock bootstrap script will always download and install when using a custom url.