Jump to content

A script to run a file from cd


 Share

Recommended Posts

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.

Link to comment
Share on other sites

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


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

Link to comment
Share on other sites

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.

 

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...