How to create file in system folder when UAC feature is enable in Vista?
-
Hello, My product needs admin rights to work. On vista, if user uses UAC feature, then my product is not working. My product is on VC++ platform. I tried adding some manifest to the exe specifying access rights. But i was not able to fix. Secondly, i need to create the file(s) in C:\Windows\system32\.Is there any API which does it on Vista. Please help me in fixing this behavior on vista, so that the same application should work from windows 95 to windows vista without allowing the end user to do anything. Ashish Ashish
-
Hello, My product needs admin rights to work. On vista, if user uses UAC feature, then my product is not working. My product is on VC++ platform. I tried adding some manifest to the exe specifying access rights. But i was not able to fix. Secondly, i need to create the file(s) in C:\Windows\system32\.Is there any API which does it on Vista. Please help me in fixing this behavior on vista, so that the same application should work from windows 95 to windows vista without allowing the end user to do anything. Ashish Ashish
-
My Product needs it for security purpose Ashish
-
My Product needs it for security purpose Ashish
Then you need to re-write it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
My Product needs it for security purpose Ashish
-
That's not an answer. Unless you have a really, really, good reason to be writing something to a system folder, you shouldn't be doing it. The correct solution to your problem is to write somewhere else.
Ya i do have a very good reason to write into the system folder and registry of Vista. The product is in the market from last 20 yrs.At the time of activation(License)it creates some file into system folder and registers it.Every time the product get started, it checks for the licensed file(which happens to be in system folder).Even i cannot write somewhere else. I tried using manifest file.
-
Ya i do have a very good reason to write into the system folder and registry of Vista. The product is in the market from last 20 yrs.At the time of activation(License)it creates some file into system folder and registers it.Every time the product get started, it checks for the licensed file(which happens to be in system folder).Even i cannot write somewhere else. I tried using manifest file.
That's not a good reason, it's a stupid reason. All it tells me is that part of your app has been stupid for the last twenty years. Tell whoever you need to that it is stupid, and move the folder into a user-writeable application specific area like it should always have been.
-
That's not a good reason, it's a stupid reason. All it tells me is that part of your app has been stupid for the last twenty years. Tell whoever you need to that it is stupid, and move the folder into a user-writeable application specific area like it should always have been.
Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.
-
Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.
You're welcome to ignore my comments. However, this is a site that encourages best practice. Best practice is to move the folder. This is not an entire application redesign, unless the application is exceedingly badly written. Putting things in system folders or in the registry is not security. If you need to secure what's there, encrypt it.
-
Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.
People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer. They've been writing best practice guides and logo certification requirements trying to persuade developers to write applications that will run as normal users since at least the win2k era. After so long though, it becomes clear that asking nicely just isn't going to work and out comes the warclub. ***SPLAT***
-- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
-
Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.
I'll answer your question. You 'really' should move the location of the file, but to get around it you can use a manifest file to elevate your app and then it should work. regards,
Jonathan Wilkes Darka[Xanya.net]
-
I'll answer your question. You 'really' should move the location of the file, but to get around it you can use a manifest file to elevate your app and then it should work. regards,
Jonathan Wilkes Darka[Xanya.net]
Thankx for the answer. I tried using manifest file to elevate my application but unable to fix it. My application uses unmanaged C++ and visual studio 2003 as tool.Is manifest file applicable for unmanaged C++ application? Here is the manifest code.
-
Thankx for the answer. I tried using manifest file to elevate my application but unable to fix it. My application uses unmanaged C++ and visual studio 2003 as tool.Is manifest file applicable for unmanaged C++ application? Here is the manifest code.
Unfortunately I cannot see much of your manifest file, problems with < > and HTML I suspect :-) Here is mine;
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyExe.exe"
type="win32"/>
<description>MyExe Description</description><!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>regards,
Jonathan Wilkes Darka[Xanya.net]
-
Unfortunately I cannot see much of your manifest file, problems with < > and HTML I suspect :-) Here is mine;
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="MyExe.exe"
type="win32"/>
<description>MyExe Description</description><!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="requireAdministrator"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>regards,
Jonathan Wilkes Darka[Xanya.net]
Thankx Jonathan.It works fine. Currently i have to put the "myexe.exe.manifest" file along with my application exe.Is it possible to embedd into the resource file?
-
People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer. They've been writing best practice guides and logo certification requirements trying to persuade developers to write applications that will run as normal users since at least the win2k era. After so long though, it becomes clear that asking nicely just isn't going to work and out comes the warclub. ***SPLAT***
-- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.
dan neely wrote:
People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer.
When you say politely people don't listen. Unless M$ brandished out a whip called UAC, they could not come to terms. Now they are thinking of unlearning their bad habits and laziness (inertia). :mad:
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Thankx Jonathan.It works fine. Currently i have to put the "myexe.exe.manifest" file along with my application exe.Is it possible to embedd into the resource file?
Glad to help, if you want to embed the manifest in your application then open your resource file e.g.
myapp.rc
in a text editor and add the following: For an executable/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "MyApp.exe.manifest"and for a DLL or control panel applet
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//2 RT_MANIFEST "MyApp.dll.manifest"
regards,
Jonathan Wilkes Darka[Xanya.net]
-
Glad to help, if you want to embed the manifest in your application then open your resource file e.g.
myapp.rc
in a text editor and add the following: For an executable/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "MyApp.exe.manifest"and for a DLL or control panel applet
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//2 RT_MANIFEST "MyApp.dll.manifest"
regards,
Jonathan Wilkes Darka[Xanya.net]
Thanks Jonathan for your kind help. Thanks alot.
-
Glad to help, if you want to embed the manifest in your application then open your resource file e.g.
myapp.rc
in a text editor and add the following: For an executable/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "MyApp.exe.manifest"and for a DLL or control panel applet
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//2 RT_MANIFEST "MyApp.dll.manifest"
regards,
Jonathan Wilkes Darka[Xanya.net]
Hi Jonathan, For my appl executable i have inclued the above line (RT_MANIFEST into the myexe.rc)and it worked for the console based application.But for the GUI app. it is not working.Do i need to edit into the manifest file or need to create separate manifest(MyApp.dll.manifest) file for it.
-
Hi Jonathan, For my appl executable i have inclued the above line (RT_MANIFEST into the myexe.rc)and it worked for the console based application.But for the GUI app. it is not working.Do i need to edit into the manifest file or need to create separate manifest(MyApp.dll.manifest) file for it.
Each exe and dll should have their own manifest, you should not need to modify the manifest (except maybe the description). Just embed it into both apps, if both are executables then use the first example I gave, else if they are DLL's then use the second. It should work fine for the GUI app too, in Vista when the executable is recognised as having a manifest file (by explorer for example) then the elevated shield icon will be overlayed on your aplications icon. If your apps icon does not have an overlay of the shield then Vista does not recognise the manifest, you may need to clear the explorer icon cache before it sees it. To do this kill (using task manager) ALL instances of explorer.exe, then start a new instance. regards,
Jonathan Wilkes Darka[Xanya.net]