Open my Program at background in Windows

I have a little program in rust, i wan't to know how to run in background if i do double click de CMD is Open and still Open at the end of the process.

I want to run this same Program but On Background:

I see how to run a Command in background but i don't want to run new process!!! is the same Program in background!

Use #![windows_subsystem = "windows"] at the top level of your program to avoid the console.


I am trie to this and get error: an Inner attribute is not permitted in this context.

It's only allowed as a top-level attribute of a binary crate, like the beginning of src/

My friend am using this into at the top... am working whit tokio i don't know if this is the problem =/

Pull it to the top, before the mod and use statements.

1 Like

Not top of main function, but top of that file. Literally the first line in that file, before everything else.


Thanks all for the help!