Wednesday, March 28, 2007

Vista SMS Report

When reviewing Vista requirements I put this together. In the SMS console create 2 new reports and copy these in. Next create a dash board using both reports. Now you can see total minimum and total premier. Obviously the premier machines meet the minimum requirements. I made a minimum to see what computers can run Vista (no Aero) [Vista Minimum] and those that would do very well [Vista Premier]
I tried to grab all the video cards, video ram, desktop ram. Granted this is no subsitute for the Vista, are you ready, software. But it atleast gives us a sign.
Premier Ram is set to 1.5GB though we are looking at 2GB but it should be enough to have a good performance. Modify as you like.
--------------------------------- Vista Minimum
SELECT Distinct SYS.Netbios_Name0,MEM.TotalPhysicalMemory0/1024 As Memory,vc.name0 as VideoCard,
pr.name0 as Processor,man.model0 as Model, pr.MaxclockSpeed0 as Speed
FROM v_R_System SYS
JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceID
join v_GS_VIDEO_CONTROLLER vc on SYS.ResourceID = VC.ResourceID
join V_GS_processor pr on SYS.ResourceID = pr.ResourceID
join V_GS_Computer_System Man on SYS.ResourceID = man.ResourceID
WHERE MEM.TotalPhysicalMemory0/1024 >= 990
and SYS.Operating_System_Name_and0
Like '%Workstation%' and (vc.AdapterRam0 > 64000) and vc.name0 not


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

-------------------------Vista Premier
SELECT Distinct SYS.Netbios_Name0, MEM.TotalPhysicalMemory0/1024 As Memory,vc.name0 as VideoCard,pr.name0 as Processor,man.model0 as Model
FROM v_R_System SYS
JOIN v_GS_X86_PC_MEMORY MEM on SYS.ResourceID = MEM.ResourceID
join v_GS_VIDEO_CONTROLLER vc on SYS.ResourceID = VC.ResourceID
join V_GS_processor pr on SYS.ResourceID = pr.ResourceID
join V_GS_Computer_System Man on SYS.ResourceID = man.ResourceID
WHERE MEM.TotalPhysicalMemory0/1024 >= 1400
and SYS.Operating_System_Name_and0
Like '%Workstation%' and (vc.name0 Like '%X600%'
or vc.name0 like '%RADEON X300%' or vc.name0 like '%Radeon X1300%' or vc.name0 like '%GeForce Go 7300%' or vc.name0 like '%GeForce FX Go5200%'
or vc.name0 like '%X700%' or vc.name0 like '%X600%'or vc.name0 like '%RADEON X300%'or vc.name0 like '%X550%' or vc.name0 like '%82945G%' or vc.name0 like '%82g965%' or vc.name0 like '%945GM%' or vc.name0 like '%GMA950%'
or vc.name0 like '%NVIDIA Quadro nvs%') and vc.name0 not like '%secondary%'
and (pr.name0 like '%pentium(r) 4%' or pr.name0 like '%pentium(r) D%' or pr.name0 like '%Genuine Intel(R) %' ) and pr.MaxClockSpeed0>=2900
order by netbios_name0
-----------------------------

Exiting Batch Files

Sometimes when using SMS you want to use a Batch file to see if a file is present and preform an action, or maybe delete a file. When using batch files you can get the current error level for validation or set the error level to your liking. For instance you have a batch file that checks to see if a file is present, if so run a program, else exit. Lets say for instance that the Batch always exits with a error 1 but it should exit with a 0 and continue on with the next program. To get around do this in the batch file
---
Exit /b [error level]
Exit /b 0 <- this will allow you to exit with a successful exit code
----

or try this

-----
set errorlevel=0 <- this will allow you to exit with a successful exit code

-----


This should only be done if you have tested and know the desired out come. Forcing a successful exit can lead to other problems. Make sure you cover any possible errors that might occur in the Batch file

Saturday, March 24, 2007

Google Search in IE 6

There are several ways to change your search engine. You could just click search and change it. You can use the IE 6 deployment tool to change it and then push it out to your computers. But that seems to only affect the search bar. What happens if you want to change it in the address bar as well. Here is a vbscript that you easily change to a reg file. Either way you can push it through SMS to your clients. I really don't know why I did this a vbscript and not a reg file. I guess I was looking to see what I could do with VBS and the registry. When this is run per user it will set their search default to Google but it will also change the address bar into a google search. No need for the Google tool bar.

