Ohai Chefs,I'm seeking help from those of you who have more Windows-fu than I.I need to install some software from a Windows share.Unfortunately there doesn't seem to be a way to specify username and password in a UNC path and give that to either the windows_service or remote_file resource. Or is there?
Failing that, we tried something like this:execute "mount share #{drive}" docommand "net use #{drive}: #{path} /user:#{username} #{password} /persistent:No"endwindows_package "Symantec Anti-Virus" dosource "#{drive}:\\#{node['symantec-antivirus']['installer']['arch_file']}"options "/qn ALLUSERS=1 REBOOT=ReallySuppress"action :installend
execute "unmount share #{drive}" docommand "net use /d #{drive}:"endThis sucks in many ways (deciding which drive letter to use is tricky, any failure will leave mapped drives around, …).Worse, it doesn't work when chef-client is run a service!STDERR: System error 1312 has occurred.A specified logon session does not exist. It may already have been terminated.Googling about this stuff, it seems there is a way around this error by using a PSEXEC.EXE, but I would rather avoid that is possible.Thoughts?Andrea
Archive powered by MHonArc 2.6.16.