Jump to content

Recommended Posts

Posted

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

 

Posted

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

Posted (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 by FireFox
Posted (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 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

 

Posted

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

Posted (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 by FireFox
Posted

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

 

Posted

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.

:gathering:  It's about time for me to start thinking about dinner anyway hehe

Too many answers is better than too few :huggles:

Posted

@orbs

And do you think it was not useful to mention it in your first post ?

@danwilli

Can you bring me some food? :)

Posted

@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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...