Sign in to follow this  
Followers 0
Illuvator

A script to run a file from cd

4 posts in this topic

Hello, i am wondering how i write a script for this situation:

I want to install a programme from a cd, i launch the .exe script from the cd. I want this script to then launch and run a setup.exe on the cd. say the file directory on the cd was:

?:\New folder\a\setup.exe

where ? is an unknown drive letter.

How do i get the script to find the drive letter and then put that drive letter in the directory to run the setup. (On WPI when writing the directory it runs something like %cdrom%\New folder\a\setup.exe,

but was wondering how to get a script to run setup.exe from the cd.

Sorry if this is really confusing, ill explain again if you dont understand what i'm on about.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello, i am wondering how i write a script for this situation:

I want to install a programme from a cd, i launch the .exe script from the cd. I want this script to then launch and run a setup.exe on the cd. say the file directory on the cd was:

?:\New folder\a\setup.exe

where ? is an unknown drive letter.

How do i get the script to find the drive letter and then put that drive letter in the directory to run the setup. (On WPI when writing the directory it runs something like %cdrom%\New folder\a\setup.exe,

but was wondering how to get a script to run setup.exe from the cd.

Sorry if this is really confusing, ill explain again if you dont understand what i'm on about.

If the original script was run from the root of the cd you would not require to know the drive letter in order to execute the setup program. You would just require to use New folder\a\setup.exe.

Edit

You could also arrange for the original script to autorun on insertion of the cd.

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hello, i am wondering how i write a script for this situation:

I want to install a programme from a cd, i launch the .exe script from the cd. I want this script to then launch and run a setup.exe on the cd. say the file directory on the cd was:

?:\New folder\a\setup.exe

where ? is an unknown drive letter.

How do i get the script to find the drive letter and then put that drive letter in the directory to run the setup. (On WPI when writing the directory it runs something like %cdrom%\New folder\a\setup.exe,

but was wondering how to get a script to run setup.exe from the cd.

Sorry if this is really confusing, ill explain again if you dont understand what i'm on about.

something like

$drive = StringMid(@ScriptDir,1,1)
Run($drive & ":\New folder\a\setup.exe")
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

cheers for your help :o

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