Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 6 of 6

Thread: Question

  1. #1
    Join Date
    Nov 2006
    Posts
    4

    Grin Question

    I have a problem with creating a web/e-mail exe file. i put whole folder in autoplay's "docs" folder and when i try to run it by pressing the button it shows an error. it's because when it runs the program doesnt copy everything from the "docs" folder, but only one executable that is linked to the button (when preview it everything works fine). can i somehow force it to unpack every single file to a temp folder and then run the executable? plz help

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Why would you need to copy anything from your Docs folder to the HD? Why can't you run from the folder itself (thus using relative paths)?

    Yossi

  3. #3
    Join Date
    Nov 2006
    Posts
    4
    i work in a company where everything is blocked (dvd's/usb's, no admin rights etc). i can't install anything, so i need to make a "portable" version of every program to make it run. that's why i need to make it unpack whole thing and then run it. of course i can add "explore folder" function and then copy whole thing to hdd and make it run without probs (and i did so), but it's kinda lame (because i know there must be a way to make autoplay do it for me

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    But that is EXACTLY what I meant.
    Don't install anything, just run your website from the AMS project.

    Yossi

  5. #5
    Join Date
    Nov 2006
    Posts
    4
    Ok so i searched the forums and now i have an app that extracts itself to a temp folder and then runs. it works fine for a little proggies, but when there's much more files it tries to run it before copying to a folder is finished.

    Code:
    function CopyFolder(sSource, sDestination)
    	local m_sFolder;
    	local m_FoundFolder;
    	local error;
    	
    	--Find all the folders and sub-Folders
    	--results are stored in the table m_tblFolders
    	m_tblFolders = Folder.Find(sSource, "*", true, nil);
    
    	--if our destination folder does not have the 
    	--backslash as the last character, add it
    	if String.Right(sDestination, 1) ~= "\\" then
    		sDestination = sDestination .. "\\";
    	end
    	
    	--m_tblFolders will be nil if there are no folders 
    	if m_tblFolders ~= nil then
    		--enumerate through the found folders
    		for n, m_FoundFolder in m_tblFolders do
    			--replace the source's path with the destination's path
    			m_sFolder = String.Replace(m_FoundFolder, sSource, sDestination, false);
    			--create the folder
    			Folder.Create(m_sFolder);
    			error = Application.GetLastError();
    			if (error ~= 0) then
        			--set n to value to exit FOR loop
        			n = Table.Count(m_tblFolders)
    			end
    		end
    	end
    
    	--if no errors occurred, copy the files
    	if (error == 0) then
    		--show the status dialog
    		StatusDlg.Show(MB_ICONNONE, false);
    		--copy all files from the source folder, with recurse.
    		File.Copy(sSource .. "\\*.*", sDestination, true, true, false, true, nil);
    		--hide the status dialog
    		StatusDlg.Hide();
    		error = Application.GetLastError();
    	end
    
    	--clean up
    	m_tblFolders = nil;
    	return error;
    end
    
    
    if CopyFolder("AutoPlay\\Docs\\vp_uml\\", _TempFolder) == 0 then
    	result = File.Run(_TempFolder.."\\vp_uml\\bin\\Visual Paradigm for UML 5.3.exe", "", _TempFolder , SW_SHOWNORMAL, true);
    else
    	result = Dialog.Message("Folder Copy", "There was an error copying the folder.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    end
    the question is how to make it wait for the copy process to get finished, and then run the proggie?(Visual Paradigm for UML 5.3)

  6. #6
    Join Date
    Dec 2003
    Posts
    891
    So, you are building to a web/email exe?
    Then it extracts to users temp folder?
    As yosik says, build to a hard drive folder, then burn the whole directory structure.

Similar Threads

  1. Math.RandomSeed() question
    By stickck in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 06-09-2006, 09:42 AM
  2. FlashMX vs AMS5 Data Arrays question
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 01-19-2004, 09:05 AM
  3. Question on VB and AMS5
    By Martin_SBT in forum AutoPlay Media Studio 5.0
    Replies: 1
    Last Post: 12-11-2003, 08:22 AM
  4. question about sound mp3
    By Rapido78840 in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 10-10-2003, 11:19 AM
  5. ** Question for all AutoPlay Menu Studio Users **
    By Ted in forum AutoPlay Menu Studio 3.0
    Replies: 4
    Last Post: 10-09-2000, 09:09 AM

Posting Permissions

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