Jump to content

Autoit Cdrom Variable?


buzzman2005

Recommended Posts

Hi all ok

i am using autoit for some of my pgms taht dont have switches.... and i want to install them form cd.... ive tried running a cmd file that sets the cdrom variable and then starts the autoit exe... but when it starts it cant execute the setup file in the script.......

is there a way to set the cdrom variable in an autoit script????

also is there a way to make a folder inside the cd "the root fodler" for an install

ie :

cdrom-

creative

-install

-setup.exe

logitech

ms

ie the setup.exe file was in the roor folder ont he original cd that had the software..... it wont run unless it's in the root folder........ so is there a way to make the install folder the root folder for a bit?????

Link to comment
Share on other sites


Well this should work if the setup file is next to the script:

Run ( "setup.exe" )

Provided of course your batch file started the autoit script...which you stated it did.

Now if the setup file is not next to the script but insteed nested in another folder below the auto it script you would have to do some thing like so:

Run ( @ScriptDir & "\folder\setup.exe" )

@ScriptDir is what ever the path is to the location of the autoit script...so you can move the script to your hard drive or cd usb drive and hell probably a network drive and it would still work fine as long as you can execute the autoit script to being with. Tho I haven't tested it via network so...don't quote me. :)

My self I always have the setup file next to my autoit script...that said I also use the following code to excute files:

; Execute Installer
If FileExists ( @ScriptDir & "\setup.exe" ) Then
Run ( @ScriptDir & "\setup.exe" )
Else
Exit
EndIf

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

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