|
How to give administrator rights to my mfc application without manifest file
|
|
|
|
|
You can specify to "run as administrator" in the shortcut that points to the program.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Thanks for your valuable information but i would like to ask admin rights to my application programatically while run by the user.
|
|
|
|
|
You cannot set administration rights within a program, it must be set externally by the manifest, or by the user at startup. There would be no point in having a security framework if it was possible.
|
|
|
|
|
Inorder to prevent the theme from modifying my application i have disabled the manifest file the admin rights is found in the manifest file.what should i do to prevent my application being modified by theme without disabling manifest.Your suggestion would help me a lot.
|
|
|
|
|
|
I've got a relatively large project (400K lines) that was developed in Embedded Visual C++. For all intensive purposes, you can consider EVC++ pretty close to VS6. We're migrating to a new OS that requires the use of at least VS2008. Needless to say, the much older compiler allowed us to commit a multitude of sins that the new compiler tosses it's cookies on.
I'm pretty sure I could pragma myself to death, but that's "cheating". I'd like to lift the code to a more modern state. Does anyone know of any tools or approaches that can be applied to a set of code that would do most of the heavy lifting? For example, the older compiler allowed methods with no return type. Most of these will be void returns, but at something like 8K errors, it's going to be a lot of $hit shoveling.
Appreciate any ideas.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Set the compiler to report Level 4 warnings.
Compile, Fix the issues manually, Compile, the issues manually, ... ,
Make certain it works.
After, if you have time (and money, as time==money), then you can start to "lift" the code to a more modern state.
Other than that, good luck.
I'd rather be phishing!
|
|
|
|
|
yeah, that's what we're looking at... reaching for shovel.
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
been there, done that.
The hard part is actually not doing refactoring while doing the updgrade and cleaning compilation warnings
I'd rather be phishing!
|
|
|
|
|
Agree. Somewhen switched the "treat warnings as errors" property in C# projects on. A lot of problems showed up, and you find so much more bad code waiting for refactoring...
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
i'm not familiar with findfirst stuff.
Can you please elaborate?
I was trying to use boost libs.
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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 ==========
|
|
|
|
|
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
|
|
|
|
|
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\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(21): error C2065: 'data' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(21): 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(22): error C2065: 'cout' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(22): error C2065: 'endl' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(24): error C2065: 'h' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(24): error C2065: 'data' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(24): error C3861: 'FindNextFile': identifier not found
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(27): error C2065: 'cout' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(27): error C2065: 'endl' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(29): error C2065: 'h' : undeclared identifier
1>c:\users\shrey\documents\visual studio 2010\projects\cfgdump\cfgdump\test2.cpp(29): error C3861: 'FindClose': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
|
|
|
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
|
|
|
|
|
Hello,
I've implemented a simple SDI program with MFC and a tab control used to select a child window from a set of 3 dialogs.
I followed the instructions at this link:
http://www.codersource.net/2010/01/30/ctabctrl/
Everything works if I put the handler of TCN_SELCHANGE in the view class.
Instead If i put the handler in the CTabCtrl derived class of my tab control the handler is never called when I push tabs and the tab control doesn't work
Can anyone explain me the reason?
|
|
|
|
|
Hi guys!,
I'm developing an application using a library in VC++ 2010. I don't have previous experience in GUI programming. So I'm wondering how to begin with on my existing project.
It's an tracking experiment where I need to set various parameters initially for the specific task in GUI.
Once I set all parameters, GUI have to create a file containing all those parameters and have to pass to the project.
It would be of great help if you could give feedback,
Thanks!
|
|
|
|