Navigation

6/27/2013

Apple OS screen capture commands (Mac shortcuts)

Here are keyboard commands to capture screenshots on an Apple computer:




Key Combination
Result
Command+Shift+3
Capture entire screen and save as a file
Command+Control+Shift+3
Capture entire screen and copy to the clipboard
Command+Shift+4
Capture dragged area and save as a file
Command+Control+Shift+4
Capture dragged area and copy to the clipboard
Command+Shift+4 then Space bar
Capture a window, menu, desktop icon, or the menu bar and save as a file
Command+Control+Shift+4 then Space bar
Capture a window, menu, desktop icon, or the menu bar and copy to the clipboard

One handy trick to know about when using the dragging methods (Command+Shift+4) is how the cursor crosshairs work:
To delineate an exact pixel region, the cursor crosshairs should overlap the top and left edges of the area you want to capture, but extend one pixel below and to the right of it. This technique works with the selection crosshairs in other applications as well.

 
From  http://oreilly.com/digitalmedia/2006/01/01/mac-os-x-screenshot-secrets.html



This can NOT capture cursor, for that you need the Grab Utility.

Mac OS X  ships with the Grab utility, located in the Applications - Utilities folder. To use Grab, double-click on its icon and choose the type of image you want to capture.

Screen shot.
Figure 3. Using Grab for screen capture.

Grab supports three modes of screen capture:

    Selection: Select the region you want to capture using the mouse
    Screen: Capture the entire screen
    Timed Screen: Capture the entire screen after a specific time interval

6/26/2013

How do you make a laptop battery last longer?


If you are NOT using laptop often, it is not good to leave it plugged in, charging constantly.

For long term storage, best to have battery charge at 50%, and remove it.  

Once a month drain battery to empty and recharge.


Other Laptop battery tips:

http://www.macosxtips.co.uk/index_files/get-the-most-out-of-your-laptop-battery.php 

http://www.pcworld.com/article/252025/a_laptop_battery_owners_guide.html

http://labnol.blogspot.com/2006/03/10-tips-to-make-your-laptop-battery.html


6/14/2013

HP LaserJet 9050 Cold Reset

To erase admin password or reset maintenance kit count on HP 9050:

Turn on 9050,  wait until it starts the memory check,  then Press and hold the select button (check) while it is counting the MB of memory.
Then press down when the menu selections shows until you see the Cold Reset option. 

From printer techs


 

6/06/2013

Installing printer via BAT file - Windows 7 - All users

Want to install printer via .BAT script, not Active Directory or group policy:

From http://technet.microsoft.com/en-us/library/ee624057(WS.10).aspx



Printui.dll is the executable file that contains the functions used by the printer configuration dialog boxes. These functions can also be called from within a script or a command-line batch file, or they can be run interactively from the command prompt.

Base Parameters Description
/dl Deletes the local printer.
/dn Deletes a network printer connection.
/dd Deletes a printer driver.
/e Displays the printing preferences for a given printer.
/ga Adds a per computer printer connection
(the connection is available to any user on that computer when they log on).
/ge Displays per computer printer connections on a computer.
/gd Deletes a per computer printer connection
(the connection is deleted the next time a user logs on).
/ia Installs a printer driver by using an .inf file.
/id Installs a printer driver by using the Add Printer Driver Wizard.
/if Installs a printer by using an .inf file.
/ii Installs a printer by using the Add Printer wizard with an .inf file.
/il Installs a printer by using the Add Printer wizard.
/in Connects to a remote network printer.
/ip Installs a printer by using the Network Printer Installation Wizard
(available from the user interface from Print Management).
/k Prints a test page on a printer.
/o Displays the queue for a printer.
/p Displays the properties of a printer. When you use this parameter, you must also specify a value for the modification parameter /n[name].
/s Displays the properties of a print server. If you want to view the local print server, you do not need to use a modification parameter. However, if you want to view a remote print server, you must specify the /c[name] modification parameter.
/Ss Specifies what type of information for a printer will be stored. If none of the values for /Ss are specified, the default behavior is as if all of them were specified. Use this base parameter with the following values placed at the end of the command line:
  • 2: Use to store the information contained in the printer’s PRINTER_INFO_2 structure. This structure contains the basic information about the printer such as its name, server name, port name, and share name.
  • 7: Use to store the directory service information contained in the PRINTER_INFO_7 structure.
  • c: Use to store the color profile information for a printer.
  • d: Use to store printer specific data such as the printer’s hardware ID.
  • s: Use to store the printer’s security descriptor.
  • g: Use to store the information in the printer’s global DEVMODE structure.
  • m: Use to store the minimal settings for the printer. This is equivalent to specifying 2, d, and g.
  • u: Use to store the information in the printer’s per user DEVMODE structure.
