viriiman Posted January 11, 2007 Posted January 11, 2007 So I've written three seperate autoit scripts to install three seperate programs from my pen drive. They all run without a problem, but I'm looking to tie them all together. The problem is I have no idea how to do so. Would I leave them as three seperate scripts and call them one at a time, or would I just write one script that includes them all? My directory structure is: \ (Main folder where subfolders w/ files in them live) ...\3rd_party\bsi\old version ...\3rd_party\Extra I can't use a static drive letter because that may change, and I don't want to have to enter in the drive letter manually. I've searched around and found that I probably need to use the "FileChangeDir" command, but I have no idea how to use it. TIA viriiman
CoePSX Posted January 11, 2007 Posted January 11, 2007 If the scripts run from the pendrive then you just don't use a drive letter on the source, and the destination would be C: (the local driver). Something like DirCopy ("mydir\mysubdir", "C:\program files\mysubdir"); [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font]
Joon Posted January 11, 2007 Posted January 11, 2007 (edited) Use relative path from @ScriptDir instead. Edited January 11, 2007 by Joon
viriiman Posted January 11, 2007 Author Posted January 11, 2007 If the scripts run from the pendrive then you just don't use a drive letter on the source, and the destination would be C: (the local driver).Something like DirCopy ("mydir\mysubdir", "C:\program files\mysubdir");I don't want to copy the install to the local drive, as I don't want the users to have access to the install.Use relative path from @ScriptDir instead.I have no idea what this means (sorry, still learning)To also give an update. Like I mentioned, there are three scripts:1) (lives in the root of the folder structure) eg (whateverishere)\autoitscript.exe 2) (whateverishere)\3rd_party\bsi\old version\autoitscript.exe3) (whateverishere)\3rd_party\Extra\autoitscript.exe(Just in case the question comes up, I do have the original au3 files )
Joon Posted January 11, 2007 Posted January 11, 2007 (edited) Put this in main AutoIt program that in root directory. Run(@ScriptDir & "\3rd_party\bsi\old version\autoitscript.exe") Run(@ScriptDir & "\3rd_party\Extra\autoitscript.exe") Edited January 11, 2007 by Joon
viriiman Posted January 11, 2007 Author Posted January 11, 2007 Put this in main AutoIt program that in root directory. Run(@ScriptDir & "\3rd_party\bsi\old version\autoitscript.exe") Run(@ScriptDir & "\3rd_party\Extra\autoitscript.exe") Will it wait for the previous script to finish before it calls the new one?
Joon Posted January 11, 2007 Posted January 11, 2007 Will it wait for the previous script to finish before it calls the new one?Then you need to use RunWait.
viriiman Posted January 11, 2007 Author Posted January 11, 2007 Then you need to use RunWait.How?(again, I'm sorry for so many followup posts).
Joon Posted January 11, 2007 Posted January 11, 2007 AutoIt has very good help file. RunWait(@ScriptDir & "\3rd_party\bsi\old version\autoitscript.exe") RunWait(@ScriptDir & "\3rd_party\Extra\autoitscript.exe")
viriiman Posted January 11, 2007 Author Posted January 11, 2007 (edited) AutoIt has very good help file. RunWait(@ScriptDir & "\3rd_party\bsi\old version\autoitscript.exe") RunWait(@ScriptDir & "\3rd_party\Extra\autoitscript.exe") I know, and I'm sorry I didn't read into the command. Thank you though, for putting up with me and my questions, it's greatly appreciated. I do have one other one, but I'll post a new thread about it. THANKS! Edited January 11, 2007 by viriiman
CoePSX Posted January 12, 2007 Posted January 12, 2007 $MyDriveLetter = StringLeft (@ScriptDir, 1) This will get the first letter from the script full path. If the script path is J:\Dir1\SubDir1\SubDir2\script.exe, $MyDriveLetter will be J. [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font]
secondglance Posted January 12, 2007 Posted January 12, 2007 The fact that this guy calls himself "viriiman" and the fact that he's asking for help with a script that he can run from a pen drive combine to suggest that he's writing a virus that he can install on someone else's computer by plugging in his pen drive. This is not exactly something that's going to enhance AutoIt's reputation.
Developers Jos Posted January 12, 2007 Developers Posted January 12, 2007 The fact that this guy calls himself "viriiman" and the fact that he's asking for help with a script that he can run from a pen drive combine to suggest that he's writing a virus that he can install on someone else's computer by plugging in his pen drive.This is not exactly something that's going to enhance AutoIt's reputation.Ahh .. the famous " Guilty until proven innocent" ... or did I get that backwards ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
CoePSX Posted January 12, 2007 Posted January 12, 2007 (edited) [/flame] Just report the topic to a moderator if you think it's suspicious. EDIT: JdeB posted before me. Edited January 12, 2007 by CoePSX [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font]
Joon Posted January 12, 2007 Posted January 12, 2007 (edited) The fact that this guy calls himself "viriiman" and the fact that he's asking for help with a script that he can run from a pen drive combine to suggest that he's writing a virus that he can install on someone else's computer by plugging in his pen drive.This is not exactly something that's going to enhance AutoIt's reputation.What made you think that viriiman is making AutoIt to spread the virus??? Edited January 12, 2007 by Joon
secondglance Posted January 12, 2007 Posted January 12, 2007 What made you think that viriiman is making AutoIt to spread the virus???...um, the first sentence of the first post on this thread says more or less exactly that.
Developers Jos Posted January 12, 2007 Developers Posted January 12, 2007 ...um, the first sentence of the first post on this thread says more or less exactly that.Maybe have a second glance at it and then explain how so ?I read that somebody has a MemKey from which he wants to install software .... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
viriiman Posted January 12, 2007 Author Posted January 12, 2007 Maybe have a second glance at it and then explain how so ?I read that somebody has a MemKey from which he wants to install software ....Correct. I posted the code in another thread to all to see. It starts on on a pen drive, until I MANUALLY copy it over to a server (who's path and drive letter changes based on location) and run it from there. The whole issue I have is that (again) none of the paths are the same from office to office. So I needed some way to run the script regardless of drive letter and path to the folder.Sorry if I'm beating a dead horse, but I want to make it 1000% clear that this is not malware related.
BALA Posted January 12, 2007 Posted January 12, 2007 Is this the thread you're talking about?http://www.autoitscript.com/forum/index.php?showtopic=39344 [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Developers Jos Posted January 12, 2007 Developers Posted January 12, 2007 Is this the thread you're talking about?http://www.autoitscript.com/forum/index.php?showtopic=39344No ... clear ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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