|
I need to know if it is possible to use two mice in windows 2000, without having to write my own drivers.. For a medical imaging project I am working on I need to have both a mouse and a trackball. The mouse will be for the normal mouse pointer functionality, while I need to use the trackball only to Window and Level the images (contrast adjustment). I know with USB I can hook both up, but how do I communicate with the second input device.
Thanks in Advance,
John
|
|
|
|
|
I have a XWAVE 3000 sound card, i install it in Win2000 but it does not work , if you have it, please send to me or address
My Email :
hyperlove_aus@yahoo.com
The Hunter
|
|
|
|
|
If you have it , you can send it to me , or you address it to me.
Thank you.
|
|
|
|
|
From the user logon script I am attempting to determine whether or not the connection is via a dial-up connection or through the Ethernet adapter. The clients are all running Windows 2000. I have been trying to use WMI to extract the information. I can successfully pull information using the Win32_POTSModem, but this does not provide information about an actual connection. When I tried to use Win32_SerialPortConfiguration I began having problems getting the script to run properly. I have provided the SUB I am using. Any advice anyone have would be appreciated.
Private Sub Check_Modem()
Dim objWMI, objModemSet, Modem, ModemInfo
Dim SerialPortSet, SerialPort, SerialPortInfo
Dim Dialup AS Boolean
Set objWMI = GetObject("winmgmts:")
Set objModemSet = objWMI.InstancesOf("Win32_POTSModem")
Set objSerialPortSet = objWMI.InstancesOf("Win32_SerialPortConfiguration")
For Each Modem In objModemSet
For Each SerialPort in objSerialPortSet
If SerialPort.Name = Modem.AttachedTo Then
If SerialPort.IsBusy Then
Dialup=True
End If
End If
Next
Next
End sub
Thanks
Joe Paisley
Smurfit-Stone Container
Joe Paisley
|
|
|
|
|
hi,
I'm a budding systems administrator. I'm trying to learn scripting. Now what I want is a script that shuts down the NT4 Server at a certain pooint of time by stopping all the services running before shutting down.
Since i'm new to scipting I would like to take guidance in doing so. SO can neone provide me a script as I have no idea as to how to start, so that I can improvise on it by learning from the script before trying it out with other features.
SAI
SAI
|
|
|
|
|
Gidday - I may be a bit rusty on the fine points, and there are always
a number of ways to skin the cat, but here's what I would do ..
1) set up the scheduler - Im going to assume you dont have
the newer version, and use the AT command, its a bit basic,
but hey, learn how to walk before you can run
a) get a dos prompt
b) type AT
c) if you get the response like 'Schedule service not started',
type NET START SCHEDULE
2) a forced shutdown of the system will (should) stop all services,
so you dont really have to do this manually for each service.
I would use 'shutdown' from the NT Resource Kit, if
you dont have the NT Resource Kit, you can probably find
a copy of shutdown somewhere, and other companies like
Novell have their own version sitting around ..
3) assume you wanted to shutdown the machine every Monday
to Friday at 19:00 .. You can use the AT scheduler to do it
The hardest thing is you cant assume from an AT event
what the environement - eg path etc is, so I find the
safest way is to either put the shutdown command in a script,
and/or implicitly specify its path ..
So assuming Shutdown is in C:\NTReskit,
AT 7:00p /Every:Mo,Tu,We,Th,Fr CMD /C "START /DC:\NTReskit Shutdown.exe /L/Y/C"
Will run the command shutdown, from C:\NTResKit, with the given
parameters..
It is important that for whatever version of shutdown you
use, you know what the consequences and parameters are..
In the case I've shown, /L = Local, /C = Force Close, /Y =
answer Y to all questions - if you had a program that should save
its data, this wouldnt be too bright !!!
so do a 'shutdown /?' before you really start something
in production, to see what paras are what .... similarly, 'AT /?' shows
the options (if not a bit terse)
4) ok, so we can expand on the above .. lets say you create
a directory called c:\scripts, and in that, a script
called 'shutdown.cmd'
in that script, if you had services called business1, business2,
and you wanted to stop them first, you could do something like ..
(note, 'sleep' also comes from the NT resource kit, and is
handy for waiting for events .. you could use /T:60 in the
shutdown command to get the same effect )
@echo off
rem
rem This script created (date & time) by (who)
rem
rem 1st stop the business1 service
net stop business1
rem 2nd stop the business2 service
net stop business2
rem wait 60 seconds for the services to stop
c:\NTResKit\sleep 60
rem now shutdown the machine (if any services remain
rem awake, they will die anyway)
C:\NTResKit\shutdown /L /Y /C
you could of course tart this up, but at least comment it
etc ...
then, the AT command becomes a bit simpler
AT 7:00p /Every:Mo,Tu,We,Th,Fr CMD /C C:\Scripts\ShutDown.CMD
Initiates the Script ... (well, should, I havnt tested it, this
is all off un-caffienated memory)
phew - that should be enough to get you off and running. There
are also good books available on NT scripting, get your boss
to buy you one .. you can look for "Windows NT Shell Scripting"
by Tim Hill, Macmillan Technical Publishing for example ..
ps ... to get a list of running services, use the 'net start' command
- its generally not wise to stop system services
you know nothing about, unless you really are a masochist..
sometimes things start getting complex when you see a service
with a name like business service 1 .. then, you really have to
use a script, and put quotes around the service name, thus
net stop "business service 1"
- you can see how this gets hard doing it all on one line, so a script
is really you're best choice ... and of course if you have more than one
service you really want to stop, the hard way, you dont have a choice ...
pps you should make sure your services are set to Automatic start
if you expect them to run again when the machine re-boots
I hope this helps ..
Garth Lancaster
Integration Engineer
Sydney, Australia
|
|
|
|
|
hi,
that was a very good explanation u have given me and i'm very much impressed by it. OK coming to the point when I tried the simple at command with the options it did not work but the job id is assigned 1.
I'll write the at job I tried, its similar to the one u wrote to me but mine doesn't seem to be working.
At 21:00 /every:M,T,W,T,F,S CMD /C "Start /D C:\Program Files\rksupport shutdown.exe /L /Y /C"
The at command was given a job id of 1. I waited until that time but it didn't fire and the job was not showing any error status. When I checked in the Scheduled Tasks. It didnt show any errors either. But the creator is shown as "System" when it should have been "Administrator".
What is the probs? and how to resolve this? ANything wrong with the at command?
I sincerely appreciate ur valued help. Thanx once again.
SAI
|
|
|
|
|
ok, learn to start with smaller pieces of the problem, or break
it up into single steps ..
take :- Start /D C:\Program Files\rksupport shutdown.exe /L /Y /C
First of all, I dont think there should be a space between the '/D'
of the Start command, and the Directory (C:\Program Files...), so it should
be :- Start /DC:\Program Files\rksupport shutdown.exe /L /Y /C
Anyway, try just that bit from the command line, till it works ...
Ive just tried the start command on a simple .cmd file and I KNOW the space is wrong)
Also sometimes with directories with spaces in them, its easier to 'scrunch the spaces'
by going, for example c:\progra~1\rksupport, like its a dos 8.3 file-system -
both are understood ...
The AT command looks ok - leastwise if AT didnt swear at you or give you an
error when you entered it, it didnt find anything wrong with it
so when you have the start command working, move up a notch and try the start
command AND the AT command together...
Second (and last before I take off home for dinner)
If you want the Schedule service to run as Administrator, you have to get it to
start as Administrator ..
Start -> Settings -> Control Panel -> Services -> Schedule
Select 'Log On As' and enter the details of an Administrator account, or equivalent
(stop and re-start the service, either from the Services Applet, or the command
line - NET STOP SCHEDULE NET START SCHEDULE)
thus endeth another lesson
|
|
|
|
|
hi,
Thanx for replying. I'm trying what u corrected and will let u know the result. In the meantime I wanted to tell u when I goto Start\ControlPanel\Services\TaskScheduler Applet & when I goto startup properties of TaskScheduler then I can see it is set up as automatic and the "Logon As" has 2 options under it:
1. System Account Which is selected and has another checkbox whcih is "Allow Services to interact with desktop" checked. The system account has been selected as default & disabled and doesnt allow me to change to anyother login.
2. "This account" is disabled.
Infact when I try to change the login, i'm unable to do so as the system a/c is taken as default and is disabled. So i'm unable to add administrator a/c.
The other problem is when I go to "My Computer" and open the "Scheduled Tasks". I try to add a schedule from there with administrator login. Infact I tried the shutdown command at 8pm, but it didnt work there either. When I see the creator for the scheduled task it is showing administrator. But the most unfortunate thing is, it doesnt trigger off at the scheduled time nor anyother time. Other schedules which I tried out like atomic clock are working but not the shutdown.exe.
I'm using BackOffice 4.5 server, 1GB RAM, Intel L440GX Server Board, Intel PIII-700, SP4.
SAI
|
|
|
|
|
yeah, well, you didnt correct one of my first assumptions about you using the 'AT'
scheduler, did you ?? In fact, you're not really using it, you're using the upgraded
version due to the backoffice/IE upgrade - in which case, you could be better off
scheduling entries by clicking on 'My Computer' and selecting 'Scheduled Tasks'
Under the Advanced options under this newer scheduler, you can then set which account
to use for the AT command (which may be why its not running things for you now) ...
and this task scheduler service does appear as 'Task Scheduler' in the Services applet,
rather than the older 'Schedule'
play around with this, I forget the specifics of using it - Microsoft has an article
somewhere on their site on using it as opposed to the AT command iteslf..
|
|
|
|
|
now when I tried the same 'at' command in the command prompt it gave me a jpb id. Believe me it didnt work, ie., it did not shutdown the server. Similarly I tried executing an 'at' job by giving a net send message and it did work. Now I really dont understand why it is not executing when I have given it correctly. I'll write u the same at command which worked and the one which did not work.
This one worked:
C:\>at xx:xxpm cmd /c "net send server TEST"
This didnt work:
C:\>at xx:xxpm /every:th cmd /c "Start /dC;\Progr~1\rksupport Shutdown.exe /L /Y /C"
When I give the at command then i get a job id but the most unfortunate thing is I cant get it working. I'm losing hope of ever writing scripts. The simple one does not seem to work.
As for the Task Scheduler, in the advanced tab I give the administrator u/n and passwd. There also I tried scheduling the shutdown but it does not work either. This new task i've given with administrator a/c only. Infact all the while i'm talking as administrator login only. Whenever I restart the system then I get a msg saying that the system missed a scheduled command, as if its executing when left on.
SAI
|
|
|
|
|
C:\>at xx:xxpm /every:th cmd /c "Start /dC;\Progr~1\rksupport Shutdown.exe /L /Y /C"
**********
are you sure ??? is this bad typing on your or my part - isnt it supposed to be
... C:\Progra~1 ie ';' -> ':', 'Progr~1' -> 'Progra~1'
"Start /dC:\Progra~1\rksupport Shutdown.exe /L /Y /C"
the event logs should also give an indication of why something like an event hasnt
worked ...
you didnt reply as to wether the "Start /DC:\Progra~1\rksupport shutdown.exe /L /Y /C"
worked on its own either, without using the scheduler, so why not just get that bit
working - your machine might not like shutdown.exe for some
reason, in which case there are also others, as Uwe suggested on the
second posting of your original question...
and this is about all the help I can give you if it still doesnt want to
go, sorry...
|
|
|
|
|
hi,
It was typographical errors on my part. As for the "Start/DC:\Program Files\rksupport Shutdown.exe /L /Y /C". I did not understand ur doubt. U want me try the shutdown.exe command? Infact I alreadt tried using the shutdown command directly at command prompt and it did work. Its not executing/triggering when using within 'at' job schedules.
As for the eventvwr, i'll check it out & let u know.
I want to try to store the output of the at job schedule. How should I try to capture the output to a file whether its working or not?
Even when I tried to schedule the shutdown.exe from My Computer/Scheduled Tasks, it did not work & infact I ensured that administrator login is running the job. After scheduleing the job I see the job in the Scheduler window. But I really dont see it shutting down the server at the prescribed time. I really dont know whether its working or not. In the schedule window its showing without any errors.
sai
|
|
|
|
|
Hmm .. it doesnt seem to be finding the shutdown command ....
This is my absolute last try at this !
Set up the at command as :-
at xx:xx C:\Progra~1\rksupport\Shutdown.exe /L /Y /C /T /R
good luck
|
|
|
|
|
hi,
Let me apologise for the delayed response.
I tried the last resort what u gave but in vain. Nevertheless I found out one thing, I really dont know whether its going to help me or us in anyway. WHat I noticed is when I gave the at command without any options then it worked. But when I tried to give options then it is not working. Firstly the command what I gave which worked is "At 7:00pm CMD /C "Shutdown.exe /L /Y /C /R"".
Secondly when I tried to add options such as "/every:we" then I cant get it work. So this is the present scenario at my end. Anything missing from my end?
Any new suggestions?
I dont know if the above information is anyway useful to u or not?
Just wanted to share my thoughts with u. Cos u have been sincerely trying to help me out.
SAI
|
|
|
|
|
hi there again,
I got it worked. I just was lazy to check whether it worked with "/Every:M,T,W,T,F,S". Now it is working fine with the given options. Earlier I gave the "/Every:Mo,Tu,We.." So it didnt work.
But whats surprising is that why it doesnt workout with "Start /DC:\Program Files\rksupport\Shutdown.exe /L /Y /C".
Now can u help me how to write a script and execute it? I want to send all the users connected a message 10 minutes and 5 min before shutting down the server.
SAI
|
|
|
|
|
Hi all,
I have a servive that laucnh a third party program. When the system shuts
down, I try to use my service control handler to process the
SERVICE_CONTROL_SHUTDOWN request from the system for terminating the
launched program (by using TerminateProcess func), but it doesn't work and
the system pop up some message that says "OleMainTreadWndName cannot respond
to End Task Request". It seems the third party program gets hang! I then try
to use SetConsoleCtrlHandler() to setup a handler routine to catch the
CTRL_SHUTDOWN_EVENT and terminate the process a bit ealier than the
SERVICE_CONTROL_SHUTDOWN request, but it doesn't work either. Now I try to
add up the CTRL_LOGOFF_EVENT and terminate the process at this event, then
there is no error message shows up. It seems to me that I need to terminate
the process ealier, at the time my service receive the CTRL_LOGOFF_EVENT.
But the problem is, if user just log off, but not shut down the system, the
process gets terminated! Anyone know some way so that at the time I receive
the CTRL_LOGOFF_EVENT, I also know whether the system is going to shut down
or not?
Thank you for your help,
Rocky Lee
|
|
|
|
|
What kind of a third party program is it?
I haven't tried this, how about posting a message to the third party program using "PostMessage(...)" with the WM_QUIT parameter when you get the shutdown message from the SCM?
|
|
|
|
|
Hello,
I'd like to replace the default Windows 95/98 logon dialog.
Any help is welcome
best regards,
greg
|
|
|
|
|
Windows uses 3 bitmap files which are named as Logo.sys, logow.sys and logos.sys with a resolution of 320x400. Replace these files with ur files but with resolutiion
|
|
|
|
|
Windows uses 3 bitmap files which are named as Logo.sys, logow.sys and logos.sys with a resolution of 320x400. Replace these files with ur files but with resolutiion
|
|
|
|
|
Windows uses 3 bitmap files which are named as Logo.sys, logow.sys and logos.sys with a resolution of 320x400. Replace these files with ur files but with resolutiion
|
|
|
|
|
Is it possible to get the current CPU load/usage just as in the TaskManager ?
|
|
|
|
|
In regsistry there is a hidden branch - hkey_perfomance_data. Just read key values from it
|
|
|
|
|
Thanx. But how do you read/view hidden keys ?
|
|
|
|
|