/Sr Specifies what information about a printer is restored and how conflicts in settings are handled. Use with the following values placed at the end of the command line:
  • 2: Use to restore the information contained in the printer’s PRINTER_INFO_2 structure. This structure contains the basic information about the printer such as its name, server name, port name, and share name.
  • 7: Use to restore the directory service information contained in the PRINTER_INFO_7 structure.
  • c: Use to restore the color profile information for a printer.
  • d: Use to restore printer specific data, such as the printer’s hardware ID.
  • s: Use to restore the printer’s security descriptor.
  • g: Use to restore the information in the printer’s global DEVMODE structure.
  • m: Use to restore the minimal settings for the printer. This is equivalent to specifying 2, d, and g.
  • u Use to restore the information in the printer’s per user DEVMODE structure.
  • r: If the printer name stored in the file is different from the name of the printer being restored to, then use the current printer name. This cannot be specified with f. If neither r nor f is specified and the names do not match, restoration of the settings fails.
  • f: If the printer name stored in the file is different from the name of the printer being restored to, then use the printer name in the file. This cannot be specified with r. If neither f nor r is specified and the names do not match, restoration of the settings fails.
  • p: If the port name in the file being restored from does not match the current port name of the printer being restored to, the printer’s current port name is used.
  • h: If the printer being restored to could not be shared using the resource share name in the saved settings file, then attempt to share the printer with either the current share name or a new generated share name. If neither H nor h is specified and the printer being restored to cannot be shared with the saved share name, then restoration fails.
  • h: If the printer being restored to cannot be shared with the saved share name, then do not share the printer. If neither H nor h is specified and the printer being restored to cannot be shared with the saved share name, then restoration fails.
  • i: If the driver in the saved settings file does not match the driver for the printer being restored to, then the restoration fails.
/Xg Retrieves the settings for a printer.
/Xs Sets the settings for a printer.
/y Sets the printer being installed as the default printer.
/? Displays the in-product Help for the command and its associated parameters.
@[file] Specifies a command-line argument file and directly inserts the text in that file into the command line.


To add a new remote printer, Printer1, for a computer, Client1, which is visible for the user account where this command is run, type:
rundll32 printui.dll PrintUIEntry /in /n\\client1\printer1

To add a printer using the Add Printer wizard and using an .inf file, InfFile.inf, located on drive c: at InfPath, type:
rundll32 printui.dll PrintUIEntry /ii /f c:\InfPath\InfFile.inf

To delete an existing printer, Printer1, on a computer, Client1, type:
rundll32 printui.dll PrintUIEntry /dn /n\\client1\printer1

To add a per computer printer connection, Printer2, for all users of a computer, Client2, type (the connection will be applied when a user logs on):
rundll32 printui.dll PrintUIEntry /ga /n\\client2\printer2

To delete a per computer printer connection, Printer2, for all users of a computer, Client2, type (the connection will be deleted when a user logs on):
rundll32 printui.dll PrintUIEntry /gd /n\\client2\printer2

To view the properties of the print server, PrintServer1, type:
rundll32 printui.dll PrintUIEntry /s /t1 /c\\printserver1

6/04/2013

Mapping Drive for all users in Windows 7

Want to map drive for all users in Windows 7, but NOT using Active Directory, or Group policy.  Here is using .bat script:



Open your prefered text editor such as notepad or notepad++. (You will have to run-as-admin if you have UAC enabled due to where we will be saving it.)

Type in your code:
@Echo Off
Net use P:
\\Server\Share1 /Persistent:No
Net use Q:
\\Server\Share2 /Persistent:No
Net use G:
\\Server2\Share3 /Persistent:No

I used /Persistent:No because I am confident in the server connectivity and do not want to have to use a Net Use [Drive] /Delete in order to remove drives later. The script will be running everytime at each logon so I did not feel the need for it to reconnect itself.
You may use a /Persistent:Yes if you wish, but this means that the drive will remain even if you later remove it from the logon script. As mentioned above, you can counteract this with a net use [drive] /delete.

Save the file as a .bat file to %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup
Example:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\

If you need to specify alternate credentials, you can do so with "Net Use Z: \\Server\Share /User:Domain\Username Password" but be warned, this will save the password in plain text for anyone to read. And the script will be quite easily findable as it will be in everyone's StartMenu -> Programs -> Startup folder. (Which means it's also easy for users to re-run the script if they've lost their drives for some reason. Or they could just log out and back in.)

This will also work for other Windows operating systems, even Windows 8 despite not having a Start Menu (the files are still there, and I can confirm that items in the startup folder will be run at logon), but the location you need to save the script in might be different. If you right click on the folder in the start-menu, you can generally get the opion to "Open All Users". This should let you know where it is. Except for Windows 8 obviously... stupid not having a start-menu... Pretty sure it was in the same location as Windows 7.


---------------------------------

net use [{devicename | *}] [\\computername\sharename[\volume] [{password | *}]] [/user:[domainname\]username] [/user:[dotteddomainname\]username] [/user:[username@dotteddomainname] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]


devicename = Use this option to specify the drive letter or printer port you want to map the network resource to. For a shared folder on the network, specify a drive letter from D: through Z: and for a shared printer, LPT1: through LPT3:. Use * instead of specifying devicename to automatically assign the next available drive letter, starting with Z: and moving backwards, for a mapped drive.
\\computername\sharename = This specifies the name of the computer, computername, and the shared resource, sharename, like a shared folder on a or shared printer connected to computername. If there are spaces anywhere here, be sure to put the entire path, slashes included, in quotes.

volume = Use this option to specify the volume when connecting to a NetWare server.

password = This is the password needed to access the shared resource on computername. You can choose enter the password during the execution of the net use command by typing * instead of the actual password.

/user = Use this net command option to specify a username to connect to the resource with. If you don't use /user, net use will attempt to connect to the network share or printer with your current username.