|
Hello Friends,
I have one question
How can we determing the File is open or close without opening the file.
Thanks in advance to all of you.
ritz1234
|
|
|
|
|
Hi,
you could enumerate all processes, and for each process enumerate all handles, and for
each handle check whether it refers to the file you are interested in.
Sounds to me just a simple try-open-close is much simpler!
I have a feeling this is not your real question, my guess is you have some problem
and are attempting to find a solution without explaining the actual problem ...
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I have a .APS website that currently communicates with an Oracle DB running on a Sun Solaris database server. Currently, we connect directly to the server for each database request over the internet. Can I use either a .ASP web service or WCF to communicate with that Sun server? Examples are welcome.
Thanks,
Steve
|
|
|
|
|
Is there anything that tells the administrator in Windows Server 2003 what files the users has open or been viewing?
|
|
|
|
|
You can only see what files a user HAS open, not what they HAD open.
On the server, right-click MyComputer, then, in the left-side pane, open System Tools, then Shared Folders, then click on Open Files.
|
|
|
|
|
Hi everyone
I'm wondering what the syntax is for ending a script aft X seconds.
the reason being is one of our clients has a script that was written to do a system inventory but that script is causing log on times of 45 minutes at times. If I remove the script logon times are normal.
the script is as follows
start \\servername\ishareddiectory\inventoryapp.exe
so it is nothing fancy
I want to somehow say IF time running >= 30seconds Then Quit but I'm' not sure of what the syntax is and my knowledge of scripting is very limited
|
|
|
|
|
There is nothing built into the system that will do this.
Either that utility has to offer that functionality or you have to come up with an external utility that will watch for that .EXE and, if running for more than X seconds, terminate it. But, that could also lead to resource leaks and hung connections on servers.
|
|
|
|
|
I assume you are using a good old fashioned netlogon script or are using w2k computers.
Run the script as a group policy logon script instead. on Xp computers the script will run asyncronously and therefore it will not disturb so much.
If you are already using GPO script but you are having w2k computers, then the scripts are run syncronously. You may then want to set the timeout for the script at "Administrative templates/system/Scripts/Maximum wait time for Group Policy Scripts"
|
|
|
|
|
Can you do it via a Scheduled Task? It has the option for stopping the task after it has ran for X minutes/hours.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hey Everyone,
Is there a way I can determine if the Windows Update is installing updates ?
Especially on Windows Vista and Windows XP
Thanks
|
|
|
|
|
check in the registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\AUOptions
1=Disabled
2=Notify
3=Download but don't install
4=Download and install on schedule
This is valid for w2k and xp, I haven't checked for vista, but I have no reason to believe that it would be different
|
|
|
|
|
Do you know what registry key says we are using XP or VISTA?
|
|
|
|
|
HKLM\Software\Microsoft\Windows NT\Current Version\CurrentVersion => 5.1 for XP and 6.0 for Vista.
|
|
|
|
|
Thanks a lot!
|
|
|
|
|
Is there a known way to convert values from HKEY_CURRENT_USER\Control Panel\Keyboard\KeyboardSpeed to milliseconds?
Thanks in advance
|
|
|
|
|
Hi,
sure, seems KeyboardSpeed is a number in the [0, 31] range depending on Control Panel/Keyboard.
So set it at maximum, write a little program that accepts a line of text, hold down
the 'a' key for 10 seconds then hit ENTER, and let your program decide how may a's you've got.
Divide 10000 by it and that is the shortest key repeat period in msec.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hi,
I have setup a Windows XP dial-up server(Control Panel->Networking->New Connection->Advanced->Accept Incoming connections). The connection works but the server (XP machine) uses CHAP protocol for authentification. How do I change it to PAP(it must be PAP)?
Thank you!
|
|
|
|
|
Hi,
I need to connect a PPP client device to a winXP machine using RS232 (COM5).
I have tried setting up a "Incoming connections" and using a standard 9600 bps modem on COM5 RS232 port.
The client send all kinds of PPP requests but the XP machine doesn't respond.
Any ideas, any custom software PPP server?
Thank you very much!
|
|
|
|
|
|
Hi,
As far as I know the main cause of such issue is Incompatible add-ons.
Try to run your IE7 without add ons.
Right click the IE icon on the desktop and choose Start Without Add-ons.
Or
Go to Start | All Programs | Accessories | System Tools | Internet Explorer (No Add-ons).
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
i gonna make my question as clear as I can.
I want to change text of tabs and other text inside window of DirectX example
in tab System i have text Computer Name: Machine and I want to change text to PC: Machine
if i am not so clear in my question then plz ask me.
regards
I Love SQL
|
|
|
|
|
Blue_Boy wrote: if i am not so clear in my question then plz ask me.
I see a couple of statements but do not see a question. Is it encoded into the blank lines with the new algorithm by Pallab_GT[^]?
Best Wishes,
-David Delaune
|
|
|
|
|
thanks Randor,but that's not what I need.
I will try to explain again.
I click Star->Run and I write dxdiag command then i have DirectX Diagnostic Tool window, in this window i want to change text of original one, example : On System tab it's informations
Current Date/Time:
Computer Name:
Operating System:
Language:
.
.
.
and I want to change like this
Da/Time:
PC:
OS:
Language:
.
.
.
how can I do those changes?
regards
I Love SQL
modified on Sunday, April 13, 2008 3:58 AM
|
|
|
|
|
I'm not sure that your question has anything to do with the forum subject. Maybe you should have asked this somewhere else.
This seems to work. Hope your a C++ developer.
typedef struct _WINDOW_INFORMATION
{
TCHAR title[MAX_PATH];
TCHAR Wndclass[MAX_PATH];
} WINDOW_INFORMATION, *LPWINDOW_INFORMATION;
VOID ModifyDirectXDiag()
{
HWND hwnd = ::FindWindow(NULL,_T("DirectX Diagnostic Tool"));
if(NULL != hwnd)
{
WINDOW_INFORMATION wndInfo;
_tcscpy(wndInfo.title,_T("Current Date/Time:"));
_tcscpy(wndInfo.Wndclass,_T("Static"));
EnumChildWindows(hwnd,EnumWindowHandler,(LPARAM)&wndInfo);
}
else
{
MessageBox(NULL,_T("Cannot find DirectX window."),NULL,0);
}
}
static BOOL CALLBACK EnumWindowHandler(HWND hwnd, LPARAM lParam)
{
LPWINDOW_INFORMATION pParentInfo = reinterpret_cast<LPWINDOW_INFORMATION>(lParam);
WINDOW_INFORMATION childInfo;
if(0 != GetClassName(hwnd,childInfo.Wndclass,MAX_PATH))
{
if(0 == _tcscmp(childInfo.Wndclass,pParentInfo->Wndclass))
{
GetWindowText(hwnd,childInfo.title,MAX_PATH);
if(0 == _tcscmp(childInfo.title,pParentInfo->title))
{
SetWindowText(hwnd,_T("Hello World"));
}
}
}
return TRUE;
}
I can't believe I actually took the time to do this.
Best Wishes,
-David Delaune
|
|
|
|
|
thanks for your help, I'll try it
I Love T-SQL
|
|
|
|