Jump to content

Small help please


Robin
 Share

Recommended Posts

Hi guys 'n dolls...As i mentioned before, i'm new to scripting and have one small fav to ask...I just want to copy/overwrite a autorun.inf file. I compiled a small exe file that has 2 buttons OK and CANCEL...If i click on "cancel", it still overwrites my file...How can i change this? Here is my very simple code-->

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_outfile=D:\CD-Menu\test.exe

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

MsgBox(1, "Overwrite", "Overwrite Autorun.inf?", 0)

FileCopy ( "autorun.in_", "autorun.inf", 1)

...it looks as if i have to add a "if" function somewhere as it is the FILECOPY that changes it?

tia

Link to comment
Share on other sites

Link to comment
Share on other sites

$retVal = MsgBox(0x4, "Overwrite?", "Do You Want To Overwrite The Autorun.inf File?"); Yes / No Dialog Box 6=Yes 7=No
If $retVal = 6 Then
    FileCopy ( "autorun.in_", "autorun.inf", 1)
EndIf

Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

Link to comment
Share on other sites

$retVal = MsgBox(0x4, "Overwrite?", "Do You Want To Overwrite The Autorun.inf File?"); Yes / No Dialog Box 6=Yes 7=No
If $retVal = 6 Then
    FileCopy ( "autorun.in_", "autorun.inf", 1)
EndIf
Brother...you are my HERO!!! thx a lot...As i said earlier i'm no script-kiddy...use to work with assembler.

...thx FaT3oYCG...much appreciated :P

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...