I have see Teracopy and CopyHandler, intercept the copy by overwrite copy handler.
But in my case, that's wakeup the UAC.
The code used: https://github.com/alphaonex86/Ultracopier/blob/master/plugins/PluginLoader/catchcopy-v0002/pluginLoader.cpp
into PluginLoader::RegisterShellExtDll()
The other seam have the same. Mainly I use regsvr32 my_dll.dll to load into the explorer.
Some body have tip to not open the UAC?
Thanks.
Related
I have made a Preview Handler for Windows so in the preview panel in Windows Explorer I can see whatever I want for a given file.
I used code from:
http://www.uweraabe.de/Blog/2011/06/01/windows-7-previews-the-delphi-way/
It works great, but there's one problem- when I try to save a file I get access denied.
I tried saving using TFileStream and TStringList to both my desktop and even C:\ and I registered my DLL as administrator. I used ShellExecute to run another exe to save file in that exe but same thing- access denied.
How can I save a file from Windows Preview Handler?
I create a shell extension (DLL) that work properly, But when using the Uninstaller to remove the program that DLL not removed becuase it opened by Windows Explorer & i must use TaskManager to first close Explorer.exe then run it again and delete manualy that file (Shell Extenstion Dll),
Now my qustion is, How to delete Shell Extestion files in the Uninstaller script? I use Nullsoft Scriptable Install System 2.46 (NSIS) to create Setup program.
There is no good way to uninstall shell extensions on Windows.
Your best option is to try to delete the .dll and fall back to a reboot: Delete /RebootOK "$InstDir\MyExt.dll".
Another alternative is to try to move the .dll to %temp%. This will not unload the extension but it will allow you to delete everything else and the extension will not load the next time the user logs in. (This will only work if it is on the same volume as %temp%?)
It is important to remember that any application that uses the Open/Save common dialog or internally uses SHGetFileInfo(), IShellFolder or IShellItem could have loaded your extension so just killing Explorer might not be enough.
I am attempting to open a .MSI installer package file to modify it. Whenever I try to open it, it opens in read-only mode. I see this with Orca, with InstEd, or when opening the file directly via code:
`MsiOpenDatabase()` (ERROR_OPEN_FAILED with MSIDBOPEN_DIRECT or
MSIDBOPEN_TRANSACT persistence modes).
The file itself does not have the read-only attribute set (in fact, has no attributes set)
I am using an account with Administrators group access
As far as I can tell, no other process has the file open
No installs are in progress or suspended
I can copy the file to another location, and open it read/write there. But the original, I cannot touch
Thanks in advance for your help.
My guess is that this is caused by one of the following factors:
Custom NTFS access rights - defined for the file in its security descriptor
The file might be "blocked" - marked with a special flag after being downloaded via Internet Explorer.
The resolution for the latter is to right click the file and select properties and click the unblock button at the bottom of the property page and pressing OK.
The resolution for custom NTFS rights are done in a similar way by going into the security
tab of the property page for the file, but it is easier just to copy and paste the file and use the fresh copy with the default security.
Found it.
#Glytzhkof, you almost had it but there's a detail I did not know about, and left out. This is a package that lies in a folder under "access protection" by my system's anti-virus program: a filesystem hook that blocks modification of critical system and AV files. Turn off access protection temporarily, and the file is wide open.
Fortunately, one of my teammates had some experience with this, and suggested I try it. Bingo.
Thanks, all.
What I have done to get it working was to create first a backup of the MSI file, and then open that backup. It worked for me
Try to close/kill processes that might interfere, for example:
Other running Install shield instances
Installshield updater
Installshield licensing service
Antivirus
In matlab, I used a windows standalone application. There is a line in this application that writes a file in C:\...\...\. When I run the output exe file produced from this windows standalone application, the exe doesn't write in C:\...\...\ neither tells me that there is a security issues in that partition. All the execution does is nothing. But, when I right-click and run the exe as administrator, it runs correctly.
I want to do it without right-click and run as administrator. Are there is a command in matlab that can do that?
If you create a shortcut to your application, you can go to the Properties of the shortcut, click on Advanced in the Shortcut tab, and select "Run as administrator". That way, whenever you start the application from the shortcut it will be run as an administrator.
(Disclaimer: applications really shouldn't "foul their own nest" by writing into Program Files. This is bad design.)
Starting from Vista, unprivileged processes are not allowed to write to protected folders such as Program Files, because Program Files is designed to store code and not data. However, since this limitation has not been enforced in XP, MS has provided a backward-compatibility hack in the form of Virtual Store. Now, when a program tries to write to protected folder, its output is being redirected into a dedicated folder. This way, the program still "thinks" it writes to its usual location, while in fact it writes to an unprotected location. However, when you later check the Program Files location, you might not see the file - because it's not really there.
You can find more details here: User Account Control Data Redirection.
If you are administrator, add full control permission for your username to the destination folder. You do that by right clicking on the folder, going to properties and then security tab. Then edit and add you username with Full Control rights. Then you don;t have to run the the program as an administrator.
There is no way you can elevate a process once it is started, so Matlab cannot possibly have a command for that. Just running Matlab elevated.
There is a windows explorer extension dll.
This dll can be update automatically if there is new one in our server.
I rename the origin dll and download the new dll.
But Windows Explorer never reload a new one.
So I kill the windows explorer and relaunch.
But this is looked very ugly.
And I don't want to recommend a user should reboot.
How can I tell Windows Explorer to reload a new one?
For those still looking for a quicker way, you can try and close all explorer.exe processes and restart one afterwards. This also updates all shell integrated dll's
DLLs are loaded by the program loader, so only at process boot time.
You can make a program that explicitely opens and uses a DLL, and add a command that will close it, reopen it, rebind everything. But you need support of the program for that, so you would need Explorer to support it, or to change its code.
So, with 99% certitude, you can't do what you want without restarting windows explorer. At all.