Results 1 to 7 of 7

Thread: What to attach one exe to a word document or picture file

  1. #1
    Join Date
    Jul 2005
    Posts
    93
    Rep Power
    0

    Default What to attach one exe to a word document or picture file

    i want to know how to attach an exe to a word document or a picture file in c programming.

    i would also like know to browse to the path startmenu directory.

    in c programming.

  2. #2
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Quote Originally Posted by Dj Still View Post
    i want to know how to attach an exe to a word document or a picture file in c programming.

    i would also like know to browse to the path startmenu directory.

    in c programming.
    I'm not following exactly what you want to do.

    If it is what I think, then I do not know the answer but I can point you where to look.

    If it is how to "launch explorer showing the start menu" eg explorer opens with 'C:\Documents and Settings\All Users\Start Menu' then search
    1) how to 'launch a process' in C++
    2) 'Special Folders'
    Post you findings here

    If it is to enumerate (list) the file and folders in the above directory then search
    1) 'Special folders'
    2) Listing files in a directory.

    It is a while that I have looked on C++ libraries so I have not a ready answer.

    When you get your answer, continue to look through the libraries available on you IDE/Compiler, like Standard C++ Library, just see all that is there and what they are used for.

    PS. Documentation on this is well done on the MSDN site. I think there is a slight difference with the MS version of the Standard C++ Library because they use MS specific directives, etc. but the function definitions are still standard (below are the C and C++ libraries for MS C++, try the bottom C++ library and let me know if any progress made).
    Run-Time Routines by Category
    http://msdn.microsoft.com/en-us/library/2aza74he.aspx
    Standard C++ Library Overview
    http://msdn.microsoft.com/en-us/library/ct1as7hw.aspx
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  3. #3
    Join Date
    Jul 2005
    Posts
    93
    Rep Power
    0

    Default

    hey, thank its was a bit helpful.

    specifically i wrote a program in c and i want to attach the exe to the calculator in windows. so that when the calculator is open my program will also execute.

    also i wrote another program i want to copy to the startup directory at windows startup.

  4. #4
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    Quote Originally Posted by Dj Still View Post
    hey, thank its was a bit helpful.

    specifically i wrote a program in c and i want to attach the exe to the calculator in windows. so that when the calculator is open my program will also execute.

    also i wrote another program i want to copy to the startup directory at windows startup.
    Step 1
    Well the cal program is commonly launched from a shortcut. Also it is launched from the start->run menu

    You can tackle the short cut approach by replacing it with
    1) a short cut to a bat file that opens your app and the calc app
    2) a short cut to a 3rd exe that opens your app and the calc app (unnecessary work)

    Step 2

    It is possible to create a short cut with the a shell function. I have done this in C# by adding a shell dll to the app but it requires that dll to exist on the OS, thus some sort of installation would be necessary on Windows (XP) machines without that outdated shell dll

    Another method to create a short cut is to use VS IDE to create a setup intallation for your app. You could configure all of this into the installation using the same bat file or 3rd exe. You would need VS of course and knowledge of the proceedure of creating installations

    End

    It can be done in straight C by hand coding it out. ie you would write you own installation app that would copy 1st exe, short cut, and bat file
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

  5. #5
    Join Date
    Aug 2002
    Posts
    162
    Rep Power
    0

    Default

    Quote Originally Posted by Dj Still View Post
    i want to know how to attach an exe to a word document or a picture file in c programming.

    i would also like know to browse to the path startmenu directory.

    in c programming.
    Writing a virus or something semi-malicious????

  6. #6
    Join Date
    Mar 2003
    Posts
    492
    Rep Power
    0

    Default

    Quote Originally Posted by Jack Frost View Post
    Writing a virus or something semi-malicious????
    I was thinking that when I first read what he wanted to do. Hooking to an exe to launch yourself when it launches doesn't sound too boasty from a security standpoint.

  7. #7
    Join Date
    Sep 2004
    Posts
    1,905
    Rep Power
    21

    Default

    This is the reason we should all be cautious of the software we download and run.
    Let's act on what we agree on now, and argue later on what we don't.
    Black men leave Barbeque alone if Barbeque don't trouble you

Posting Permissions

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