Jump to content

Recommended Posts

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

Link to post
Share on other sites
  • Developers

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() ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

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
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...