Method: Rex::Compat.setenv

Defined in:
lib/rex/compat.rb

.setenv(var, val) ⇒ Object



247
248
249
250
251
252
253
254
# File 'lib/rex/compat.rb', line 247

def self.setenv(var,val)
  if (is_windows and @@loaded_win32api)
    f = Win32API.new("kernel32", "SetEnvironmentVariable", ["P", "P"], "I")
    f.call(var, val + "\x00")
  else
    ENV[var]= val
  end
end