Sha256: 0f83076ae48528c044f8e2d3acc6ad2c8324bf38fd039bb9d23d43f3add5e427

Contents?: true

Size: 263 Bytes

Versions: 2

Compression:

Stored size: 263 Bytes

Contents

require 'cmd.rb'

def admin?
  cmd = CMD.new('net session')
  cmd[:ignore_exit_code] = true
  cmd[:quiet] = true
  cmd.execute
  return true if(cmd[:exit_code] == 0)
  return false
end
ENV['HOME'] ||= "#{ENV['HOMEDRIVE']}#{ENV['HOMEPATH']}" if(admin?)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wixgem-0.66.0 lib/admin.rb
wixgem-0.65.0 lib/admin.rb