Friday, February 14, 2020
SysInternals tools suite requires you to accept an EULA for every tool used for the first time. This can be very annoying, especially when running a command on a remote comuter with psexec - the program hangs, waiting for a non-existent user to click Accept.
Fortunately, there is a solution. Fire up your trusted python, install the pefile library and execute the following script from SysInternals directory:
Fortunately, there is a solution. Fire up your trusted python, install the pefile library and execute the following script from SysInternals directory:
Thursday, February 16, 2012
Access Denied - nothing to see here, move along...
While writing my first .net service, I encountered the following problem:
The service would not start. In the Application event log there was an error:
Service can not be started. FileLoadException: Could not load file 'dll name'. Access is denied.
....
Pre-bind state information
====================
...
<log message cut off>
Well, in the web there was nothing helpful, and the fact the event log was cut off made the error even more mysterious in my eyes, as I kept thinking the last part holds the key.
But, alas, I was the one creating the problem. I had a post-build script that updates the service's files and I didn't notice it copies files in encrypted (EFS) form.
Of course, the Local Service (or Local System) accounts can't access EFS files, thus the error.
The service would not start. In the Application event log there was an error:
Service can not be started. FileLoadException: Could not load file 'dll name'. Access is denied.
....
Pre-bind state information
====================
...
<log message cut off>
Well, in the web there was nothing helpful, and the fact the event log was cut off made the error even more mysterious in my eyes, as I kept thinking the last part holds the key.
But, alas, I was the one creating the problem. I had a post-build script that updates the service's files and I didn't notice it copies files in encrypted (EFS) form.
Of course, the Local Service (or Local System) accounts can't access EFS files, thus the error.
Thursday, April 8, 2010
netsh support in MicroXP 0.82
If you’re using eXPerience’s MicroXP 0.82 (especially good for small virtual machines), you might like to use netsh.exe (Net Shell), which was removed.
So here’s what you have to do in order to get nesh working in MicroXP (all of the mentioned files should be copied from/to %SYSTEMROOT%\system32):
So here’s what you have to do in order to get nesh working in MicroXP (all of the mentioned files should be copied from/to %SYSTEMROOT%\system32):
- From a full Windows XP installation, copy netsh.exe and netshell.dll to MicroXP.
- Again, from a full Win XP, run netsh show helper to see the necessary DLLs for the various commands.
- Copy what you need from this list to MicroXP.
- run netsh add helper <DLL> (without <>) for each DLL you copied.
Monday, March 8, 2010
Quiet Alternative to jucheck.exe (Java Update Check)
I want to make sure my Java is updated, but I don't want jusched.exe running in the background for no reason, and jucheck can't be configured to pop a message box only when there's a new version available.
So I wrote this small batch script to check the latest version.
To run it you'll need curl in your PATH.
I schedule this script to run when the computer is idle for an hour, using nircmd exec hide <path to javacheck.cmd> to make the update check invisible.
P.S Whenever Java does update, make sure to edit the script according to the latest version number (look in http://javadl-esd.sun.com/update/1.6.0/map-m-1.6.0.xml ).
So I wrote this small batch script to check the latest version.
To run it you'll need curl in your PATH.
I schedule this script to run when the computer is idle for an hour, using nircmd exec hide <path to javacheck.cmd> to make the update check invisible.
P.S Whenever Java does update, make sure to edit the script according to the latest version number (look in http://javadl-esd.sun.com/update/1.6.0/map-m-1.6.0.xml ).
Sunday, February 14, 2010
WMP crashes when switching to full screen
Suddenly Windows Media Player 11 started crashing when I switched to full screen mode. At first I thought it was a driver problem, but then I remembered I've changed video acceleration to None in order to take screen shots.
Indeed, setting video acceleration (Tools menu -> Options -> Performance) back to full solved the problem.
BTW, my primary video player is VLC.
Indeed, setting video acceleration (Tools menu -> Options -> Performance) back to full solved the problem.
BTW, my primary video player is VLC.
Sunday, April 26, 2009
Legend for OpenSSL’s dhparam output
I was curious to find out the meaning of all the dots, pluses and stars that openssl dhparam outputs while computing Diffie-Hellman parameters.
To make a long story short, here’s the legend:
- . : A potential prime number was generated.
- + : Number is being tested for primality.
- * : A prime number was found.
Reference:
http://openssl.org/docs/crypto/BN_generate_prime.html#DESCRIPTION
Sunday, February 1, 2009
MIBS Missing Error on Wireshark Startup
I've installed Wireshark 1.0.5 without SNMP MIBs on Windows. Upon startup I received an error dialog about missing MIBs, containing text like:
The following errors were found while loading the MIBS:(snippet from http://www.wireshark.org/lists/wireshark-dev/200711/msg00249.html)
-:0 1 module-not-found failed to locate MIB module `IP-MIB'
-:0 1 module-not-found failed to locate MIB module `IF-MIB'
-:0 1 module-not-found failed to locate MIB module `TCP-MIB'
The solution: rename or delete the file smi_modules under the Wireshark directory.
Technorati Tags: Wireshark,troubleshooting
Wednesday, March 5, 2008
FILETIME to time_t
Microsoft kindly provides the code to convert from time_t (Unix time) to Win32's FILETIME.
Here's the code to do the reverse:
time_t FileTimeToUnixTime(const FILETIME& ft)
{
// the reverse of http://support.microsoft.com/kb/167296/en-us
ULONGLONG ull = reinterpret_cast<const ULONGLONG&>(ft);
ull -= 116444736000000000;
ull /= 10000000;
assert(ull < ULONG_MAX);
return static_cast<time_t>(ull);
}
Subscribe to:
Posts (Atom)