Sign in to follow this  
Followers 0
Guest savvyscriptech

comspec hide command window

5 posts in this topic

Hi Guys,

I'm new on AUTOIT V3 scripting and I found it very easy and useful in my logon auto script. However, I found difficulty regarding @comspec command to be specific in hiding DOS window while script is running. I use the DOS shell command erase /s /f Filename.File Extension to delete all certain files in all sub directories. I emposed that command in Autoit script and it work okay. But, I want to hide the window so that user would not able to close the window. I used the flat @SW_HIDE but it turned out an error and autoit script will not run.

Any ideas or script recommendation on my recent problem is highly appreciated.

Thank you in advance and thanks AUTOIT team.

SavvyscriptGuy.....

Share this post


Link to post
Share on other sites



Hi Guys,

I'm new on AUTOIT V3 scripting and I found it very easy and useful in my logon auto script. However, I found difficulty regarding @comspec command to be specific in hiding DOS window while script is running. I use the DOS shell command erase /s /f Filename.File Extension to delete all certain files in all sub directories. I emposed that command in Autoit script and it work okay. But, I want to hide the window so that user would not able to close the window. I used the flat @SW_HIDE but it turned out an error and autoit script will not run.

Any ideas or script recommendation on my recent problem is highly appreciated.

Thank you in advance and thanks AUTOIT team.

SavvyscriptGuy.....

<{POST_SNAPBACK}>

its easier when you show the run command and the error you get...

So let me try one 'Wild guess" ..

Run("your command", @SW_HIDE) right ??

Should be;

Run("your command","", @SW_HIDE) ??


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

Hi JDEB,

This is the line command:

Runwait(@comspec &" /C erase /f D:\Temp\*.pif", @SW_HIDE)

and it gives me an error that command is not available. Could you please help me find the right solution.

thanks....

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hi JDEB,

This is the line command:

Runwait(@comspec &" /C erase /f D:\Temp\*.pif", @SW_HIDE)

and it gives me an error that command is not available. Could you please help me find the right solution.

thanks....

<{POST_SNAPBACK}>

try

Runwait(@comspec &" /C erase /f D:\Temp\*.pif","", @SW_HIDE)

or try

FileDelete("D:\Temp\*.pif")

Edit: looks like you guessed right JdeB

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Thanks @herewasplato.. you are a god.. thanks for the tips it worked........

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