Monday, August 21, 2017

How to make Windows 7 Explorer show files that live in %localappdata%VirtualStoreProgram Files?


I have an app that is writing a log file to its "Program Files" directory, like this:


C:\Program Files\SomeApp\blah.log

This is not my application, I have no control over how it runs or where it puts the log file.


Windows 7 file explorer does not show this file at all, even though I have selected "Show hidden files, folders, and drives" and deselected "Hide protected operating system files".


The file explorer does show the file if I navigate to:


C:\Users\svec\AppData\Local\VirtualStore\Program Files\SomeApp\blah.log

Apparently there's some mapping going on from "Program Files" to this VirtualStore directory.


The app's log file viewer can see the file in its "Open File" dialog in "C:\Program Files\SomeApp\", but it has a lock icon for the file.


How can I get Windows 7 File Explorer to let me see that file in "C:\Program Files\SomeApp\"?


Thanks!


Answer




How can I get Windows 7 File Explorer to let me see that file in "C:\Program Files\SomeApp\"?



You cannot, for one very simple reason: That's not where the file is. Only your badly-designed application thinks that it is there. Windows is trying to cope with the bad design of your application, and is relatively unobtrusively placing the file where it ought to be, in an application data directory.


This is not a Windows problem to be "worked around". This is Windows fixing up your application so that it actually works when used by non-administrators. This is an application problem, that you should be nagging your application vendor to fix. The people who designed your application mis-designed it in such a way that when the security hole of letting everyone have full access to the program image directory was closed, the application didn't work for non-administrators. Windows is trying to work around this mis-design for you, trying to make the application operate as it should have been designed to operate, rather than expecting to have administrator-level access to everything.


Don't re-open the massive security hole merely for the sake of getting Explorer to show you an application data file where it really isn't and should not be.


Sunday, August 20, 2017

windows 7 - Connection to Oracle database via Visual Studio Server Explorer crashes Visual Studio




I am trying to create an ADO.Net entity Data Model of an existing oracle 11g database, however I cannot even get past the step of Database Connection.



Every time I attempt to test the connection Visual Studio closes without any details as to the error. Just this screen



Error Image



I am using following:



Visual Studio 2010 Ultimate




.NET 4.0.3



Oracle 11g client



ODAC 11.2.0.3



Windows 7



Any help is appreciated. Thank you




EDIT :



This what I got from Event viewer of windows:



Faulting application name: devenv.exe, version: 10.0.40219.1, time stamp: 0x4d5f2a73



Faulting module name: oran11.dll, version: 11.2.0.1, time stamp: 0x4bb34692



Exception code: 0xc0000005




Fault offset: 0x0028deee



Faulting process id: 0x2020



Faulting application start time: 0x01cd5f6aa0a48f4f



Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe



Faulting module path: C:\app\User\product\11.2.0\client_2\bin\oran11.dll




Report Id: c2394ba8-cb5e-11e1-8347-005056c00008


Answer



This occurs when you install the ODAC into an existing Oracle Home.The OCI.DLL in your Oracle_Home was locked during the installation and was not overwritten.The OCI.DLL is now old and out of synch with the other DLLs, hence the crash.



The easiest solution is to simply reinstall into a new Oracle_Home (directory). If you must use the same Oracle_Home name and directory, you will still need to delete the now corrupted Oracle_home and then reinstall, using the following steps:




  • Use the installer to uninstall the entire oracle home that is
    crashing.

  • Look at the home in windows explorer. oci.dll should still be there.


  • Rename oci.dll to oci.toanything.

  • Reboot machine.

  • Go back to windows explorer and delete all remaining files in the
    oracle home, including oci.toanything.

  • Install ODAC.



Hope it helps.


Command-line Resource Monitor for Windows?


On Windows, there's a GUI "Task Manager", and there's also a great little command-line "tasklist.exe" which lets me see most of the same data but in text that's really easy to parse from a script.


Is there an analogous command-line tool for "Resource Monitor"? I'm looking for something that will list global CPU/disk/network/memory usage, and/or per-process usage.


Answer



I think you are looking for typeperf. It should work for:



  • Windows Server 2003 - 2016

  • Windows 10

  • Windows 7

  • Windows Vista

  • Windows XP


An example:


typeperf "\Processor(_Total)\% Processor Time"

will log the processor time until you hit Ctrl-C. Adding -sc 5 will report 5
instances:


typeperf -sc 5 "\Processor(_Total)\% Processor Time"

Here is example for disk activity, total bytes per second:


typeperf -si 2 "\LogicalDisk(_Total)\Disk Bytes/sec"

Windows Performance Monitor Disk Counters Explained


What's a good, light, unintrusive and free tool to monitor network/internet speed for the Mac?


I need to know how much internet activity is taking place on my iMac. I don't want something very detailed like Little Snitch or some professional network analysis tool. I'm looking at something simple that can simply upload/download speeds in the Mac OS Menu Bar next to the WiFi and other icons.


If you've used DUMeter or NetMeter on Windows, you know what I'm talking about.


Answer



Found the answer from another question. iStat Menus and MenuMeters do what I need.


Thanks to @Sathya!


windows 7 - Move specific rarely used or non-performance critical files off SSD

I was trying to make some more space on an SSD boot drive today since it is getting very tight for space with C:\Windows stuff and applications that seem to insist on putting stuff on the system drive. The system has 1TB of HDD space as well.


Is it possible to move rarely used or non-performance critical files onto the SSD? Examples would be many of the system fonts (700MB), Windows\Installer files (20GB), certain things in the user AppData & and system ProgramData (e.g. do the F1 games really need 2GB replay files on an SSD, as long as the HDD can read/write at the required speed), etc, and some stuff that seems to demand C:\Program Files.


I was thinking perhaps some way to keep the directory structure on the SSD (well I guess it has to), but have the filesystem point to the HDD for the actual file contents (symbolic link?).

java - Setting JAVA_HOME on Ubuntu 10.x

I'm trying to get the Rhodes framework installed so I can develop Android apps.


This requires that I install the SUN JDK and add JAVA_HOME and JAVA_HOME/bin to path.


I thought I could solve this by editing my bash.bashrc file:



JAVA_HOME="/usr/lib/jvm/java-6-sun/jre/bin/java"
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin



This still doesn't work, because when I run:



rake run:android



I get a prompt in the console that says the Java bin was not found in my path.


However, running echo $PATH gets me:



usernamee@ubuntu:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/ruby/gems/bin:/usr/lib/jvm/java-6-sun/jre/bin/java/bin:/home/username/ruby_files/android-sdk-linux_86/tools



What are my options here?


Edit: If the problem is not the export statement, how can I ensure that the Sun JDK is properly installed and that I am, in fact, pointing to the correct path in bashrc?

linux - wget terminates unexpectedly

I need to periodically traverse a site to update the server cache. It is a database driven site with very many (thousands of) pages. I use wget to mirror the site locally on the same server, so I use this command:


wget --mirror localhost


After some time it stops suddenly with this message:


HTTP request sent, awaiting response... Terminated


It happens always, but not on the exact same url. And I have tried on another server as well with the same result.


The --debug option does not provide any helpful information, nor does Apache's log file.


What could be the cause of this problem? I suspect some buffer running out of memory etc. Or a stack overflow.


Alternatively, are there other command line tools that can do the same?


It's Wget 1.11.4 on Debian Lenny.


Martin

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...