usera Posted June 7, 2013 Share Posted June 7, 2013 Greeting, Look for a way: I need to create a small utility to copy 2 small text files: program.ini and hosts some code like: filecopy ("hosts", "C:\Windows\System32\driversetchosts") I want to compile these 2 files in the only one EXE file, how can I do that? thanks usera Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2013 Share Posted June 7, 2013 Check out FileInstall() What exactly is it you are doing with the hosts file? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
usera Posted June 7, 2013 Author Share Posted June 7, 2013 Check out FileInstall() What exactly is it you are doing with the hosts file? where is FileInstall(), help can not find it easy DNS fix Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2013 Share Posted June 7, 2013 Take a look in the help file for FileInstall() (or just click the link to view the help file online) AutoIt3 Online Help Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 (edited) Take a look at the helpfile for the FileInstall function. You have almost 200 posts and you don't know what is a function? Edit: aaaaah too late Br, FireFox. Edited June 7, 2013 by FireFox Link to comment Share on other sites More sharing options...
orbs Posted June 7, 2013 Share Posted June 7, 2013 (edited) forgive me dumbness, but what's wrong with 2-lines batch file? edit: or even a single line, if you put your 2 source files - and only your 2 source files - in a dedicated folder. Edited June 7, 2013 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2013 Share Posted June 7, 2013 forgive me dumbness, but what's wrong with 2-lines batch file? He is wanting to include the files in the executable. Batch would be fine if he wanted to have 3 files (the batch file, and the two that are being copied). AutoIt3 Online Help Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 (edited) More than copying the two files, he wants to compile them in one exe - not possible with a batch script. Well it's time to go to bed, 2nd time I'm too late. Edited June 7, 2013 by FireFox Link to comment Share on other sites More sharing options...
orbs Posted June 7, 2013 Share Posted June 7, 2013 oh, then FileInstall() it is then. i'm just saying, cause i tackled that issue in the past, the solution was a batch file called by PsExec on multiple target machines, where the files being copied were placed on a network share. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2013 Share Posted June 7, 2013 More than copying the two files, he wants to compile them in one exe - not possible with a batch script. Well it's time to go to bed, 2nd time I'm too late. It's about time for me to start thinking about dinner anyway hehe Too many answers is better than too few AutoIt3 Online Help Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 @orbs And do you think it was not useful to mention it in your first post ? @danwilli Can you bring me some food? Link to comment Share on other sites More sharing options...
DW1 Posted June 7, 2013 Share Posted June 7, 2013 @danwilli Can you bring me some food? It's in the mail... I wouldn't eat it. AutoIt3 Online Help Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 It's in the mail... I wouldn't eat it. Something non-perishable in this case Link to comment Share on other sites More sharing options...
orbs Posted June 7, 2013 Share Posted June 7, 2013 @orbs And do you think it was not useful to mention it in your first post ? well. it's kind of hard to list all possible ways to put files in folders... and batch is still one of the most powerful (and most underestimated) methods i know of. admin may want to include a batch command in login script, in the "Startup" folder, in the registry "Run", ... or with PsExec. let the guy choose, i was just pointing it out. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff 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