$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
3 Dec // php the_time('Y') ?>
The backup has been restored and all downloads should be working again. If you do find a non working download please leave a comment.
2 Dec // php the_time('Y') ?>
Most of the downloads are not working (error 404) at the moment, I am waiting for my hoster to restore some stuff from the backup so please be patient…
UPDATE: backup is restored and downloads are working again!
11 Nov // php the_time('Y') ?>
I needed to do an unattended install of an application (in this case Exact Globe 2003) on Citrix. In this case the application provides a special executable, WSetup.exe for an unattended install.
WSetup takes several parameters, the most important ones are:
/I: Installation Path
/S: Install Type
/IM: Installation Mode
So this appeared to be an easy task, however when testing the Deployment the /I parameter seemed to be ignored and the whole thing was installed in C:\Program Files.
I analyzed what WSetup.exe does with my favorite tool, Ida Pro and at first all seemed ok. WSetup determines the default location of the Program Files Directory by reading the ProgramFilesDir registry key (which is of course C:\Program Files).
8 Jan // php the_time('Y') ?>
12 Nov // php the_time('Y') ?>
On a Citrix environment 2 different applications were required. One of the applications required java version 1.5 (and didn’t work with 1.6) and the other application needed specifically version 1.6.
Because the applications are installed on a Citrix server the users do not have write permissions to HKEY_LOCAL_MACHINE so that was another complication.
After a lot of monitoring with process monitor the general process of how a particular Java version loads in Internet Explorer became clear to me.
Java adds an addon to IE called ssv.dll, you can see this trough Tools | Manage Add-ons | Enable or Disable Add-ons:
2 Sep // php the_time('Y') ?>
EDIT: Please read the Desktop Icons, hide, show, prevent rename or delete article, it may be a better solution!
One of my customers recently asked if it was possible to preven the user from renaming or deleting the My Documents icon on the desktop.
If you know that deleting the icon from the desktop doesn’t really delete the My Documents folder from disk but just hides the icon then it’s obvious that it must be some kind of registry setting.
So I fired up Process Monitor from Sysinternals and deleted the icon. This showed that after deleting the icon changed registry keys at the following location:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu\
20 Aug // php the_time('Y') ?>
17 Jun // php the_time('Y') ?>
Today I was deploying some IBM x3550 and x3650 servers with Altiris Deployment Server. IBM Delivers a toolkit for Altiris that contains amongst others jobs for configuring raid arrays.
To do this you need to create a raid policy file and deploy this. I created this policy file:
[Policy.RAID-1]
AppliesTo.1 = t:ServeRAID-8k-l,d:4
Array_Mode = CUSTOM
Array.A = 1,2
Array.B = 3,4Logical_Mode = CUSTOM
Logical.1 = A:FILL:1
Logical.2 = B:FILL:1
As you can see the policy only applies to the type of array controller in my servers (t:ServeRAID-8k-l). This way we prevent applying the policy to other configurarions. I have a 4 disk configuration (d:4) and want to create to RAID 1 arrays (A & B). On each array one Logical drive with the maximum size (FILL parameter).
9 Jun // php the_time('Y') ?>
I needed a script to logoff all running Terminal Server sessions in order to rollout an install package. As you might know there is a commandline tool to logoff a session, it’s called logoff.exe.
These are the commandline options:
LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]
sessionname The name of the session.
sessionid The ID of the session.
/SERVER:servername Specifies the Terminal server containing the user
session to log off (default is current).
/V Displays information about the actions performed.
No option to logoff all sessions is there?
On a Terminal Server there is a special session called the Listener session, you can see it with TSAdmin in the sessions tab:
A Listener is associated with a protocol (Microsoft RDP by default) and is used to setup new sessions. If you logoff a Listener session it will logoff all session that were created through it. Great, just what we need!
So Logoff 65536 will do the trick? Let’s try:
So Logoff is smart enough to ask for confirmation, we can prevent this by using the following commandline:
Echo Y ! Logoff 65536
2 May // php the_time('Y') ?>
Justin Shepard converted my code to encrypt RPD passwords to VB.NET:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | '======SOF Imports System Imports System.Text Imports System.Runtime.InteropServices Imports System.ComponentModel Imports Microsoft.VisualBasic Public Module RdpEncrypt Public Class DPAPI <dllimport> _ Private Shared Function CryptProtectData( _ ByRef pPlainText As DATA_BLOB, _ ByVal szDescription As String, _ ByRef pEntropy As DATA_BLOB, _ ByVal pReserved As IntPtr, _ ByRef pPrompt As CRYPTPROTECT_PROMPTSTRUCT, _ ByVal dwFlags As Integer, _ ByRef pCipherText As DATA_BLOB _ ) As Boolean End Function <dllimport> _ Private Shared Function CryptUnprotectData( _ ByRef pCipherText As DATA_BLOB, _ ByRef pszDescription As String, _ ByRef pEntropy As DATA_BLOB, _ ByVal pReserved As IntPtr, _ ByRef pPrompt As CRYPTPROTECT_PROMPTSTRUCT, _ ByVal dwFlags As Integer, _ ByRef pPlainText As DATA_BLOB _ ) As Boolean End Function <structlayout> _ Friend Structure DATA_BLOB Public cbData As Integer Public pbData As IntPtr End Structure <structlayout> _ Friend Structure CRYPTPROTECT_PROMPTSTRUCT Public cbSize As Integer Public dwPromptFlags As Integer Public hwndApp As IntPtr Public szPrompt As String End Structure Private Const CRYPTPROTECT_UI_FORBIDDEN As Integer = 1 Private Const CRYPTPROTECT_LOCAL_MACHINE As Integer = 4 Private Shared Sub InitPrompt _ ( _ ByRef ps As CRYPTPROTECT_PROMPTSTRUCT _ ) ps.cbSize = Marshal.SizeOf(GetType(CRYPTPROTECT_PROMPTSTRUCT)) ps.dwPromptFlags = 0 ps.hwndApp = IntPtr.Zero ps.szPrompt = Nothing End Sub Private Shared Sub InitBLOB _ ( _ ByVal data As Byte(), _ ByRef blob As DATA_BLOB _ ) ' Use empty array for null parameter. If data Is Nothing Then data = New Byte(0) {} End If ' Allocate memory for the BLOB data. blob.pbData = Marshal.AllocHGlobal(data.Length) ' Make sure that memory allocation was successful. If blob.pbData.Equals(IntPtr.Zero) Then Throw New Exception( _ "Unable to allocate data buffer for BLOB structure.") End If ' Specify number of bytes in the BLOB. blob.cbData = data.Length Marshal.Copy(data, 0, blob.pbData, data.Length) End Sub Public Enum KeyType UserKey = 1 MachineKey End Enum Private Shared defaultKeyType As KeyType = KeyType.UserKey Public Shared Function Encrypt _ ( _ ByVal keyType As KeyType, _ ByVal plainText As String, _ ByVal entropy As String, _ ByVal description As String _ ) As String If plainText Is Nothing Then plainText = String.Empty End If If entropy Is Nothing Then entropy = String.Empty End If Dim result As Byte() Dim encrypted As String = "" Dim i As Integer result = Encrypt(keyType, _ Encoding.Unicode.GetBytes(plainText), _ Encoding.Unicode.GetBytes(entropy), _ description) For i = 0 To result.Length - 1 encrypted = encrypted & Convert.ToString(result(i), 16).PadLeft(2, "0").ToUpper() Next Return encrypted.ToString() End Function Public Shared Function Encrypt _ ( _ ByVal keyType As KeyType, _ ByVal plainTextBytes As Byte(), _ ByVal entropyBytes As Byte(), _ ByVal description As String _ ) As Byte() If plainTextBytes Is Nothing Then plainTextBytes = New Byte(0) {} End If If entropyBytes Is Nothing Then entropyBytes = New Byte(0) {} End If If description Is Nothing Then description = String.Empty End If Dim plainTextBlob As DATA_BLOB = New DATA_BLOB Dim cipherTextBlob As DATA_BLOB = New DATA_BLOB Dim entropyBlob As DATA_BLOB = New DATA_BLOB Dim prompt As _ CRYPTPROTECT_PROMPTSTRUCT = New CRYPTPROTECT_PROMPTSTRUCT InitPrompt(prompt) Try Try InitBLOB(plainTextBytes, plainTextBlob) Catch ex As Exception Throw New Exception("Cannot initialize plaintext BLOB.", ex) End Try Try InitBLOB(entropyBytes, entropyBlob) Catch ex As Exception Throw New Exception("Cannot initialize entropy BLOB.", ex) End Try Dim flags As Integer = CRYPTPROTECT_UI_FORBIDDEN If keyType = keyType.MachineKey Then flags = flags Or (CRYPTPROTECT_LOCAL_MACHINE) End If Dim success As Boolean = CryptProtectData( _ plainTextBlob, _ description, _ entropyBlob, _ IntPtr.Zero, _ prompt, _ flags, _ cipherTextBlob) If Not success Then Dim errCode As Integer = Marshal.GetLastWin32Error() Throw New Exception("CryptProtectData failed.", _ New Win32Exception(errCode)) End If Dim cipherTextBytes(cipherTextBlob.cbData) As Byte Marshal.Copy(cipherTextBlob.pbData, cipherTextBytes, 0, _ cipherTextBlob.cbData) Return cipherTextBytes Catch ex As Exception Throw New Exception("DPAPI was unable to encrypt data.", ex) Finally If Not (plainTextBlob.pbData.Equals(IntPtr.Zero)) Then Marshal.FreeHGlobal(plainTextBlob.pbData) End If If Not (cipherTextBlob.pbData.Equals(IntPtr.Zero)) Then Marshal.FreeHGlobal(cipherTextBlob.pbData) End If If Not (entropyBlob.pbData.Equals(IntPtr.Zero)) Then Marshal.FreeHGlobal(entropyBlob.pbData) End If End Try End Function End Class Sub Main(ByVal args As String()) Try Dim text As String = args(0) Dim encrypted As String encrypted = DPAPI.Encrypt(DPAPI.KeyType.MachineKey, text, Nothing, "psw") Console.WriteLine("{0}" & Chr(13) & Chr(10), encrypted) Catch ex As Exception While Not (ex Is Nothing) Console.WriteLine(ex.Message) ex = ex.InnerException End While End Try End Sub End Module '======EOF |