Print

Scripting in Kaseya

Written by Daniel Mundy on Monday, 01 December 2008 16:16.

SQL Variables

These variables are available to all scripts and are pulled directly from the database.Look in the help file under "Database Views" for a full list.

  • #vAgentConfiguration.agentTempDir# - The temp directory used by the agent on this system
  • #vAgentConfiguration.machName# - Machine Name used for each agent
  • #vAgentConfiguration.groupName# - Group Name used for each agent

Setting Multi Line Registry Values

When setting a REG_MULTI_SZ, use \0 as a new-line delimiter.

For example, if you wanted to set a value to the following

bowser
mrxsmb10
nsi

Then you'd use the following: bowser\0mrxsmb10\0nsi

Getting a Datestamp

 

   Execute Shell Command
Parameter 1 : cscript #vAgentConfiguration.agentTempDir#\datestamp.vbs #vAgentConfiguration.agentTempDir#\datestamp.txt
Parameter 2 : 0
OS Type : 0
Get Variable
Parameter 1 : 1
Parameter 2 : #vAgentConfiguration.agentTempDir#\datestamp.txt
Parameter 3 : datestamp
OS Type : 0
Delete File
Parameter 1 : #vAgentConfiguration.agentTempDir#\datestamp.txt
OS Type : 0
Print

OMA (Outlook Mobile Access) in Exchange 2003

Written by Daniel Mundy on Thursday, 27 November 2008 18:02.


If you're using RPC over HTTP in Outlook, first sign in to OWA and install the SSL certificate.

To install a certificate when visiting a self-signed OWA server on Vista, you need to perform the following steps:

  1. Run IE as an administrator (Right-click the desktop icon)
  2. Visit the site.
  3. Click through the certificate error
  4. Click the "Certificate Error" button in the address bar.
  5. Click View Certificate
  6. Click Install Certificate
  7. Unlike on XP, you must click the “Place all certificates in the following store” radio button, and choose the “Trusted Root Certification Authorities” store.  If you don’t do this, the certificate goes in your personal store, and it isn’t trusted by IE.
Print

What is the winsxs directory and why is it so large?

Written by Daniel Mundy on Tuesday, 25 November 2008 22:11.

The %windir%\winsxs directory in Windows Vista and Server 2008 is initially large, and can grow enormously.

Win SXS - "Windows Side by Side" - keeps multiple copies of DLL's, including old versions, in order to let multiple applications run without any compatibility problem. The feature was first introduced in Windows ME as the solution to the "DLL hell" that plagued Win9x.

The best technical description can be found on TechNet - an interesting read that talks about how Vista and 2008 now store OS information in "components" - which are kept in %windir%\winsxs. This is the central "component store" for all DLLs and is in fact the only place where they are kept - all files in other locations are actually "projected" by hard linking to the component store. This replaces the use of "INF" to describe the OS.

After reading this it should be obvious that this folder should not be "cleaned" through any direct process - in fact there are various protections in place to stop you from trying to do this - the only way is to uninstall any unused software (even this may leave some duplicate files around but that can't be avoided).

More info: The Secret of Vista's Winsxs folder

Print

Connect Computer Wizard in SBS 2008

Written by Daniel Mundy on Tuesday, 25 November 2008 15:17.

The wizard can now connect workstations that are domain-joined (including workstations that are already joined to the current SBS domain - does this mean that I can assign a profile to a user after the initial run?).

Go to http://connect

Profiles Marked as Private

When you assign a profile it will not show up if the profile has been marked as private. In this case go to C:\Documents and Settings, right click on the user's folder and clear the "Make Folder Private" checkbox.

If you still can't select the profile after re-running the wizard, mark the folder as private again, and then clear the setting once more.

Print

Attaching a Windows 2008 Terminal Server to an SBS 2003 Network

Written by Daniel Mundy on Monday, 24 November 2008 06:29.

Set the following DWORD to 1 to have your Windows 2008 Terminal Server Show up in RWW:

HKLM\System\CurrentControlSet\Terminal Server\TSEnabled

Note: This is an unofficial, unsupported hack.

Print

Folder Redirection

Written by Daniel Mundy on Monday, 24 November 2008 07:37.

See also: Offline Files

Stop Syncing Redirected Folders

In a migration situation, it is usually best to turn off folder redirection on the source server before migrating the workstations, and before migrating any data. This way you can be sure that the server has the current version of all files.

  1. Modify the GPO on the server (source server if this is a migration) to redirect to the local user profile, and also make sure the option for Policy Removal is set to Redirect the folder back to the local userprofile location when policy is removed
  2. Log on to the PC as the user, gpupdate /force, it should ask you to log out so that it can apply the policy. Do that a few times until it no longer asks you to log out, just to make sure. Then also follow the steps below to re-initialize the database, just to make sure.

More information: How to stop Folder Redirection in Windows Server 2003 and Windows 2000 Server

How to Disable Automatic Caching of Redirected Folders

 

XP automatically makes redirected folders available offline no matter what the folder caching parameter on the share is. This is unique to XP, and won't happen on W2K. You have to disable automatic caching of redirected folders manually. This can be done using Administrative Templates in GPO (Network\Offline Files\Do not automatically make redirected folders available offline).

If you're not using GPO I haven't found I way to implement the above yet.

Warwick

Source: Mark Minasi's Reader Forum - Offline Folders Problem

Print

Windows

Written by Daniel Mundy on Monday, 24 November 2008 15:55.

To be sorted:

Bugs

Change Registered Owner

In regedit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

  • RegisteredOrganization
  • RegisteredOwner

Hacking Windows Passwords

Boot disks for password cracking:

Windows Updates

  • Project Dakota - Windows XP update CD that installs service packs, updates, etc. in the order that MS wants them installed.
  • Dial-a-fix - repair Windows Update + other stuff
Print

Windows 7

Written by Daniel Mundy on Tuesday, 18 November 2008 08:48.

Please also check out the Vista page, as most of that applies to Windows 7 too!

Windows 7 Resources

Networking

Security

System

Devices, Printers, etc

New Features

Speed Tips

Hold CTRL when clicking to select a window that has been grouped with other similar windows - you will automatically be taken to the last active window. Keep clicking and you'll cycle through them, in order of last access.

Win+Right/Left - snap to side of screen

Win + SHIFT + Right/Left - move window between multiple screens

Virtualization

Print

jEdit Programmers Text Editor

Written by Daniel Mundy on Monday, 17 November 2008 11:31.

http://www.jedit.org/

A powerful text editor with syntax highlighting, find and replace using regex, and the ability to record and save macros. Unlike Notepad++, you can record macros with find and replace.

  • Wrapping Long Lines - go to Utilities > Buffer Options, set "Word Wrap" to Soft, and set the "Wrap Margin" to an appropriate width for your screen resolution