|
Hi. I have a problem:
I write a programm (named SoL) which may be default for mp3, avi, mpg, mpeg files.
I want to set my own icon for this files when my program selected as default for they.
I do next actions:
1) Write in registry - HKEY_CLASSES_ROOT\SoLfile
2) HKEY_CLASSES_ROOT\SoLfile\DefaultIcon = C:\ProgramFiles\SoL\SoL.exe,25
25 - number of icon ID in resources of my SoL.exe.
3) HKEY_CLASSES_ROOT\.mp3 = SoLfile
HKEY_CLASSES_ROOT\.avi = SoLfile
............................
Result icon of these files set to default (files which has not any associated icon )
Help me please, if you experienced in this question.
|
|
|
|
|
I am trying to programatically determine the system partition (which is on Physical Drive 0) - this may not be the boot partition - on an NT based OS and have been unable to find information anywhere on how to do this without getting down to low-level code. Does anyone have any ideas on how one would accomplish this? I am needing this to determine which drive has the boot.ini file used by NT as it may not be the C: drive.
Robert
|
|
|
|
|
rouchark wrote:
I am trying to programatically determine the system partition
If we go to MSDOS command line and type this command: echo %systemdrive% then it will display the drive letter of the system drive that you install windows in the command prompt. I think from here you could output the result of the system drive to a text file by using this command: echo %systemdrive% > DriveLetter.txt and let your application that you build to read from the text file, then it will know which drive is the system drive.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
The Win32 API call GetEnvironmentVariable will give me that information; however, the %systemdrive% environment variable will only give me the drive for the OS I am currently booted into. On a multiple boot system the boot.ini file which is used is only located on 1 partition - the system partition which is not necessarily the one I am currently booted into.
I believe I have determined how to get this information; the registry value:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\BootDir
I verified on a multiple boot system where the %systemdrive% was F: and the boot.ini file was located on C:; however, the name BootDir is misleading.
This Microsoft article explains the System Partition and Boot Partition:
http://support.microsoft.com/default.aspx?scid=kb;en-us;314470[^]
Thanks for your input.
Robert
|
|
|
|
|
Thank you very much for your reply. I know that my answer is a little to narrow for you. It is very nice that you could found out the solution. But i still support you everytime if you have any further problem in the future.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Question 1:
Guys, what's the difference between:
1. Processor\%Processor Time - Total
2. Process\%Processor Time - Total
See attached image "perfmon_ProcessorVsProcessor.JPG" - the two are different!
URL: http://www.codeguru.com/forum/showthread.php?p=1196346#post1196346
Question 2:
Also, how can it max over 100% at 101.563%?
Question 3:
I have access to another server with four processors. It's % Processor Time goes up to 400% plus?? What's happenning? Should I divide this figure by 4?
Question 4:
What's acceptable/suitable value for:
1. Processor\%Processor Time - Total
2. Process\%Processor Time - Total
Please refer to second attachment: "Physical Server CPU.processor loading.JPG"
URL: http://www.codeguru.com/forum/showthread.php?p=1196346#post1196346
|
|
|
|
|
The _Total counter sums the values of all the instances of these objects - it isn't actually a real counter. So, the Process % Processor Time _Total counter gives the sum of processor time used by all processes, including the 'System Idle Process', which isn't really a process at all: it's used for accounting for idle time, when the processor isn't being used. The Processor % Processor Time counter instances don't include the idle time, which is the difference you're seeing.
The fluctuations you see in the total Process time - which by definition should always be 100% - are due to the way the Performance Monitor works: it has to read all the counters one at a time, then sum them up. Because this takes some time, another process can get some run-time while it occurs, which leads to the sampling being a little inaccurate.
There is one instance of the Processor: % Processor Time counter for each installed processor. Each instance shows the amount of time the corresponding processor spent busy. If all processors are active, the sum of each processor's busy time will indeed reach 400%. Again, the way it's sampled could cause it to exceed 400%.
As for what's an acceptable value, I've seen a figure of being constantly over 80% as a sign you should consider adding processors.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
So, "processor \ % Processor Time" is amount of time the processor is actually working? Does it include "system processes" + "user processes"?
According to counter explaination:
% Processor Time is the percentage of elapsed time that the processor spends to execute a non-Idle thread. It is calculated by measuring the duration of the idle thread is active in the sample interval, and subtracting that time from interval duration. (Each processor has an idle thread that consumes cycles when no other threads are ready to run). This counter is the primary indicator of processor activity, and displays the average percentage of busy time observed during the sample interval. It is calculated by monitoring the time that the service is inactive, and subtracting that value from 100%.
Norman Fung
|
|
|
|
|
Thanks...
Mike Dimmick wrote:
As for what's an acceptable value, I've seen a figure of being constantly over 80% as a sign you should consider adding processors.
What about a 15% % Processor Time? Does it indicate a CPU that's under utilized?
Norman Fung
|
|
|
|
|
Hi,
I was write a GINA dll that works fine on Windows XP. I use version 3 of Winlogon functions that is compatible with Windows 2000+. But when I tested this dll on Windows 2000 Advanced Server and Windows Server 2003, a problem occurred. When the message dialog with message "Preparing network connections" or "Applying computer settings" appear, this dialog remains for a long time (in fact for ever). What could be happened? Do you know?
Thanks.
Esmaeil Vakili
|
|
|
|
|
Try to boot in safe mode and run the command sfc /scannow in the command prompt to check for any file error in an operating system.
|
|
|
|
|
Hi, what's normal/acceptable range for the following performance counter?
Pages/Sec
Average Disk Queue Length
% Processor Time
Thanks
|
|
|
|
|
Pages/Sec - This should always be low bordering on zero. Spikes are ok, but constant paging means the server is out of memory.
Average Disk Queue Length - This depends on the application. If the application is disk intensive this value will be high. If there isn't a lot of disk access this should be zero.
% Processor Time - Depends on what the system is doing, lower is better. If it is high, find out why it is high. For example on a SQL server chances are it is due to bad indexes or unoptimized queries.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
andy brummer wrote:
% Processor Time - Depends on what the system is doing, lower is better. If it is high, find out why it is high. For example on a SQL server chances are it is due to bad indexes or unoptimized queries
but a 15% % Processor Time means CPU is under utilized?
|
|
|
|
|
Each task typically deals with the following resources, CPU, disk, memory, network and shared memory areas. If you have a task that requires a lot of network, disk access or shared memory access then you can run out of these resources before you hit high CPU usage and your server will get overloaded with minimum CPU usage.
For an active service, average response time and requests/second typically are the best indicators of load. Since each server and application is different you need to compare the ability of the service to handle additional load. As long as you can add requests without much growth in the response time the service is not running out of resources, but once you hit a limit you get a dramatic increase in the average response time. That is how you tell if a server is overloaded. Before you put a server is production, it is always a good idea to have a rough estimate of the load it can handle.
Without knowing anything specific about the server and application setup, it is hard to tell what and where the problem is. If it is SQL server, I usually profile the server and look at any long running queries to find any that could stand some optimization.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
I use Sysinternals Process Explorer to find that a sertain process is accessing file with a name "\Device\WMIDataDevice" and a another file with a name "\Device\USBPDO-7".
What does this name represent and how do I get access to the same file?
Any help is greatly appreciated,
Thanks.
|
|
|
|
|
Windows represents just about anything that can be read/written, such as pipes, com ports, mailslots, sockets, file streams, and, of course, files using the file api's. Any device driver that wants to expose it's device to user mode, will allow it to be "opened" using the CreateFile() api. This will return a handle to user mode that can be used to read/write/close the device. So in the case of "\Device\USBPDO-7", this is probably a handle to a USB port, so that the process can read and write data to a usb device.
http://msdn.microsoft.com/library/en-us/fileio/fs/createfile.asp?frame=true[^]
|
|
|
|
|
Anyone know how to monitor bandwidth utilization between two physical servers (Application and database)? I know how to monitor number of byte the NIC's are sending and receiving, but I need to find out if the connection between the two is underutilized/overutilized. How can I do that?
I found this from here...:
If you think that you have a network bottleneck, it is easy to check using the Network Segment Object: % Network Utilization counter. This counter provides you with what percentage of the bandwidth is being used by the network connection your server is using. This is not the amount of bandwidth being sent to and from your server, but the total bandwidth being used on the connection the network card is attached to.
This connection could be of many different types, including a shared hub or a switched port running at half-duplex or full-duplex. The connection might be 10Mbp, 100Mbp, or even 1Gbp. Given this, the results you receive from the counter must be interpreted in the light of which type of connection you have. Ideally, you will want a network connection to its own dedicated switch port for maximum performance. [6.5, 7.0, 2000]
But I can't find it under "Network" performance counter category...?
Thanks.
Norman Fung
|
|
|
|
|
Task Manager->Networking tab.
|
|
|
|
|
No, I need to monitor transfer of data between two machines.
Norman Fung
|
|
|
|
|
so... any suggestion?
Norman Fung
|
|
|
|
|
Is it possible to set a drive letter for an external HD ?
for some reasons, when I powered my external HD, it was given a different letter than it usually is given ( I instead of H ) and that messed up the paths of a couple of softwares that use the data on that drive.
I'd like to give it the letter M, and always use that letter.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
You can use diskmgmt.msc for that.
Wout Louwers
|
|
|
|
|
Hi,
I didnt quite know which forum to put this in...
I am trying to install DBI and DBD-DB2 for perl. I have active perl 5.8 installed on a windowsXP machine. DBI installed fine from the ppm but when i say
ppm install http://ftp.esoftmatic.com/outgoing/...8.4/DBD-DB2.ppd it says it cant connect to the site.
So i tried building the source for which i need nmake. i have the microsoft toolkit installed with has the VC++ compiler. I then downloaded nmake from the microsoft site and it says that i just have to run the application and it uncompresses itself into two files NMAKE.EXE and NMAKER.ERR which i should put in a directory in my path and i should be good to go but when i try and execute the NMAKE setup file it says
"c:\WINDOWS\SYSTEM32\AUTOEXEC.NT. the system file is not suitable for running MS-DOS and Microsoft Windows applications. Choose 'close' to terminate the application".
Any clues to whats going on? any other place i can get the DBD-DB2.ppd would be helpfull too.
thanks
maul is online now Edit/Delete Message
|
|
|
|
|
There seem to be some viruses or spyware or something which delete the AUTOEXEC.NT and CONFIG.NT files. These files are found and read by the 16-bit compatibility subsystem when launching a 16-bit program. To restore them, follow these steps[^].
NMAKE shouldn't need the 16-bit compatibility system. You've probably downloaded an older version of NMAKE. On it's own, NMAKE doesn't actually build a program; you also need the C++ compiler. The 32-bit version of NMAKE comes with Visual Studio 6 and later.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|