--------------------------google-search.vbs
Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next

'Set Search Assistant

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Use Search Asst"
objShell.RegWrite RegLocate,"yes","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Page"
objShell.RegWrite RegLocate,"http://www.google.com","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Search Bar"
objShell.RegWrite RegLocate,"http://www.google.com/ie","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL\"
objShell.RegWrite RegLocate,"http://www.google.com/keyword/%s","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL\provider"
objShell.RegWrite RegLocate,"gogl","REG_SZ"

RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\search Assistant\DefaultSearchURL"
objShell.RegWrite RegLocate,"http://www.google.com/search?q=","REG_SZ"
--------------------------

Friday, March 23, 2007

Html Help Files CHM

There are some increased security that prevents some applications from showing the help file. This CHM file might be stored on the server while the application is running on the desktop. When to you open the help you receive and error that it is blocked or inaccessible.
Below you will find a reg file that will help you change that:

------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\HHRestrictions]"UrlAllowList"=\\\\Server\\folder\\folder\myhelp.chm;file://;
"MaxAllowedZone"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]"UrlAllowList"=\\\\Server\\folder\\folder\myhelp.chm;file://;
"MaxAllowedZone"=dword:00000000
------------------------

Now does this all mean. Well it tell Windows to open a call to the server/file mentioned and allow it through. There are several ways to do this. I am only showing you a UNC path to a file.

For more indepth information look here:
http://support.microsoft.com/kb/896054

Tuesday, March 20, 2007

Remove Adobe

Ever wanted to just remove all the old version of Adobe Acrobat from a system but didn't want to create a package for each one

Modify as needed.

-------------------------- uninstall-adobe.vbs
Dim objShell, RegLocate
Set objShell = WScript.CreateObject("WScript.Shell")
On error resume next
Dim sngVersion
'''' Adobe Readers
sngVersion = objShell.RegRead ("HKLM\SOFTWARE\Adobe\Acrobat Reader\8.0\Installer\ENU_GUID")
if NOT sngVersion="" then
objShell.run("msiexec /x " & sngVersion & " /qb /norestart"), 0, True
end if
sngVersion = objShell.RegRead ("HKLM\SOFTWARE\Adobe\Acrobat Reader\7.0\Installer\ENU_GUID")
if NOT sngVersion="" then
objShell.run("msiexec /x " & sngVersion & " /qb /norestart"), 0, True
end if
sngVersion = objShell.RegRead ("HKLM\SOFTWARE\Adobe\Acrobat Reader\6.0\Installer\ENU_GUID")
if NOT sngVersion="" then
objShell.run("msiexec /x " & sngVersion & " /qb /norestart"), 0, True
end if
''''Adobe Acrobat
sngVersion = objShell.RegRead ("HKLM\SOFTWARE\Adobe\Adobe Acrobat\7.0\Installer\ENU_GUID")
if NOT sngVersion="" then
objShell.run("msiexec /x " & sngVersion & " /qb /norestart"), 0, True
end if
sngVersion = objShell.RegRead ("HKLM\SOFTWARE\Adobe\Adobe Acrobat\6.0\Installer\ENU_GUID")
if NOT sngVersion="" then
objShell.run("msiexec /x " & sngVersion & " /qb /norestart"), 0, True
end if
objShell.run("isuninst.exe -f""c:\program files\common files\adobe\acrobat 5.0\nt\uninst.isu"" -c""c:\program files\common files\adobe\acrobat 5.0\nt\uninst.dll"" -a ")

WScript.Quit
---------------------------

Saturday, March 17, 2007

Shutdown Logged Out computer

This is a simple procedure that can be done via WMI or the application. Say you want to shutdown computers in SMS that are logged out. Maybe to save money on long breaks for for whatever reason. Simply send the command:

shutdown.exe -s -t 30 -c "SMS Shutting system down"

If you wish you can run it from the computer or place it in a package and send it down to the computer. This will shutdown in 30 seconds with a warning. If you what you can add the -f to force any applications that might be running to close

Friday, March 16, 2007

Recover Deleted Items in Outlook 2003

When most people delete items in Outlook they really mean to do it. What if someone clears their Deleted Items folder but needs something back. Then the admin must pull backups or try other tricks. If you send down this Reg entry to the machines it will Give you a Recover Deleted items option in Outlook.

--------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options]"DumpsterAlwaysOn"=dword:00000001
-------------------------------------

