|
Hi,
I'm looking for program/source code/advises 4 beeginer hot wo write tool, that pints text directly on network printer(s). Something like list of printers (by IP or host name), text to print on printers (ex. "Please, send me a e-mail wit your location and contact number") and send button .
I have to find about 30 network printers (I have their IP addresses and host names.)
If You know solution, please write me, Tom
REMEMBER: don't go into light! Just follow white rabbit
|
|
|
|
|
Do you know where all your switches are? If so, just tracert the printers, and they won't be far from the switch which is likely to be the last but one item in the tracert.
|
|
|
|
|
Hi,
I just want to uninstall COM1 or COM2 Commination Device.
I can easily do it by right clicking COM2 and click COM2 from Device Manager.
But i want to do it with VB Script.
I can the read the properties with the code below.
But i want to remove the port????
[CODE]
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_SerialPort",,48)
For Each objItem in colItems
Wscript.Echo "Binary: " & objItem.Binary
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "Device ID: " & objItem.DeviceID
Wscript.Echo "Maximum Baud Rate: " & objItem.MaxBaudRate
Wscript.Echo "Maximum Input Buffer Size: " & objItem.MaximumInputBufferSize
Wscript.Echo "Maximum Output Buffer Size: " & objItem.MaximumOutputBufferSize
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "OS Auto Discovered: " & objItem.OSAutoDiscovered
Wscript.Echo "PNP Device ID: " & objItem.PNPDeviceID
Wscript.Echo "Provider Type: " & objItem.ProviderType
Wscript.Echo "Settable Baud Rate: " & objItem.SettableBaudRate
Wscript.Echo "Settable Data Bits: " & objItem.SettableDataBits
Wscript.Echo "Settable Flow Control: " & objItem.SettableFlowControl
Wscript.Echo "Settable Parity: " & objItem.SettableParity
Wscript.Echo "Settable Parity Check: " & objItem.SettableParityCheck
Wscript.Echo "Settable RLSD: " & objItem.SettableRLSD
Wscript.Echo "Settable Stop Bits: " & objItem.SettableStopBits
Wscript.Echo "Supports 16-Bit Mode: " & objItem.Supports16BitMode
Wscript.Echo "Supports DTRDSR: " & objItem.SupportsDTRDSR
Wscript.Echo "Supports Elapsed Timeouts: " & objItem.SupportsElapsedTimeouts
Wscript.Echo "Supports Int Timeouts: " & objItem.SupportsIntTimeouts
Wscript.Echo "Supports Parity Check: " & objItem.SupportsParityCheck
Wscript.Echo "Supports RLSD: " & objItem.SupportsRLSD
Wscript.Echo "Supports RTSCTS: " & objItem.SupportsRTSCTS
Wscript.Echo "Supports Special Characters: " & objItem.SupportsSpecialCharacters
Wscript.Echo "Supports XOn XOff: " & objItem.SupportsXOnXOff
Wscript.Echo "Supports XOn XOff Setting: " & objItem.SupportsXOnXOffSet
Next
[/CODE]
Cem Üney
|
|
|
|
|
The best you're going to do is remove the device driver, which will disable ALL the devices that driver supports. For instance, to remove the serial port driver, you'll use WMI to get the instance of a Win32_SystemDriver class who's Name propery is "Serial". A quick and dirty script would look something like this:
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer(strServer, strNameSpace, strUserName, strPassword)
objService.Security_.impersonationlevel = 3
Set objInstance = objService.Get("Win32_SystemDriver='Serial'")
objInstance.Delete
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi, does anyone know any resource that could guide us to use all filter in Event viewer?
|
|
|
|
|
Which API can I use to retrieve the workgroup name like GetComputerName can get the computer name?
|
|
|
|
|
NetWkstaGetInfo[^] You can use any of the WKSTA_INFO_1xx structures to get the name. You're looking for the wki10x_langroup field.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi
I have two notebooks connect by cable (crossfire) and all disk drives are shared on both computers. Ping requests work in both ways. The OS is XP Pro. Lets call the computers "targa" and "asus".
When in the "asus" machine, I can access "targa" through "my network places" (all the shared folders show up), but when accessing from "targa" to "asus" the folder is empty (not even "targa" shared folders appear).
At first, I considered the firewall, but all seams correct, then the cable, but ping works, also a bad network configuration, but it seams that the it was working before (it just doesn't anymore).
Any suggestions will be appreciated
best regards
hint_54
|
|
|
|
|
hint_54 wrote: but when accessing from "targa" to "asus" the folder is empty
What does folder refer too? My network place? Make which share name that you connect to. Try to read this article[^] on how to share resource in windows xp.
|
|
|
|
|
Not sure which discussion board to use, but here goes . .
I've written a small app (Win32 Console App) using Visual C, which is simply a number cruncher.
It has to run through some hairy maths to fill several 256*256*256 arrays of 6 byte elements.
Took many hours to run just one so since I have a dual-processor PC I thought of using threads.
The app is purely memory intensive so the improvement was huge.
Also nice to see the Task manager showing 100% CPU usage instead of the usual 50%.
My question relates to the task manager. Why does it show memory used as just over 100Mb ? With 2 threads running they each malloc 256*256*256*6 bytes so the total for the Process should be tice that.
The memory allocation (calloc) is done within the subroutine which I pass to _beginthread.
Any comments welcome.
Barry
|
|
|
|
|
are both threads working on the same array and sharing it?
|
|
|
|
|
Dan
They are each creating an independant array.
Each thread, and I have to create 7 (256*256*256*6) arrays & write to file, has a different set of parameters for the equations which fill in the arrays.
|
|
|
|
|
One more snippet of info.
As I said I have to run the subr (thread) 7 times.
It's just now started the seventh (odd number) so only one thread is running & CPU is therefore 50%.
Now the Task Manager reports 20Mb memory in use.
This should be at least 100Mb.
Does it report the malloc'd mem at all ???
|
|
|
|
|
'Mem Usage' in Task Manager is the process working set. That's the set of physical memory pages currently used by the process.
When physical memory is tight, Windows will trim - remove pages from - the working set of processes. However, it doesn't completely discard them from memory, just sets them as available. Pages that the process has written to are put on a 'modified' list to be written to disk (to the page file, if a private memory allocation like this one). Pages not written to since last brought into the working set are put onto a 'standby' list. After written to disk - which happens after the modified list reaches 800 pages, or after 5 minutes - 'modified' pages go on the 'standby' list.
If the program then references a page that's on the standby list, a page fault still occurs (and gets counted in the page fault counters for the process) but Windows simply updates the page table to point to the page that's still in memory - it doesn't need to access the disk.
In practice almost every Windows system has 'tight' physical memory, and therefore trims working sets, because of the way that pages read from and written to disk via the file system cache end up in memory on the standby or modified list. The file system cache is simply another working set.
For completeness: there are also two other lists, the 'free' list and the 'zero page' list. The 'free' pages are not connected to any working set, so the data they contain is effectively inaccessible. The 'zero page' list contains pages that are full of zeroes - every single byte in the page is zero. Windows gives out zero pages to user-mode processes for private allocations (VirtualAlloc ) to ensure that processes can't read each others' data. For kernel-mode allocations, and where the page needs to be filled by data from disk (memory-mapped files), it uses free pages so that the effort to zero the page isn't wasted.
Pages are moved from the Standby list to the Free list if the number of pages on the free list falls below a threshold. Windows has to disconnect them from the working set they used to belong to. Pages are zeroed by a thread that only runs if a processor would otherwise be idle. It only does this if the number of zero pages falls below a threshold - otherwise the processor goes to sleep to save power.
If the free or zero list are empty when a new page is needed, Windows will first try the other one (zeroing the page if necessary). Then it tries the Standby list, then if that's empty it takes a page from the Modified list, writes it to disk, and moves it to the new working set. If the Modified list is also empty (pathological case) it then has to trim a working set to get a page it can use.
If your threads are writing from start to end of your array, the pages at the start could well be out of the working set (but still probably on the modified or standby lists) at the end of the program. Windows is supposed to pay attention to a 'maximum working set size' variable but in practice it simply trims the processes that are using the most memory. If you want to try changing this variable, call SetProcessWorkingSetSize .
|
|
|
|
|
Mike
Thanks for that - I'll have to read & digest.
The program runs six nested FOR loops feeding these six parameters plus those supplied as args to the subr/thread producing fairly random hits throughout the 256*256*256 space. So I'm not marching through from start to end.
Evn though I have a Gig of ram is XP still pageing ??
Thanks again
|
|
|
|
|
Yes, it seems like Windows is always using the page file, no matter how much physical memory is available - more physical memory means it takes longer to be swapped out, but restoring a window that was minimized for 10 minutes is always going to the disk. You can that by disabling the page file if you are sure your physical memory is enough for the OS, all applications and the disk cache.
|
|
|
|
|
Finally it happened! After five years of activity, I can proudly announce that my main web site has been victim of a DDoS attack that brought IIS to its knees. Right now, I have set a null route so that incoming traffic will not reach my machine anymore for a couple of hours, and I'm wondering what can I do to prevent or mitigate the effects of other attacks.
I took a quick look to the IIS logs and found out that the majority of the requests come from a handful of IPs. Is there some settings in IIS to drop requests from them? Even better, can I limit each IP to - say - 10 requests per minute?
Do you have other suggestions?
Thank you in advance
Luca
The Price of Freedom is Eternal Vigilance.
|
|
|
|
|
You really can't do anything localy on the machine. No matter what you do to IIS, you'll still be getting the requests and your internet connection will still be flooded with them. You have to contact your ISP to get them to filter out that traffic at their router.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How can I know the ports opened to the outside of my router ?. Any commands ? I am using windows XP P SP2. Thanks
JIJO BABY - Lets Play C#
|
|
|
|
|
Get out the manual on your router. There is nothing standard that you can type on your XP machine to find out.
Most routers either have a web-based interface that you can get to and find this information, or a Telnet deamon, or a specific configuration utility you run.
Try opening a browser and typing in the IP address of your router, usually 192.168.0.1. If that doesn't work, dig out the manula on the router to find out how to configure it and find the information you need.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
jijobaby wrote: How can I know the ports opened to the outside of my router ?.
There is only one way, that's to audit it from the outside, try this site http://www.auditmypc.com/[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Is there a tool/utility that can tell the amount of memory (RAM) an application is utilising on Windows 2000 systems ?
Programming from a spec is like walking on water ......
Its Easier once frozen
|
|
|
|
|
Start / Programs / Accessories / Administrative Tools / Performance Monitor.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Performance Monitor?
Not on my system (Windows 2000 Professional)
Programming from a spec is like walking on water ......
Its Easier once frozen
|
|
|
|
|
That's where the icon normally is on a 2000 box.
You can also just click Start/Run and type perfmon.msc .
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|