Windows 7 – Disable Language Bar via Registry

September 24, 2009

So, if you’re like me and don’t leave at the US, you’ll notice that because of the locale you choose, you’ll get an annoying language bar.

To get ride of it (hiding it) you can use a registry tweak.

.: Navigate to [HKEY_CURRENT_USER\Software\Microsoft\CTF\LangBar]

.: If LangBar key doesn’t exist, create it

.: Inside LangBar create a new DWORD called “ShowStatus"

.: Set the ShowStatus value to 3

Of course that to apply this to all users, you should create a script (ex.: vbscript) loading the Default User hive.

Hope this helps


Pin to Start Menu – Alternative Way

April 22, 2009

At the end of March, I’ve published a way to Pin to Start Menu the shortcuts you wanted.

Then after some testing and research I’ve found out the this could be a real pain to make this configuration to all users.

So…I’ve managed to find/get an alternative way to do this using the good old Default User + Registry.

To do this you’ll need to:

.: On a reference machine configure all your pinned shortcuts

.: Then go to registry:[HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]

.: Export the reg key to a file and just the the keys:
  :: FavoritesResolve
  :: Favorites
  :: FavoritesChanges

.: Now using for example a vbscript you need to load the default user hive to “inject” your registry file.

Here’s an example on how to do this:

‘Pin Icons to Start Menu            
Wshshell.run "REG LOAD HKLM\TMP C:\Users\Default\ntuser.dat" 
WScript.Sleep 2000 
WshShell.run "REGEDIT /S C:\exportedregfile.reg" 
WScript.Sleep 2000   
Wshshell.run "REG UNLOAD HKLM\TMP"

And this will do the trick! :)


VBScript – Pin to Start Menu

March 30, 2009

Hello everyone!

Today I would like to share with you a nice script a colleague of mine sent me, that do the  “Pin to Start Menu” trick.

This works for Windows Vista and also Windows 7.

Set objShell = CreateObject("Shell.Application")

Set objFolder = objShell.Namespace("C:\Users\victorma\Desktop")

Set objFolderItem = objFolder.ParseName
("Nero StartSmart.lnk")

For each verb in objFolderItem.Verbs()
  ‘WScript.Echo verb
  if verb.Name = "P&in to Start Menu" then verb.DoIt()
Next

Just a brief explanation:

objFolder – This is where the file you want to pin is.

objFolderItem – This is the actual file.

‘WScript.Echo verb – You can uncomment to see the script in action.

"P&in to Start Menu" then verb.DoIt() – This is the action you want to use.

 

You should uncomment the line ‘WScript.Echo verb because de verb could change from one Windows version to another.

This script can be used to perform other actions like, “Add to Quick Launch”, etc.


Unattend Install of New Fonts

October 29, 2008

So…I’ve found myself in the need to install new fonts to my OS Image.

I’ve already read some things in the past about this, and tried a couple of things to silently install fonts.
The approachs were things like, copy the font to %systemroot%\fonts; Copy the font to %systemroot%\fonts and add a registry key.

At least for me, this didn’t work almost eveytime.

So I googled a little and found a useful resource from the MS Technet Scripting Guy!

So here’s an example of what you need to do:

Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)

objFolder.CopyHere "C:\Maestro\Fonts\BesSanR_.ttf"

And this little piece of code really works great!

For more information please visit the Scripting Guy website (link)


VBScript – How to avoid “Open file – Security Warning” prompt

October 23, 2008

Because of the need to install some hotfixes separated from the OS Packages way, I’ve created a script (VBScript) to install them.

Then I call them from my task sequence (TS) and started the deployment process.
When the TS got to the step to run my newly and pretty awesome ( no kidding! :) ) vbscript everything got stucked in transit!

For some reason the step could not be performed and seemed to got into a strange loop.
I stop the TS and aborted the deployment process to take a look for bugs on the script. Nothing found at the first sight.

Then went to the command-line and run the script. What I was looking then was a pretty nasty, bad ass “Open file – Security Warning” dialog box. A good security feature but not quite good when your trying to deployment in unattended mode…

But take no mistake, good mother Microsoft has the solution. In the following article, that works for Windows Vista too, there is a workaround/solution for this.

This is a sample script to avoid the issue:
<code>
set objWshShell= CreateObject(”Wscript.Shell”)
set objEnviroment = objWshShell.Environment(”PROCESS”)

‘Disable the “Open File – Security Warning”
objEnviroment (”SEE_MASK_NOZONECHECKS”) = 1

‘Install your security updates
objWshShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True

‘Enable the “Open File – Security Warning” again
objEnviroment .Remove(”SEE_MASK_NOZONECHECKS”)
</code>

For more information, please read the KB article:
http://support.microsoft.com/kb/889815/en-us