Thursday, March 15, 2007

Logged out Background and Screen saver

Here is a simple script that will allow you to have a background when someone is logged out, say company logo or something. It will also set a special screen saver when no one is logged.

Because you are working in the .Default regfile I recommend running this adv when no one is logged on. Changes will not be see until you do a reboot.

Reg file
----------------
Windows Registry Editor Version 5.00
[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"ScreenSaverIsSecure"="1"
"ScreenSaveTimeOut"="60"
"ScreenSaveActive"="1"
"SCRNSAVE.EXE"="Custom.scr"
"Wallpaper"="CompanyLogo.bmp"

[HKEY_USERS\.DEFAULT\Control Panel\Screen Saver.Slideshow]
"PaintInterval"=dword:00000000
"ChangeInterval"=dword:00001770
"DisplayFilename"=dword:00000000
"MaxScreenPercent"=dword:0000005a
"DisableTransitions"=dword:00000000
"AllowStretching"=dword:00000000
"AllowKeyboardControl"=dword:00000000
"MaxFailedFiles"=dword:000003e8
"MaxSuccessfulFiles"=dword:00010000
"MaxDirectories"=dword:000000c8
"ImageDirectory"="c:\\windows\\screensaver\\"
-------------------------
User.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"SCRNSAVE.EXE"="Custom.scr"
"Tilewallpaper"=0"
"ScreenSaveTimeOut"="600"
"ScreenSaverIsSecure"="1"
"ScreenSaveActive"="1"
------------

user screensaver.reg

[HKEY_CURRENT_USER\Control Panel\Screen Saver.Slideshow]
"PaintInterval"=dword:00000000
"ChangeInterval"=dword:00001770
"DisplayFilename"=dword:00000000
"MaxScreenPercent"=dword:0000005a
"DisableTransitions"=dword:00000000
"AllowStretching"=dword:00000000
"AllowKeyboardControl"=dword:00000000
"MaxFailedFiles"=dword:000003e8
"MaxSuccessfulFiles"=dword:00010000
"MaxDirectories"=dword:000000c8


Install.bat
------------
rem This file must be run as admin since it sets the main default setting for the computer
rem Use company logo for screen saver.
regedit.exe /s no-one.reg
md "%windir%\screensaver\"
copy /y CompanyLogo.jpg"%windir%\screensaver\"
-------------------------

Wednesday, March 14, 2007

Disk Cleanup

Ever wanted to do a disk clean up on your own schedule? Here is some code that will allow you to just that.

Install:
regedit.exe /s disk-cleanup.reg
------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Compress old files]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Content Indexer Cleaner]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Downloaded Program Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Internet Cache Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Memory Dump Files]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Microsoft_Event_Reporting_2.0_Temp_Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Office Setup Files]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Offline Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Old ChkDsk Files]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Remote Desktop Cache Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Setup Log Files]"StateFlags0200"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Offline Files]"StateFlags0200"=dword:00000002
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\WebClient and WebPublisher Cache]"StateFlags0200"=dword:00000002
------------------------------
Execute:
cleanmgr.exe /sagerun:200


*****************************
Now what does all this mean...
StateFlags0200 is the level or setting I have created. You can have 0001 to 9999 different ways of doing diskclean up.
dword:00000002 Sets this setting to active.

So now you can control what type of file will be cleaned, including the recycle bin if you wanted.
There are more registry keys that you can control than the ones listed above. Now you can force a disk clean up several times a month with different version.

http://support.microsoft.com/kb/315246

Welcome to my Blog

I wanted to create this blog to post information for Systems Management Server (SMS). This blog will focus more on doing things with SMS beyond the normal Application Deployment. There are alot of places like App Deploy that will show you how to deploy an application. I would like to post items that will give you hints, tricks, and tips to utilizing SMS. Granted some of these can be done with Group Policy but with SMS you have the reporting and auditing. Some items I will cover might be as such:
How do you recover deleted items in Outlook 2003 once I have cleared my Deleted items?
How do I change the default screen saver when no one is logged on?
How can I setup the Microsoft VPN client on the computer?
How can I push OBDC setting to a computer?

If I find items from other sources, links and credits will be given when known.

Disclaimer:
As with any scripts, applications, and Registry changes, please test all items before deploying them in a production enviroment. Do not hold me responsible for any problems or errors my code causes to your network or computers. Use the code at your own risk, no warranty.