How to detect unnecessary Windows\Installer file [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
i have search a lot to find out How to detect unnecessary Windows\Installer file !
I am sure lot of you have faced this issue previously and solve it somehow.
Now when i look at my ---
C:\Windows\Installer
directory on Windows Server 2008 R2 i can see it took already 42 GB out if total 126 GB.
Now what i would like to know can i just delete all the files from that Installer directory or i have to detect which file can be removed !
Do anyone knows any solution for this issue !

How do you define unnecessary?
Specialized system case: You want the minimum footprint and are willing to sacrifice functionality that you don't expect to use.
If all is well, each the files in C:\Windows\Installer are a local cache of an installed Windows Installer package, patch, transform, etc. They are necessary for uninstallation, auto-repair or on-demand installation to succeed. If you will never need any of those things on these machines (i.e. if you are bringing them up on demand as VMs, and would rebuild them rather than uninstall something), then unless the app itself invokes Windows Installer APIs itself, it may be relatively safe to remove files from C:\Windows\Installer. In addition, you could call the Windows Installer API MsiSourceListEnum to find other caches of files that are used for these same purposes. It may be similarly safe (or unsafe) to remove those files.
More usual case: You'd rather not rebuild the system
If you suspect there are unreferenced files in that folder left over from prior upgrades or uninstallations, you can try to use Windows Intstaller API calls to verify this. At a very low level, you can call MsiEnumProducts (or possibly MsiEnumProductsEx) to find the product codes of all installed products, and MsiGetProductInfo/Ex(szProduct, INSTALLPROPERTY_LOCALPACKAGE, ...) to find its cached .msi file and INSTALLPROPERTY_TRANSFORMS for a list of its transforms. Then MsiEnumPatches/Ex to find all patch codes and MsiGetPatchInfo/Ex (again with INSTALLPROPERTY_LOCALPACKAGE and/or INSTALLPROPERTY_TRANSFORMS) to list the .msp and .mst files it references. In theory, the full set of all files referenced here should match up with the full set of files in C:\Windows\Installer. (Or there are more references to look for...)
(Before you write anything to do this, consider that there are probably apps out there that automate this, or are even smarter about it, such as the one referenced in another answer.)

You could not delete them all.
There is a good answer about your problem, I test in my lab. It works for me.
Notes: If possible, you had better copy this folder to anther disk (such as E:)

Related

My vim directory is in a weird place, should it be moved? [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 months ago.
Improve this question
So I wanted to set up my new PC and vim was one of the first things.
I need my .vim directory for that. I have vim and it works, too.
I found the indent folder at /usr/share/vim/vim90/indent. This seems to be the correct folder but I have no idea if this is the correct location. The .vimrc i created at ~/.vimrc.
There are as far as I could find two possible "proper" places for .vim, which is ~/.vim and /etc/vim. It is in neither.
What should be the next step to properly use vim? Should I leave it there? Should I create .vim in my home dir and move it there? Does it literally not matter and I am confusing over nothing?
Thanks for any help!
/usr/share/vim/vim90/ is the system-wide "runtime directory". What is in there shouldn't be messed with because…
it needs to be in a certain state for Vim to work as expected,
whatever you do there might be overridden or left behind during later upgrade,
other users might be negatively impacted by your changes.
The first reason is sad, but yeah, Vim is a fragile beast, the working of which can be compromised very easily by moving stuff around, renaming files or whatnot.
The second reason is, I think, easy to demonstrate: when 9.1 is released, it will ignore /usr/share/vim/vim90/ entirely, and thus whatever changes you might have done there.
The third reason might seem more abstract because you are probably the only actual person to use that particular computer, but Unix-like systems are multi-user by design and, in that context, keeping your changes in your own $HOME is just common sense.
Vim is highly configurable and offers many ways to craft the perfect personal environment… or shoot yourself in the foot so, for now, you should do your configuration in your own $HOME as it is simple and predictable:
create a .vim directory under $HOME, $HOME/.vim,
create a .vimrc file under $HOME, $HOME/.vimrc,
and forget that /usr/share/vim/vim90/ ever existed.

Make deleted files unrecoverable [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I'm cleaning a machine with Windows 7 that I use that will be reassigned to another co-worker, and I would like to clear all the deleted files so they can be unrecoverable.
I tried using cipher w:f:\, then I installed Recuva and I still can see a lot of files that can be recovered.
Then I created a little program that creates a file with 0's that has the size of the free space on disk (after creating the file, I can see on Windows Explorer that the disk has like 100kb of free space only).
Then I delete the file and I run Recuva, and again I can see all those files as recoverable.
I'm just curious about what's happening under the hood. If I leave like 100Kb of free space in the disk, then why are there more than 100k of recoverable files still?
To make files unrecoverable, you need to use a "digital file shredder" application. This will write a series of zeroes and ones to the file to be shredded, multiple times. While 3 passes seems sufficient for many users, the US government has set a standard of 7 passes to meet most of its security needs.
There are several free file shredder applications, and even more commercial file shredder tools. Some security suite software (such as Antivirus with personal security protection tools) may also provide a file shredder.
For recommendations on digital file shredder applications, please ask for Windows digital file shredder recommendations at https://softwarerecs.stackexchange.com/
As for why "deleted" files are still listed by recovery tools as "recoverable", when a file is deleted, all that normally happens is a flag is set in the master file index maintained by the file system. The raw data of the file is left on the hard disk as "noise/garbage". If no other files are written into the area occupied by the deleted file, then it is trivial to recover the data. If other data has been overwritten on it, it becomes a non-trivial, but still possible, exercise to recover the data as it was before it was overwritten. Large scale recovery vendors are capable of recovering a file even if it has been overwritten a few tiles. This is why the "security" standards of the US government call for the file area to be overwritten 7 times, as only the most serious (and expensive) recovery operation can recover that data.
To make a file "disappear", the master file index also needs to have the information "erased" and overwritten ("shredding" the file's meta-data to be hidden and very hard to recover).
If you are interested in the details and how to more permanently hide or delete a file, you might want to consider asking at https://security.stackexchange.com/ about how the windows 7 file system works, and what it takes to truly delete or make a file sufficiently overridden to make it impractical to recover.

Free SCM for Matlab 64 bit version on Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
When Matlab is installed in its 64 bit version, it can use only 64 bit source control systems. Is there a source control system that's free, works with 64 bit Matlab and runs on Windows?
It can be a system that supports only one developer. It can be 32 bit itself, if it'll work. It will be installed on the same machine as the Matlab in use, which is a Win7 Ultimate x64 machine.
I'd recommend mercurial using the TortoiseHg interface. There is a 64bit windows version available for download. It includes a set of windows shell extentions so it works nicely from the explorer window.
It's easy to set up and use and it's saved me on numerous occasions. Mercurial works well with binary files so MATLAB mat files and fig files can all be placed in version control. I'd say it's essential i you're using guide. In developing GUI's with guide there have been occasions where guide has crashed and was unable to reopen the fig file again. Fortunately a quick roll back in Mercurial to the last previous working version and I was back working again.
To be honest I've never really been that impressed with MATLAB's integration with SCM, it just seems to be a tacked on option rather than integrated. Something like NetBeans shows how you can integrate SCM in the development environment. So I wouldn't try to get MATLAB "to use" SCM rather just use Mercurial (or whatever you choose) alongside MATLAB.
Oh and it's free as well.
I've been using git to track my matlab code and it's been very useful. If you do go this route, make a .gitignore file and put the following in it
*.asv
*.fig
*.mat
The reason for the first one is that you don't want to archive your autogenerated backups. Since .mat and .fig files can be large and are generally generated by your code, I don't archive them either. One exception is gui figs; I create a gui directory and put a new .gitignore file in it with
!*.fig
which tells git not to ignore .fig files in that directory
For SVN, I have written a Matlab-GUI for committing (and checking differences in) code for when I'm too lazy to launch another application to commit my changes (or for when there is no nice, free client, like on OS X).
You could do something similar for any other version control system, and then you don't need to worry about whether Matlab supports it.
You might be interested in using Subversion or Git, which are tried-and-true, general-purpose SCMs.

Can you recommend a good SSH syncing utility? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Can you recommend a good SSH file sync utility for Windows? For example, I have some C++ sources that I need to compile remotely. I need this utility to be simple and most of all responsive, so I can compile my sources instantly after saving, without having to wait for the sync to be triggered.
WinSCP supports synchronization from both gui and command line.
Use rsync. See this. There is even an instruction to set automatic backup.
for source-code, you could use something like git or subversion, paired with an ssh-connection using port-forwarding.
in all cases you would need to trigger the sync yourself except you have a tool that watches the directory you're working on.
try this, SSHSync for windows
http://code.google.com/p/sshsync/
A command line applications that allows intelligent Secure FTP transmissions. SshSync only support pull type transfers, but it allows use of a Private Key to ensure that authentication is secure. A text file that contains a list of files always processed is used to check that only 'new' files are retrieved.
Sounds like a job for a Continuous Integration tool.
install cygwin and use rsync over ssh.
It seems to me that one way to solve your problem would be to simply use a network drive. Edit your files from the network drive, and whenever you save, any other systems connected to that drive can also access your changes, including your build server. That's what we do at my office — everyone's home directories are on NFS/CIFS shares, so we edit on our local computers, but run a script to trigger a build on any of several build servers, even multiple platforms at once. We don't have to sync anything before being allowed to compile our latest changes.

How would you programmatically test a file for viruses? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to programmatically test a file for viruses.
I'm aware of this thread, which didn't get a satisfactory answer in my opinion, but I'm not looking for an API here. Any kind of workaround to make it possible to test a file would be fine.
Of course, an API would probably be the best solution (I'm using .net on a Windows platform), but maybe it's possible to drop the file in the folder, and to then check whether I can still open it or if it's been quarantined by the antivirus software.
Has someone run into the same sort of situation?
Assuming you wish to integrate with whatever antivirus is already present on the system rather than bundling your own, you should check out the way Firefox 3 does this.
Bugs 103487
and 408153
- Inform anti-virus software when Firefox downloads an executable (using
the Windows "IOfficeAntiVirus" and
"IAttachmentExecute" APIs).
(of course if you wish to bundle your own, check out ClamAV/ClamWin, but then you must deal with updates, etc, and you should probably first check there is not a fully updated solution on the target system for politeness)
Windows? No problem. Check out ClamWin. It is based on ClamAV.
Platform?
Most Windows anti-virus provide shell integration (right click on a file in explorer to scan that file), which will either mean running an executable, DDE or COM. All of which provide an entry point to another program to call the same mechanism.
Check out ClamAV.
Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail gateways.
Maybe you could use this web service, assuming the file is less than 1MB:
http://www.kaspersky.com/scanforvirus
If you discover a suspicious file on
your machine, or suspect that a
program you downloaded from the
Internet might be malicious, you can
check the files here.
Indicate the file to be checked; it
will automatically be uploaded from
your computer to a dedicated server,
where it will be scanned using
Kaspersky Anti-Virus. Multiple
independent tests and publications
acknowledge the solution to have
exceptional detection rates. Updates
every three hours ensure that even the
very newest viruses can be detected.
Only one file of up to 1 MB can be
checked at any one time. If the file
is too large, a window with an error
message will be displayed. Type the
name of the file in the window at the
top of this page, or find the file
using 'Browse'. Then click on
'Submit'.
You can use a Debugger or a Disassembler
It really depends on which AV program you're going to use. Read the documentation for whatever solution you choose and you'll probably find a command-line interface or some other API you can call. There's no "generic" way of doing this (across AVs).

Resources