Sign in to follow this  
Followers 0
duhu

Batch hide

5 posts in this topic

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

Share this post


Link to post
Share on other sites



You could run it with an initial minimised state:

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

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0