So I'm making a small project in Ruby, and have converted it to an exe using Ocra The only really relevant part of the script is the following:
class Taskkill
$task_list = "config/tlist.json"
def initialize()
json_data = JSON.parse(File.read($task_list))
@tasks = json_data['tasks']
end
def kill()
@tasks.each do |task|
out,err,suc = Open3.capture3("taskkill /F /IM #{task}")
puts "#{task} ... #{suc}"
end
end
end
test = Taskkill.new()
test.kill()
Then I converted it with Ocra, with the following command:
ocra "c:\Users\usr\my_file_path\my_rb_script.rb" --dll ruby_builtin_dlls/libgmp-10.dll --icon ./resources/mdr256.ico --windows
The exe is converted as expected and does what it needs to do, but when run it shows this: Unexpected windows keep opening until the exe has finished running.
Is there any way to prevent this? I'd prefer the exe to be able to run without being disturbing to someone using the computer.
I've tried adding a few lines of code that should get rid of the window opened by the program but no success so far.