Sign in to follow this  
Followers 0
duhu

Batch

4 posts in this topic

Hy...i'm calling a batch script that defragments the hdd trough the command:

RunWait(@ComSpec & " /c " & 'start data\Def.vbs', "", @SW_HIDE)

the prblem is that i tried to hide the window that appear when the batch starts defrgamenting the hdd but its not working (the name of the window is 'C:\Windows\system32\Defrag.exe", its not working with any commands like WinSetState or others, i even tried to put into the title of window "classname=WindowsCommandsConsole" (i saw that in Window Info) but its not working. Anyone know why

Pls help

thx

Srry for my eng if its bad

Doohoodogg

Share this post


Link to post
Share on other sites



Hy...i'm calling a batch script that defragments the hdd trough the command:

RunWait(@ComSpec & " /c " & 'start data\Def.vbs', "", @SW_HIDE) 

the prblem is that i tried to hide the window that appear when the batch starts defrgamenting the hdd but its not working (the name of the window is 'C:\Windows\system32\Defrag.exe", its not working with any commands like WinSetState or others, i even tried to put into the title of window "classname=WindowsCommandsConsole" (i saw that in Window Info) but its not working. Anyone know why

Pls help

thx

Srry for my eng if its bad

Doohoodogg

<{POST_SNAPBACK}>

Did you change the RunWait() to Run() ?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The problem is that Def.vbs has his own RUN and that open a window with Defrag.exe.

I'm asuming that the vbs script has a line like this.

Set WshShell = WScript.CreateObject("WScript.Shell")

Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)

change 1 to 0 so the script will run defrag hiden

Sorry for my spelling but, english is my second language

Hope this help!!!

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Thx a lot, that worked.

Doohoodogg

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