Jump to content

Noob question about changing directories


 Share

Recommended Posts

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

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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

3) (whateverishere)\3rd_party\Extra\autoitscript.exe

(Just in case the question comes up, I do have the original au3 files )

Link to comment
Share on other sites

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 by viriiman
Link to comment
Share on other sites

$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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

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

Link to comment
Share on other sites

[/flame]

Just report the topic to a moderator if you think it's suspicious.

EDIT: JdeB posted before me.

Edited 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]

Link to comment
Share on other sites

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 by Joon
Link to comment
Share on other sites

  • Developers

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

Is this the thread you're talking about?

http://www.autoitscript.com/forum/index.php?showtopic=39344

No ... 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.
  :)

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