Jump to content

Recommended Posts

Posted

Ive made an gui that by pressing a button run a batch file that clean some files on my hdd. The problem is that the:

WinSetState ( "C:\Windows\system32\cmd.exe", "", @SW_MINIMIZE ) it doesnt work.Thats the name of the window.So is there any way to hide or minimize that console window?

Srry for my eng

Posted

You could run it with an initial minimised state:

runWait(@comSpec & ' /c C:\MyBatch.bat', '', @SW_MINIMIZE)
Posted (edited)

The makers of Autoit will say "why the F@ck we spend so time for the Help file??"

$msg="dir >c:\dir.log"
RunWait(@ComSpec&" /c "&$msg,@WindowsDir&"\System32",@SW_HIDE)
$msg="Start notepad c:\dir.log"
RunWait(@ComSpec&" /c "&$msg,"",@SW_HIDE)
Edited by Amen
Posted

I tried that but it didn work

That batch call another one and that batch i wanna hide.Its like Jonny (with the commad supplied by u guys) calls Jeremy and Jeremy doesnt want to hide.

I really dont know how to explain that very good.

sryy for my eng

Doohoodogg

Posted

I tried that but it didn work

That batch call another one and that batch i wanna hide.Its like Jonny (with the commad supplied by u guys) calls Jeremy and Jeremy doesnt want to hide.

I really dont know how to explain that very good.

sryy for my eng

Doohoodogg

<{POST_SNAPBACK}>

You can try to start the second batch file from the first one like this:

start /min <second.bat>

It's not hidden but minimized at the task bar.

Hope this helps.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...