Jump to content
Sign in to follow this  
Ibrahim

Execute("program.dat")

Recommended Posts

Ibrahim

i'm doing a program that would read output from the UI of another program. What i want is to completely hide the other program thus i hide its icon tray,its window and its title BUT i need to hide the file name so help me do it so i can run it like this ---->run("TheProgram.dat")

Share this post


Link to post
Share on other sites
smashly

Hi once again,

#include <Constants.au3>

Opt("RunErrorsFatal", 0)

$DatFile = "x:\PathToYourDatFile\yourfile.dat"

If FileExists($DatFile) Then
    $Pid = Run(@ComSpec & " /c " & 'assoc .dat', @SystemDir, @SW_HIDE, $STDOUT_CHILD)
    $DatAssoc = StdoutRead($Pid)
    Run(@ComSpec & " /c " & 'assoc .dat=exefile', "", @SW_HIDE)
    Run($DatFile, "", @SW_SHOW)
    Run(@ComSpec & " /c " & 'assoc ' & $DatAssoc, "", @SW_HIDE)
EndIf

Cheers

Edited by smashly

Share this post


Link to post
Share on other sites
Ibrahim

Beside programming code, this idea is hot for all things else i can assoc other files as well adn execute even a jpg photo WOW

Share this post


Link to post
Share on other sites
Ibrahim

can i add a tiny miny problem ?-- the program runs and the @sw_hide not working do i did the winwait() and Winsetstate() stuff with a delay 0 millisecond in the OPT() thing, so i need to completely hide it from the view as it's now flashes before hiding

Share this post


Link to post
Share on other sites
smashly

What program is it that you are trying to run hidden?

Share this post


Link to post
Share on other sites
smashly

Sorry m8, I did have a look at WinArpAttacker but I have no answer for it ...

Cheers

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  

×