Types of logon scripts

There are four types you can have.

1. Group Policy logon / logoff scripts.
2. Group Policy Computer startup / shutdown scripts.
3. Domain User logon scripts.
4. Local user logon scripts.

Type 1 script executes when a USER logs on or logs off. And it executes with that user privilege.

Type 2 script executes when the COMPUTER starts up or shuts down. It executes in context of “Local System Account”.

Type 3 script executes when a domain user logs on. The difference is type 3 works on all Windows versions whereas type 1 only works with Windows 2000 and up.

Type 4 script: the name says itself. It only executes when the user logs on locally.

How To make ZIP Files in OS X

To create a compressed file, either Control-click on the file and choose Create Archive (which is Apple-speak for “make a compressed ZIP file”).

Or you can click on a file, then go to the Action menu (the button that looks like a gear up in the Finder window’s toolbar), and choose Create Archive from there.

Either way, it quickly creates a new file, with the file extension “.zip.” This is the compressed file. You can also compress several different files (like three, for example) into one single archive file

just Command-click (or Shift-click contiguous files) on all the files you want included, then choose Create Archive of X Items from the Action menu. A file will be created named “Archive.zip” (that’s it!).

By the way, if someone sends you a ZIP file, don’t sweat it, just double-click it and Tiger will automatically decompress it

How to map a drives under VBS with different logon credentials

As not to go off topic with this post I have removed most of everything else in this script apart from anything relating to drive mappings.

Please note I am no expert in scripting and the information below should be properly tested if you intend to use it.

The script below maps drives for uses in two ways. First off, it will give all users the default shares and there home drive (P, S, X).

Then it checks what groups a user is a member of and attaches the appropriate drives. (W, U, Z, M, L)

Drives M, L attach to another server and also use different logon credentials. If you required another drive with different credentials, you could try…

On the line

Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path, objNetwork, objNetwork1

Add another value “objNetwork2”

Then find in the script below and copy and paste it to a new section. Then replace all the 1’s with 2’s.

Amend the username, password and the share to reflect the desired connection. And fingers crossed it should work.

Set objNetwork1 = WScript.CreateObject(”WScript.Network”)
strLocalDrive1 = “L:”
strRemoteShare1 = “\\server\share”
strPer1 = “FALSE”
strUsr1 = “username”
strPas1 = “password”
objNetwork1.MapNetworkDrive strLocalDrive1, strRemoteShare1, strPer1, strUsr1, strPas1

‘ —— Script START ——

ON ERROR RESUME NEXT

Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj, Path, objNetwork, objNetwork1

Set WSHShell = CreateObject(”WScript.Shell”)
Set WSHNetwork = CreateObject(”WScript.Network”)

