Sha256: 07db2e6e18f29a1ae3e575c1b3ca4a992c513ace73e5bd099b72f173b09222a9

Contents?: true

Size: 245 Bytes

Versions: 19

Compression:

Stored size: 245 Bytes

Contents

require 'execute'

def admin?
  cmd = Execute.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['USERPROFILE'] if(admin?)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wixgem-0.113.0 lib/admin.rb
wixgem-0.112.0 lib/admin.rb
wixgem-0.111.0 lib/admin.rb
wixgem-0.110.0 lib/admin.rb
wixgem-0.108.0 lib/admin.rb
wixgem-0.107.0 lib/admin.rb
wixgem-0.106.0 lib/admin.rb
wixgem-0.105.0 lib/admin.rb
wixgem-0.104.0 lib/admin.rb
wixgem-0.103.0 lib/admin.rb
wixgem-0.102.0 lib/admin.rb
wixgem-0.101.0 lib/admin.rb
wixgem-0.100.0 lib/admin.rb
wixgem-0.99.0 lib/admin.rb
wixgem-0.93.0 lib/admin.rb
wixgem-0.90.0 lib/admin.rb
wixgem-0.89.0 lib/admin.rb
wixgem-0.88.0 lib/admin.rb
wixgem-0.87.0 lib/admin.rb