Guest kris_h Posted August 2, 2004 Share Posted August 2, 2004 i have made a script that will run fine from my hdd, when i burn and try to run the same script from a cd/dvd it doesnt work. what am i doing wrong? or am i just retarted.. Link to comment Share on other sites More sharing options...
CyberSlug Posted August 2, 2004 Share Posted August 2, 2004 Is the script compiled? Does the script rely on the CD being a particular drive letter? What version of Windows? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Guest kris_h Posted August 2, 2004 Share Posted August 2, 2004 script is compiled, doesn't rely on a drive letter and OS is XP pro...; AutoIt Version: 3.0; Language: English; Platform: Win9x/NT; Author: kris;; Script Function:; types in cd key for bf1942;WinMinimizeAll()Sleep(1000); Run silent installRun("setup.exe -s -sms"); Wait for the app to become activeWinWaitActive("CD Serial Number Request"); Now that the window is active, type cd keySend("9915382068119711441426{ENTER}");Sleep(100); Wait for the app to become active WinWaitActive("Electronic Registration"); Now that the window is activeWinKill("Electronic Registration", "")Sleep(3000)ProcessClose("Battlefield 1942_eReg.exe"); Finished! Link to comment Share on other sites More sharing options...
ezzetabi Posted August 2, 2004 Share Posted August 2, 2004 ... when you post code you should avoid posting serials. Can you try copy the installation folder in the HHD and after starting the installation in order to solve the problem Larry posted. Link to comment Share on other sites More sharing options...
autoitNOW Posted August 2, 2004 Share Posted August 2, 2004 You need to have your script do the following to run from a CD: . When you click on your compiled exe, have it copy files to a specific locaton. filecopy... to c:\temp, for example . Then have that exe or another exe (I've noticed it works better to have 2 exe to do this, especially with a floppy), run the files from the set location on your hdd. Like say c:\temp, for example. runwait... c:\temp\"your file". . You can then delete the temp file when the operation is complete. The problem with trying to run from a CD is you can't predict what drive letter every computer is going to have, but you can copy the files from the CD to a specific location on your hdd and be sure they can run from there. An ADVOCATE for AutoIT Link to comment Share on other sites More sharing options...
sugi Posted August 2, 2004 Share Posted August 2, 2004 @autoitNOW: You also cannot be sure that C: is the drive where windows is installed... but this is no problem. Just use the macros @WorkingDir, @ScriptDir and so on. Link to comment Share on other sites More sharing options...
pekster Posted August 2, 2004 Share Posted August 2, 2004 You also cannot be sure that C: is the drive where windows is installed...<{POST_SNAPBACK}>You can't even count on C:\ existing on all systems, or being writable if it does exist. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
this-is-me Posted August 2, 2004 Share Posted August 2, 2004 What is the specific error it gives? Who else would I be? Link to comment Share on other sites More sharing options...
Guest kris_h Posted August 2, 2004 Share Posted August 2, 2004 If you use a DOS prompt and go to that drive and run the "setup.exe -s -sms" does it work? Does running setup in this way require the ability to write to the place where it comes from. maybe the setup is trying to write to the CD... a log or something... Lar. <{POST_SNAPBACK}>all sorted!! it was trying to write a log. so i added /f2c:\inst.log and now it runs. Cheers!! Link to comment Share on other sites More sharing options...
emmanuel Posted August 3, 2004 Share Posted August 3, 2004 (edited) all sorted!! it was trying to write a log. so i added /f2c:\inst.log and now it runs. Cheers!! <{POST_SNAPBACK}>you might want to do that as /f2"& @tempdir & "\inst.log" just in case of the OS being installed on d: or some such (like this laptop I'm working on now, dual boot) @SlimShady - THANKS! That's what I get for not looking at the helpfile, heh. Edited August 3, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
SlimShady Posted August 3, 2004 Share Posted August 3, 2004 @emmanuel:I don't mean to hurt your feelings;It's @TempDir not @temp Link to comment Share on other sites More sharing options...
emmanuel Posted August 3, 2004 Share Posted August 3, 2004 @emmanuel: I don't mean to hurt your feelings; It's @TempDir not @temp <{POST_SNAPBACK}> how'd I do that? :"> Thanks. "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now