‘Automatically find the domain name
Set objDomain = getObject(”LDAP://rootDse”)
DomainString = objDomain.Get(”dnsHostName”)
WinDir = WshShell.ExpandEnvironmentStrings(”%WinDir%”)

‘Grab the user name
UserString = WSHNetwork.UserName

‘Bind to the user object to get user name and check for group memberships later
Set UserObj = GetObject(”WinNT://” & DomainString & “/” & UserString)

‘Grab the computer name for use in add-on code later
strComputer = WSHNetwork.ComputerName

‘Disconnect ALL mapped drives
Set clDrives = WshNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 Step 2
WSHNetwork.RemoveNetworkDrive clDrives.Item(i), True, True
Next

‘Give the PC time to do the disconnect, wait 300 milliseconds
wscript.sleep 300

‘Map drives
‘Note the first command uses the user name as a variable to map to a user share.

WSHNetwork.MapNetworkDrive “p:”, “\\server\users\” & UserString,True
WSHNetwork.MapNetworkDrive “s:”, “\\server\standards”,True
WSHNetwork.MapNetworkDrive “X:”, “\\server\company”,True

‘Now check for group memberships and map appropriate drives

For Each GroupObj In UserObj.Groups
Select Case GroupObj.Name
‘Check for group memberships and take needed action
Case “grp-Admin_tools”
WSHNetwork.MapNetworkDrive “w:”, “\\server\share”,True
WSHNetwork.MapNetworkDrive “u:”, “\\server\share”,True

Case “grp-temp-user”
WSHNetwork.MapNetworkDrive “w:”, “\\Server\Share”,True
Case “grp-FTP-root-rw”
Set objNetwork = WScript.CreateObject(”WScript.Network”)
strLocalDrive = “M:”
strRemoteShare = “\\server\share”
strPer = “FALSE”
strUsr = “username”
strPas = “password”
objNetwork.MapNetworkDrive strLocalDrive, strRemoteShare, strPer, strUsr, strPas

Case “grp-ftp-root-r”
Set objNetwork1 = WScript.CreateObject(”WScript.Network”)
strLocalDrive1 = “L:”
strRemoteShare1 = “\\server\share”
strPer1 = “FALSE”
strUsr1 = “username”
strPas1 = “password”
objNetwork1.MapNetworkDrive strLocalDrive1, strRemoteShare1, strPer1, strUsr1, strPas1

End Select

Next

‘=====================================
‘Add On Code goes above this line

‘Clean Up Memory We Used
set UserObj = Nothing
set GroupObj = Nothing
set WSHNetwork = Nothing
set DomainString = Nothing
set WSHSHell = Nothing
Set WSHPrinters = Nothing
Set objNetwork = Nothing
Set objNetwork1 = Nothing

‘Quit the Script
wscript.quit

‘ —— Script END ——

havemousewillclick is most popular….

in Georgia, USA! according to Google analytics!

So I thought I would post a couple of links to some ’stuff’ in your state,

http://en.wikipedia.org/wiki/Georgia_(U.S._state)
http://www.georgia.gov/

Photoshop shorcuts

File Menu Shortcuts:
Ctrl+N: New Document
Ctrl+O: Open Document
Shift+Ctrl+O: Browse
Alt+Ctrl+O:Open As
Ctrl+W: Close
Ctrl+Shift+W: Close All
Ctrl+S: Save
Ctrl+Shift+S: Save As
Ctrl+Alt+S: Save a Copy
Ctrl+Alt+Shift+S: Save for Web
Ctrl+Shift+P: Page Setup
Ctrl+Shift+M: Jump to Image Ready
Ctrl+Q: Exit

Viewing Shortcuts:
Ctrl+Y: Proof Colors
Ctrl++: Zoom In
Ctrl+-: Zoom Out
Ctrl+Alt++: Zoom In & Resize Window
Ctrl+Alt+-: Zoom Out & Resize Window
Ctrl+Alt+0: Actual Pixels
Ctrl+Shift+H: Show/Hide Target Path
Ctrl+R: Show/Hide Rulers
Ctrl+Shift+;: On/Off Snap
Ctrl+H: Show/Hide Extras
Ctrl+Alt+;: Lock Guides
Ctrl+;: Show Guides
Ctrl+’: Show Grid

Tools Shortcuts:
A: Path Component Selection Tool
B: Paintbrush Tool
C: Crop Tool
D: Changes Default Colour Palettes To Black Foreground, White Background
E: Eraser Tool
F: Cycle Screen Modes
G: Gradient Tool
H: Hand Tool
I: Eyedropper Tool
J: Airbrush Tool
K: Slice Tool
L: Lasso Tool
M: Marquee Tool
N: Notes
O: Dodge/Burn/Sponge Tool
P: Pen Tool
Q: Quick Mask
R: Blur/Sharpen/Smudge Tool
S: Clone Stamp
T: Type Tool
U: Shape Tool
V: Move Tool
W: Magic Wand
X: Swap Colours On Colour Pallete
Y: History Brush
Z: Zoom Tool

Layer Shortcuts:
Ctrl+Shift+N: New Layer
Ctrl+J: Layer via Copy
Ctrl+Shift+J: Layer via Cut
Ctrl+G: Group with Previous
Ctrl+Shift+]: Bring to Front
Ctrl+]: Bring Forward
Ctrl+[: Send Backward
Ctrl+Shift+[: Send Back
Ctrl+E: Merge Layers
Ctrl+Shift+E: Merge Visible

Image Manipulation Shortcuts:
Ctrl+L: Adjust Levels
Ctrl+Shift+L: Adjust Auto Levels
Ctrl+Alt+Shift+L: Adjust Auto Contrast
Ctrl+M: Adjust Curves
Ctrl+B: Adjust Color Balance
Ctrl+U: Adjust Hue/Saturation
Ctrl+Shift+U: Desaturate
Ctrl+I: Invert
Ctrl+Alt+X: Extract

Filters Shortcuts:
Ctrl+F: Last Filter
Ctrl+Shift+F: Fade
Ctrl+Alt+X: Extract
Ctrl+Shift+X: Liquify
Ctrl+Shift+Alt+X: Pattern Make

Selection Shortcuts:
Ctrl+A: Select All
Ctrl+D: Deselect
Ctrl+Shift+D: Reselect
Ctrl+Shift+I: Inverse
Ctrl+Alt+D: Feather

Random Shortcuts:
Alt+Backspace: Fill with Forground Color
Shift+Backspace: Fill with Background Color
Alt+]: Ascend through Layers
Alt+[: Descend through Layers
Shift+Alt+]: Select Top Layer
Shift+Alt+[: Select Bottom Layer
Tab: Show/Hide All Palettes

Gmail replies

If you check multiple email accounts from one gmail address, you will probably have had this problem at some point.

So you have got two addresses, your main account test712@gmail.com and dontspamme@gmail.com.
When an email is sent to dontspamme@gmail.com you want to respond with the same address not your default (main acocunt) test712@gmail.com.


To do this got to your account settings at the top right of the page, then select accounts.  In the section send mail as section look for When I receive a message sent to one of my addresses:

You now have two options
Reply from the same address to which the message was sent
Always reply from my default address (currently test712@gmail.com)
Select the correct one for you and your gmail is now the way it should be.

Please remember that you can, if you want select the email account to send from when composing a message!

assign a drive letter to a folder

One function that is under used in windows is the SUBST command.  It allows you to map a drive letter to a local folder.  This is useful when you are dealing with large directory paths or you want a quick and easy way to access a frequently used folder.

I will use a relativity short folder structure here but you will still be able to see the benefit of this command.

If we have a bunch of files located in the folder C:\- data\code\project\USB (graphic1) each time we want to use them we need to navigate through the folder structure to access them.  Surprisingly time consuming…

Would it not be easier just to go to a driver letter like T:\?

Sure it would, so let get it done!

  1. Fire up the command prompt
    1. CLICK start > run
    2. Type CMD and click OK
    3. You should now be presented with the command prompt screen
  2. Assign a drive letter to a folder (graphic2)
    1. Type subst t: “C:\- data\code\project\USB” (you can substitute t: for any free drive on your system)
    2. Type t: press enter or check it through windows explorer (graphic4)
  3. Show subst options(graphic3)
    1. Type subst /?
  4. To display a list of current virtual drives.
    1. Type subs

If you suffer from acute command line phobia you can check out the great utility visual-subst this will do everything you need from the comfort and security of your well loved GUI.

graphic1

graphic1

graphic2

graphic2

graphic3

graphic3

graphic4

graphic4

Secure you’re Gmail

gmail https in the address bar

Gmail has been around for a while now and is still the #1 choice for most webmail users.

Gmail acheives this by inovation and giving the users what they want, like accessing it over a secure connection.

Without going in to too much detail, the reason you want to use https is that all communication that takes place between your PC and the gmail server will be kept private.  This means nobody at work will be able to take a peak at what your doing or that geeky kid at the back of starbuck will not steal your passwords.

gmail https options

How to enable HTTPS in Gmail

  1. logon to your gmail account
  2. locate and click on settings at the top right of your screen
  3. under the general tab scroll to the bottom
  4. you should now see the options for browser connection
  5. click always use https
  6. click the button save changes
  7. sit back and access gmail with all the secure socket layer protection goodness

Keyboard not working with KVM

kvm

I use a KVM at work and in my home and really can’t live without it.

One of my bug bears is, when I plug in a Windows XP PC that has been using a PS2 keyboard and mouse it will not recognise my USB keyboard and mouse through the KVM!

This is one of these problems that only happens once in a while, but generally the time is long enough in between that I always forget how to quickly fix it!

windows-xp-welcome-screen

The Problem

Windows will not load the USB keyboard and mouse driver until you logon.  This is only an issue if you use the windows welcome screen see the graphic opposite.  If you are setup to go straight in to windows, this wont affect you.

The Fix

Simply plug in a PS2 keyboard before you boot, CONTROL + ALT + DELETE enter your logon credentials.  Once Windows has loaded your KVM should pick up the correct drive and work!

Outlooks auto complete feature

Auto complete

If you have ever done any system administration you will quickly find that many users think Outlooks auto complete feature is a fully fledged address book, but it’s not.

A feature I thought Microsoft would look at in Office 2007 is a more robust auto complete feature set, sadly this is not the case.  However it is still a nice feature to have in your arsenal.

The brains of auto complete lies in the Outlook.NK2 file.  This is the place that stores all the auto complete entries, you can get to this file by navigating through explorer to…

C:\Documents and Settings\user.name\Application Data\Microsoft\Outlook\Outlook.NK2

user.name should be subsituted for the user name of the account you are using.

Basic method

You can simply copy this file to the same location on any computer, the usernames do not need to match.  Then they will have the same autocomplete entries as the source computer.

Advanced method

A great utility for managing your NK2 files is NK2View from the guys at Nirsoft.  This will let you import/export enteries and easily backup your NK2 files amongst other things.