Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. c++ in visual express 2010

c++ in visual express 2010

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++question
12 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11700611
    wrote on last edited by
    #1

    Can anyone help me in developing a small application? I'm stuck in the module in which I need to search the whole drive for the installation of a .exe file.

    D 1 Reply Last reply
    0
    • U User 11700611

      Can anyone help me in developing a small application? I'm stuck in the module in which I need to search the whole drive for the installation of a .exe file.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Are you familiar with the _findfirst()/_findnext() pair?

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      U 3 Replies Last reply
      0
      • D David Crow

        Are you familiar with the _findfirst()/_findnext() pair?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        U Offline
        U Offline
        User 11700611
        wrote on last edited by
        #3

        i'm not familiar with findfirst stuff. Can you please elaborate? I was trying to use boost libs.

        D 1 Reply Last reply
        0
        • U User 11700611

          i'm not familiar with findfirst stuff. Can you please elaborate? I was trying to use boost libs.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          See here. Examples on the Net and here at CP are almost limitless. If you are looking specifically for "installed" programs (rather than just any and all exe files), you could use WMI with the Win32_Product class. It's a tad more code, however, with all of the COM involved.

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          U 1 Reply Last reply
          0
          • D David Crow

            See here. Examples on the Net and here at CP are almost limitless. If you are looking specifically for "installed" programs (rather than just any and all exe files), you could use WMI with the Win32_Product class. It's a tad more code, however, with all of the COM involved.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            U Offline
            U Offline
            User 11700611
            wrote on last edited by
            #5

            no, I'm don't want to use pre-developed apps. btw, I'm trying to dev the following, but till now no success. small utility - no GUI. cfgdump.exe 1) needs to search drive and find where an exe has been installed (customer can install it in multiple places). 2) goes to directory and confirms existence of some files. 3) runs some commands through a spawned process 4) the commands from item 3 will produce a file. 5) you will need to zip up the contents of the file using https://code.google.com/p/miniz/ library 6) Ask the user for a password 7) encrypt the file using http://www.cryptopp.com/ library File needs to be statically linked and highly portable.

            D 1 Reply Last reply
            0
            • U User 11700611

              no, I'm don't want to use pre-developed apps. btw, I'm trying to dev the following, but till now no success. small utility - no GUI. cfgdump.exe 1) needs to search drive and find where an exe has been installed (customer can install it in multiple places). 2) goes to directory and confirms existence of some files. 3) runs some commands through a spawned process 4) the commands from item 3 will produce a file. 5) you will need to zip up the contents of the file using https://code.google.com/p/miniz/ library 6) Ask the user for a password 7) encrypt the file using http://www.cryptopp.com/ library File needs to be statically linked and highly portable.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Member 11735037 wrote:

              1. needs to search drive and find where an exe has been installed (customer can install it in multiple places).

              So you are looking specifically for "installed" programs, yes? Of the eight steps you mention, what do you have done? You've at least started, haven't you? I shared an example for iterating files and folders here. It does not do anything useful, so you'll need to fill in the blanks with your specifics.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              1 Reply Last reply
              0
              • D David Crow

                Are you familiar with the _findfirst()/_findnext() pair?

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                U Offline
                U Offline
                User 11700611
                wrote on last edited by
                #7

                I'm getting more and more confused. From the morning, I'm reading about boost libraries and then something else. I haven't started coding yet. But, I do want to start as soon as possible.

                D 1 Reply Last reply
                0
                • U User 11700611

                  I'm getting more and more confused. From the morning, I'm reading about boost libraries and then something else. I haven't started coding yet. But, I do want to start as soon as possible.

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  Member 11735037 wrote:

                  From the morning, I'm reading about boost libraries...

                  So I assume you saw this? It's not an isolated example.

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                  U 1 Reply Last reply
                  0
                  • D David Crow

                    Are you familiar with the _findfirst()/_findnext() pair?

                    "One man's wage rise is another man's price increase." - Harold Wilson

                    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                    U Offline
                    U Offline
                    User 11700611
                    wrote on last edited by
                    #9

                    when I compiled that, there are hell lot more errors than one can expect. 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(7): error C2059: syntax error : '(' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2065: 'WIN32_FIND_DATA' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2146: syntax error : missing ';' before identifier 'data' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'HANDLE' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2146: syntax error : missing ';' before identifier 'h' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'h' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C3861: 'FindFirstFile': identifier not found 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(13): error C2065: 'h' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(13): error C2065: 'INVALID_HANDLE_VALUE' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(17): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(17): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(18): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(18): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(19): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(19): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\vi

                    D 1 Reply Last reply
                    0
                    • D David Crow

                      Member 11735037 wrote:

                      From the morning, I'm reading about boost libraries...

                      So I assume you saw this? It's not an isolated example.

                      "One man's wage rise is another man's price increase." - Harold Wilson

                      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                      U Offline
                      U Offline
                      User 11700611
                      wrote on last edited by
                      #10

                      now there is only one error....

                      1>------ Build started: Project: cfgdump, Configuration: Debug Win32 ------
                      1>LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_58.lib'
                      ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

                      D 1 Reply Last reply
                      0
                      • U User 11700611

                        now there is only one error....

                        1>------ Build started: Project: cfgdump, Configuration: Debug Win32 ------
                        1>LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_58.lib'
                        ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #11

                        Does libboost_filesystem-vc100-mt-gd-1_58.lib exist on your machine?

                        "One man's wage rise is another man's price increase." - Harold Wilson

                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                        1 Reply Last reply
                        0
                        • U User 11700611

                          when I compiled that, there are hell lot more errors than one can expect. 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(7): error C2059: syntax error : '(' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2065: 'WIN32_FIND_DATA' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2146: syntax error : missing ';' before identifier 'data' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(10): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'HANDLE' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2146: syntax error : missing ';' before identifier 'h' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'h' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(11): error C3861: 'FindFirstFile': identifier not found 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(13): error C2065: 'h' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(13): error C2065: 'INVALID_HANDLE_VALUE' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(17): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(17): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(18): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(18): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(19): error C2065: 'data' : undeclared identifier 1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(19): error C2228: left of '.cFileName' must have class/struct/union 1> type is ''unknown-type'' 1>c:\users\shrey\documents\vi

                          D Offline
                          D Offline
                          David Crow
                          wrote on last edited by
                          #12

                          Did you include the windows.h and iostream header files? Did you remember to use the std namespace?

                          "One man's wage rise is another man's price increase." - Harold Wilson

                          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups