Click here to Skip to main content
16,011,849 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Smart Pointers Pin
Mark Salsbery30-Mar-08 14:53
Mark Salsbery30-Mar-08 14:53 
GeneralRe: Smart Pointers Pin
Richard Andrew x6430-Mar-08 14:58
professionalRichard Andrew x6430-Mar-08 14:58 
GeneralRe: Smart Pointers Pin
Rajkumar R30-Mar-08 19:40
Rajkumar R30-Mar-08 19:40 
GeneralRe: Smart Pointers Pin
cmk30-Mar-08 18:27
cmk30-Mar-08 18:27 
GeneralRe: Smart Pointers Pin
Chris Losinger31-Mar-08 1:42
professionalChris Losinger31-Mar-08 1:42 
Questionunique ID for each computer Pin
Joseph Marzbani30-Mar-08 9:54
Joseph Marzbani30-Mar-08 9:54 
GeneralRe: unique ID for each computer Pin
Richard Andrew x6430-Mar-08 14:08
professionalRichard Andrew x6430-Mar-08 14:08 
QuestionGetting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
Simon130-Mar-08 4:40
Simon130-Mar-08 4:40 
Hello,

I am programming in MS VS c++.
In my application I want to get the information: Is my software is running "as administrator" or not.
On Windows Vista an administrator can be logged in, but it could be, that the application (my software) is not running "as administrator".
If the user starts a software "as administrator" so he has an other access to files, like ini- or txt-files.

Background of my question:
--------------------------
My software application is installed in the folder "c:\Program Files\myapplication\myApp.exe"
In this folder I store some configurations in the file "myconfig.ini".
If I want to change some entries in the ini-File (with myApp.exe), so under Windows Vista the changed file will be saved in the following folder:
C:\Users\...\AppData\Local\VirtualStore\Program Files\myapplication\myconfig.ini

But if the software "myApp.exe" is running "as administrator", so the changed ini-file will be stored in the original folder "c:\Program Files\myapplication\myconfig.ini".

So how I can to get the information (during run time): is myApp.exe is running as administartor or not? I need this information, because I want inform the user that the changed confiuration file will not be stored in the original installed folder, but in an another virtualstore-folder, if the software is not running as administartor.

Does somebody has a solution for this problem?
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
Randor 30-Mar-08 7:46
professional Randor 30-Mar-08 7:46 
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
Simon130-Mar-08 11:40
Simon130-Mar-08 11:40 
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) [modified] Pin
Rajkumar R30-Mar-08 19:27
Rajkumar R30-Mar-08 19:27 
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
JudyL_MD31-Mar-08 4:38
JudyL_MD31-Mar-08 4:38 
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
Randor 31-Mar-08 4:53
professional Randor 31-Mar-08 4:53 
GeneralRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
JudyL_MD31-Mar-08 5:00
JudyL_MD31-Mar-08 5:00 
AnswerRe: Getting the information, if a softwrare is "running as administartor" (C++ / Windows Vista) Pin
graypx24-Jun-08 6:12
graypx24-Jun-08 6:12 
GeneralSTA component call MTA component Pin
George_George30-Mar-08 3:38
George_George30-Mar-08 3:38 
Generalgetting pixel(s) directly from the screen Pin
shja8830-Mar-08 3:26
shja8830-Mar-08 3:26 
GeneralRe: getting pixel(s) directly from the screen Pin
CPallini30-Mar-08 3:53
mveCPallini30-Mar-08 3:53 
GeneralRe: getting pixel(s) directly from the screen Pin
shja8830-Mar-08 4:13
shja8830-Mar-08 4:13 
QuestionRe: getting pixel(s) directly from the screen Pin
Hamid_RT7-Apr-08 2:31
Hamid_RT7-Apr-08 2:31 
Generalauto_ptr assignment compile error Pin
George_George30-Mar-08 0:51
George_George30-Mar-08 0:51 
GeneralRe: auto_ptr assignment compile error Pin
CPallini30-Mar-08 1:33
mveCPallini30-Mar-08 1:33 
GeneralRe: auto_ptr assignment compile error Pin
George_George30-Mar-08 2:38
George_George30-Mar-08 2:38 
GeneralRe: auto_ptr assignment compile error Pin
CPallini30-Mar-08 2:43
mveCPallini30-Mar-08 2:43 
GeneralRe: auto_ptr assignment compile error Pin
George_George30-Mar-08 2:49
George_George30-Mar-08 2:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.