Let me make an executable (Borland C ++ Builder 6) instead of a batch file for Windows 7 Because, not allowed ordinary users (non-administrator) to allow required batch run, we have several different Windows 7 machines, some 64 bit and some 32, etc. The problem I'm running in is "coded files" directory is hard coded in the program, but it is not always true, the program file directory, which leads to some errors on some machines.
I am familiar with the method of taking the program file diary from the registry, but I'm afraid that it will not work on all machines because the program does not allow access to the registry due to permission settings. I am searching high and low for functions like GetWindowsDirectory , but it has no advantage. Does anyone have any suggestions? EDIT: I have programmed it on Win XP on Win7 (there is no way to change or prevent XP / 7 stuff, as it may be crappy). This is a simple utility, which does not require installation; It's just kept in a file, it only needs to go out and find some program files to find the program files. This is all about the deployment problem before you There is no other easy treatment to try to bypass the UAC. You must embed a manifest in the executable to ask for administrator privileges. The user gets the UAC prompt so that he knows that you are going to hack the private parts. This is not clear how to do this with such an old device, you probably have to embed it in the .rc file. Or use a MANIFEST file. c: \ program files on 64-bit machines (X86) to copy / install your program. You can just use c: \ program files in your code, Windows redirects it to (x86) directory.
Comments
Post a Comment