Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    77

    Application copy itself into other location

    I built my app as email attachement - single, compressed file.
    And I want it would be able copy itself in other location.
    So I have to get actual location of my app and then use File.Copy action.
    But how to get actual location?

  2. #2
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    try inserting _SourceFolder as the path of the 'to be copyied' file so it looks like this

    File.Copy(_SourceFolder "myfilename.exe", *.exe", _DesktopFolder .. "", false);

    didnt test but should work

  3. #3
    Join Date
    Sep 2006
    Posts
    77

    reply

    I tried it before. Not work.
    _Sourcefolder is a folder where from autoplay.exe was executed.
    But this single-file application decompress its content to 'temp' folder (most often in Drive:\Documents and settings\user\application data\temp) and from there it execute 'autoplay.exe'. So _Sourcefolder don't cointains that single app but the decompressed files.
    I thought about System.EnumerateProcesses action but I don't know how to get file path from any process.

  4. #4
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    A simple search finds this

    http://www.indigorose.com/forums/sho...ght=exe+folder

    The third post shows you a simple solution to find the path to the folder where the exex was run from.
    Dermot

    I am so out of here

  5. #5
    Join Date
    Oct 2006
    Location
    Somewere over the rainbow
    Posts
    314
    i know the Dynamic link to the tempfolder as well that is _TempFolder (As obvious as it may seem) how its of some good use to you

Similar Threads

  1. Copy Iteself To Another Location
    By srussell in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 10-04-2005, 08:51 AM
  2. HOWTO: Distribute an AutoPlay Application with Setup Factory 6.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-25-2002, 02:33 PM
  3. INFO: Dynamically Resizing an Application at Runtime
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-21-2002, 02:23 PM
  4. HOWTO: Make an AutoPlay Application Expire
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-09-2002, 10:10 AM
  5. INFO: How to Set the Default Application Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts