From a Windows command prompt:
schtasks /query
This will give you output of the current machine.
schtasks /query /s \\servername >>\\server\sharename\tasks\server1_tasks.csv
This will send the output to a file named server1_tasks.csv on a network share and each subsequent run, will append to this file.
Tuesday, April 28, 2009
Printing from Windows using IPP to CUPS
The scenario is this - you are using CUPS (Common Unix Printing System) and want to have central logging of all your printing. By using Internet Printing Protocol (IPP) you can set up your Windows hosts to print via IPP to CUPS.
Help available from here:
rundll32 printui.dll,PrintUIEntry /?
The process to install the printers can be accomplished via the add/printer wizard, but I am a command line guy so I use this for an HP 2605DN printer:
rundll32 printui.dll,PrintUIEntry /if /f "\\printserver\hppcp602.inf" /b "Printer on Printserver - 2605 PCL 6" /r "http://cupsprintserver:631/printers/printername" /m "HP Color LaserJet 2605 PCL 6"
The key to this is the last part - "HP Color LaserJet 2605 PCL 6" as this has to match the actual driver name that is listed in the .inf file verbatim.
Enjoy!
Help available from here:
rundll32 printui.dll,PrintUIEntry /?
The process to install the printers can be accomplished via the add/printer wizard, but I am a command line guy so I use this for an HP 2605DN printer:
rundll32 printui.dll,PrintUIEntry /if /f "\\printserver\hppcp602.inf" /b "Printer on Printserver - 2605 PCL 6" /r "http://cupsprintserver:631/printers/printername" /m "HP Color LaserJet 2605 PCL 6"
The key to this is the last part - "HP Color LaserJet 2605 PCL 6" as this has to match the actual driver name that is listed in the .inf file verbatim.
Enjoy!
Tuesday, February 3, 2009
MOM SQL Error
Description: Could not connect using SQLDMO to SQL Instance MSSQLSERVER. However, the instance is currently running.
Method 1: Register the Sqldmo.dll file
If you receive the first two errors that are mentioned in the "Symptoms" section, follow these steps:- Log on to the computer that is running MOM 2005 and SQL Server 2000 by using an account that has administrative permissions.
- Click Start, click Run, type regsvr32.exe sqldmo.dll, and then click OK.
- In the Regsvr32 dialog box, click OK.
Tuesday, January 6, 2009
Explorer.exe not loading on XP systems
I recently ran into a problem where intermittently the explorer.exe process was not running when XP users logged on. The result was a blue background with no icons displayed - if you ran ctrl alt del and started a new process, explorer.exe the desktop loaded fine and all was well.
There was lots of chatter about spyware and hijacked browsers, but that was not the issue. I was trying to determine if SP3 or perhaps the Symantec EndPoint virus software was the culprit as both were installed about the same time.
As it turns out, Symantec posted a comment about this on their support site in respect to login scripts. If you create a new GPO like this:
Computer Configuration, Administrative Templates, System/Scripts
Policy Setting - Run logon scripts synchronously
This allows the login script to load, antivirus to scan, and the explorer.exe process to execute!
There was lots of chatter about spyware and hijacked browsers, but that was not the issue. I was trying to determine if SP3 or perhaps the Symantec EndPoint virus software was the culprit as both were installed about the same time.
As it turns out, Symantec posted a comment about this on their support site in respect to login scripts. If you create a new GPO like this:
Computer Configuration, Administrative Templates, System/Scripts
Policy Setting - Run logon scripts synchronously
This allows the login script to load, antivirus to scan, and the explorer.exe process to execute!
Thursday, December 11, 2008
Netbackup
I recently ran into an issue with Netbackup 6.5.1 and wanted to make a mental note about this. I was perplexed as to why when I looked through the restore gui one of my systems was only displaying the weekly full backups but not the incremental ones.
While this caused some confusion, the backups always finished successfully and never once did I suspect that I would not be able to retrieve data. Upon looking in the /usr/openv/netbackup/db/images directory I found the directory that correlated to my system name but it was listed twice. Once with like this "Systemname" and then "systemname". Notice the capital letter? The java gui and for that matter, the client interface, ignores the capital letter and just pulls the information from the lower case.
In my incremental policy, the client name was listed with the capital and even though my backups were being accomplished, I still could not "view" the results.
I opened a case with Veritas (Symantec) and will post any results here.
While this caused some confusion, the backups always finished successfully and never once did I suspect that I would not be able to retrieve data. Upon looking in the /usr/openv/netbackup/db/images directory I found the directory that correlated to my system name but it was listed twice. Once with like this "Systemname" and then "systemname". Notice the capital letter? The java gui and for that matter, the client interface, ignores the capital letter and just pulls the information from the lower case.
In my incremental policy, the client name was listed with the capital and even though my backups were being accomplished, I still could not "view" the results.
I opened a case with Veritas (Symantec) and will post any results here.
Monday, November 3, 2008
Services for Unix "Network Error 53"
"Network Error 53", "The data area passed to a system call is too small" or "Unknown Error"
Client for NFS included with Windows Server 2003 R2 returns different errors when trying to access NFS shares on UNIX-based NFS servers. The exact error message may depend on your environment - you might get one or more from the ones mentioned above. And, at the same time, SFU 3.5 Client for NFS may work just fine.
Analyzing the network traffic may show MOUNT or NFS calls being "rejected for security reasons (5)".
The R2 Client for NFS uses high ports (>1024) to connect to NFS servers and that's known to cause the above errors. There are two ways to fix this -
Change how your NFS servers export the NFS shares and make them allow connections from high ports
OR
Add /UseReservedPorts /DWORD value under HKLM\Software\Microsoft\Client for NFS\CurrentVersion\Default and set it to 1.
Restart the Client for NFS service to allow the change to take effect.
Documentation to support running a program (application, script, etc) as a Windows Service:
Requirements: There are two utilities needed to run a program as a NT
Service
srvany.exe and instsrv.exe
instsrv installs an instance of srvany as an NT Service and throughout the rest of the setup process that instance of srvany runs the program.
1. To install srvany, open a command shell by clicking Start, Run, cmd and in the console window type INSTSRV NAME_OF_SERVICE
C:\Windows\System32\SRVANY.EXE
(If srvany is not located in C:\Windows\System32\, this command needs to be changed accordingly.) This initializes an instance of srvany as an NT Service with NAME_OF_SERVICE as the Service name. This name will appear under the Services application in the Control Panel.
2. The next step is to edit the Windows NT Registry using RegEdit - Click on Start, Run, regedit.
3. Now locate the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NAME_OF_SERVICE registry key. The key can be found by either maneuvering through the registry tree, or by searching for NAME_OF_SERVICE (Edit->Find). Right click on the key and choose New, then Key. This will create what looks like a new folder. Name the new key Parameters.
4. Right click on Parameters and select New, then String Value and in the space provided type Application.
5. Again, right click on Parameters and select New, then String Value and in the space provided type AppParameters.
6. Right click on Application and choose Modify, then type in the path to your Perl binary. For example c:\perl\bin\perl.exe.
7. Next, right click on AppParameters and select Modify then enter the path to the program you want run as a Service. There are no more required registry changes, so RegEdit can now be closed.
8. Now open the Control Panel and double-click the Services application. There should now be a service listed with the name of the service you chose in step one. The Startup option should be set to Automatic by default, but if it is not, click Startup and then Automatic if you want the Service to be started automatically when the machine boots. If you do not want it to start automatically, choose Manual. It is also best to have it log in as the System Account (which should be the default) because this way it will run no matter who is logged on to the machine, and even if no user is logged on. If appropriate, choose a user with the proper permissions for the application for the Log On As option. To get a little more information on Services, choose Start->Help->Find, type in Services and select "To configure startup for a service."
9. Finally, choose the Service from the list of Services, and click the Start button to launch it. The program is now running as an NT Service.
Subscribe to:
Posts (Atom)
