<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Teh Tech &#187; Scripts</title>
	<atom:link href="http://tehtech.com/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://tehtech.com</link>
	<description>Being an Admin is Hard Enough</description>
	<lastBuildDate>Wed, 14 Jul 2010 16:14:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Cause a Computer to Stop Booting via Script</title>
		<link>http://tehtech.com/cause-a-computer-to-stop-booting-via-script/</link>
		<comments>http://tehtech.com/cause-a-computer-to-stop-booting-via-script/#comments</comments>
		<pubDate>Sat, 08 May 2010 18:26:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Break]]></category>
		<category><![CDATA[Cute Secretary]]></category>
		<category><![CDATA[Stop Booting]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=371</guid>
		<description><![CDATA[Interesting simple script I wrote today to cause a computer to stop booting. When run the operating system will not load, the issue is easily reversed with a boot cd of any kind. Why would I ever want to do this you might ask. Simple I used it at the request of an employer. The [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting simple script I wrote today to cause a computer to stop booting. When run the operating system will not load, the issue is easily reversed with a boot cd of any kind.  Why would I ever want to do this you might ask. Simple I used it at the request of an employer. The boss had requested a way to see exactly what a user was doing on his work computer without a chance to clean it up.  I used kaseya to push this script down and a few min later I got a call from the user saying his computer crashed. I told him to send it to IT and he did. I got the computer, renamed the file and turned it over to the boss so he could see what he wanted.  He was let go a few hours later.<br />
<span id="more-371"></span></p>
<p>More or less what we are doing is renaming ntdetect.com to ntdetect.bak.  When the computer reboots it will loop until you rename the file back by boot disk like bart pe.</p>
<p>[ad]</p>
<div class="box">
Script Name: Break the computer<br />
Script Description: Causes the computer to stop booting until a file is renamed.</p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : attrib -H -R -S c:ntdetect.com<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : rename c:ntdetect.com ntdetect.bak<br />
Parameter 2 : 0<br />
OS Type : 0<br />
ELSE
</p></div>
<p>
This can also be used in a batch file:<br />

<div class="box">
attrib -H -R -S c:ntdetect.com<br />
rename c:ntdetect.com ntdetect.bak<br />
Shutdown -r -f -t 0
</div>
<p>Could be useful for trying to recover stolen computers, data from soon to be fired employees (not giving them the chance to delete things).  Or recovering a computer to investigation.  You can also use it as an excuse to go visit that cute new secretary&#8230;</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/cause-a-computer-to-stop-booting-via-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All About Internet Explorer 8 &amp; Uninstall/Rollback Script</title>
		<link>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/</link>
		<comments>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/#comments</comments>
		<pubDate>Sun, 02 May 2010 18:19:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[Internet Explorer 8]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[Windows update]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=368</guid>
		<description><![CDATA[Internet Explorer 8 is the newest release from Microsoft and recently left beta and hit automatic updates. I will be discussing the issues that I have encountered, and the fixes I have found. Additionally, I will include group policy templets to prevent its distribution and a uninstall script to remove it for systems. I came [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 8 is the newest release from Microsoft and recently left beta and hit automatic updates. I will be discussing the issues that I have encountered, and the fixes I have found.  Additionally, I will include group policy templets to prevent its distribution and a uninstall script to remove it for systems. I came in Monday to find that the software was installed on a spattering of computers across sever different clients (about 250 computers). I spent most of the rest of the week fixing them.<br />
<span id="more-368"></span></p>
<h4>Issues that I have had:</h4>
<p>No reboot: This seems to be the most common issue I encountered.  If the patch was installed and the computer was no rebooted you will experience things like not being able to type in text input fields. Rundll32.exe memory dumps, and missing menus and toolbars.  To fix this rebooting seems to do the trick.</p>
<p>No Header or title in internet explorer: For some reason I have seen this a few times when the computer went from IE6 to IE8 directly.  The browser window will not show any title, and will not allow you to open any menus.  The fix I found for this is to give the user account local admin rights and login again.  Go through the setup wizard and change the rights back again.</p>
<p>Internet explorer will not open after upgrade: I have seen this a few times.  First try running the browser as another user.  If it opens, try giving the user that is having issues local admin rights. If this does not fix it I found that recreating the user profile works ( I had to resort to this only twice out of 12 browsers that would not open)</p>
<p>Website Incompatibility: MANY products and websites are not compatibly with internet explorer 8.  Microsoft chose not to follow internet conventions when developing the browser so there have been a ton of issues encountered.  This is actually so prevalent that Microsoft introduced compatibility view to allow people to render websites in Internet Explorer 7.  Check out <a title="MS FAIL" href="http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx ">THIS</a><br />
Spybot &#8211; If you have spybot installed on your computer unfortunately it will not work with internet explorer 8.  The people at spybot are working to fix this but the only solution I found as of writing this is to uninstall either IE8 or spybot.</p>
<p>ADP &#8211; a very common workflow and payroll management provider.  If you are using IE8 you cannot log into ADP unless you view the page in Compatibility Mode.</p>
<p>Centricity &#8211; A common medical Practice management software, this does not seem to work at all with IE8 installed.  I found uninstalling to be the only option.</p>
<p>Solidworks &#8211; a Design and CAD application, once installed IE8 will cause web help to stop functioning as well as some other web based services. Uninstalling IE8 seems to be the best option for this as well.</p>
<p>Quickbooks &#8211; IE8 will break the web-help application and case older versions of quickbooks to crash on first load.  Again until there is a hotfix uninstalling IE is the best option.</p>
<p>General Browsing &#8211; About 2400 websites are not compatible with IE8.  A  bunch of banking sites and smaller sites do not work or allow for login, most of these are fixed with compatibility view.  Some big name sites like amazon.com ebay.com and download.com are having issues with the browser rendering.  I list of sites that are not rendered correctly is available <a title="Broken Sites" href="http://blogs.zdnet.com/microsoft/?p=2072">HERE</a>. </p>
<p>[ad]</p>
<h4>Options:</h4>
<p>Microsoft seems to have messed up again.  The browser does not follow conventions, it does not have nearly all the bugs and kinks worked out.  It causes a ton of applications and websites to not work, so much so they included a compatibility option out of the box. It seems hardly finished to me.</p>
<p>That said rollback may be a good option for you.  Microsoft allows several uninstall options:</p>
<p>Add and remove programs wizard &#8211; This will let you remove the browser and all subsequent patches in one wizard.</p>
<p>Restore &#8211; Sometimes it is just too messed up, the uninstaller wont work, or something else goes wrong. By defult the install creates a restore point.  This may be a option in some situations to rollback the mess.</p>
<p>Login Script: My favorite!  This is what I have been using on some domains to remove it.<br />

<div class="box">
%windir%\ie8\spuninst\spuninst.exe /quiet /norestart /log:G:\%computername%\<span style="color: #ff0000;">ie8uninstall.log</span><br />
Shutdown -r -f -t 30 -c “Reboot for Internet Explorer 8 Uninstall”</div>
<p>Kaseya &#8211; It for things like this I love kaseya.<br />

<div class="box">
Script Name: IE8 Uninstall<br />
Script Description: Uninstall IE 8</p>
<p>IF Test File<br />
Parameter 1 : %windir%\ie8\spuninst\spuninst.exe<br />
Exists :<br />
THEN<br />
Execute File<br />
Parameter 1 : %windir%\ie8\spuninst\spuninst.exe<br />
Parameter 2 : /quiet /norestart /log:<span style="color: #ff0000;">G:\ie8uninstall.log</span><br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>
Preventing the patch for reaching your system &#8211; Microsoft admits that the patch might not be for everyone.  Check out <a title="MS FAIL" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=21687628-5806-4ba6-9e4e-8e224ec6dd8c&amp;displaylang=en">THIS</a>.  It included a group policy template to prevent the update from installing via automatic updates, and a login script option that can also be used with kaseya.<br />

<div class="box">
Script Name: Block IE 8<br />
Script Description: Blocks IE8 From Auto Update</p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : md c:\temp<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : md c:\temp\ie8<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Write File<br />
Parameter 1 : md c:\temp\ie8\ie8block.cmd<br />
Parameter 2 : <span style="color: #ff0000;">admin\batch</span>\IE80Blocker.cmd<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : md c:\temp\ie8\ie8block.cmd<br />
Parameter 2 : /b<br />
Parameter 3 : 0<br />
OS Type : 0<br />
ELSE
</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/all-about-internet-explorer-8-uninstallrollback-script/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to Add and Remove a Local Account from a Group</title>
		<link>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/</link>
		<comments>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 20:35:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Visual Basic Script (vbs)]]></category>
		<category><![CDATA[Groups]]></category>
		<category><![CDATA[Local Admin]]></category>
		<category><![CDATA[Login Script]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=361</guid>
		<description><![CDATA[Occasionally you may need to add a local user account to the local administrators group for a software install or temporary maintenance. The following vbs script can be used to add the local ‘user1’ account to the local ‘administrators’ group. Any user can be added to any local group, change the red to match your [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally you may need to add a local user account to the local administrators group for a software install or temporary maintenance. The following vbs script can be used to add the local ‘user1’ account to the local ‘administrators’ group. Any user can be added to any local group, change the <span style="color: #ff0000;">red</span> to match your needs. The computer name is pulled from the workstation dynamically so this is also completely portable and can be run on any computer.<br />
<span id="more-361"></span></p>
<div class="box">Dim objComputer, objWSHNetwork, strComputerName, objUser, objGroup<br />
Set objWSHNetwork = WScript.CreateObject(&#8220;WScript.Network&#8221;)<br />
strComputerName = objWSHNetwork.ComputerName<br />
Set objComputer = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName)<br />
Set objGroup = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/<span style="color: #ff0000;">Administrators</span>&#8220;)<br />
Set objUser = GetObject(&#8220;WinNT://&#8221; &amp; strComputerName &amp; &#8220;/<span style="color: #ff0000;">user1</span>&#8220;)<br />
objGroup.Add(objUser.ADsPath)<br />
objUser.SetInfo</div>
<p>To use this through Kaseya save the above as user1addadmin.vbs and upload it to the server:</p>
<div class="box">Script Name: Add user1 to admin group<br />
Script Description: Adds the local user1 account to the local admin group<br />
IF True<br />
THEN<br />
Write File<br />
Parameter 1 : c:\temp\user1addadmin.vbs<br />
Parameter 2 : <span style="color: #ff0000;">admin\VBS\</span>user1addadmin.vbs<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:\WINDOWS\system32\wscript.exe<br />
Parameter 2 : c:\temp\user1addadmin.vbs<br />
Parameter 3 : 3<br />
OS Type : 0<br />
ELSE
</div>
<p>It might also come up that you may need to remove a user from a local group. The following one line batch file can be run as a login script, batch file or ran as a shell command. It will remove the local ‘user1’ account from the local ‘administrators’ group. Again this will work for any user account and any group.  Just change the <span style="color: #ff0000;">red</span> to match your needs.</p>
<div class="box">net localgroup <span style="color: #ff0000;">administrators</span> <span style="color: #ff0000;">user1</span> /delete</div>
<p>[ad]</p>
<p>Through Kaseya the following script would accomplish this:</p>
<div class="box">Script Name: Remove the local user1 from admin group<br />
Script Description: removes the local user1 account from the admin group.</p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : NET LOCALGROUP <span style="color: #ff0000;">administrators</span> <span style="color: #ff0000;">user1</span> /delete<br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE
</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/how-to-add-and-remove-a-local-account-from-a-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Date and Time to any Batch File Output</title>
		<link>http://tehtech.com/add-date-and-time-to-any-batch-file-output/</link>
		<comments>http://tehtech.com/add-date-and-time-to-any-batch-file-output/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 14:59:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[Time]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=352</guid>
		<description><![CDATA[This trick is useful for both troubleshooting batch file tasks and when using a batch file to create a log. For example I have a scheduled task that renames some of my backup folders at night and then moved a few files around for me. When the batch file starts I uses the below code [...]]]></description>
			<content:encoded><![CDATA[<p>This trick is useful for both troubleshooting batch file tasks and when using a batch file to create a log. For example I have a scheduled task that renames some of my backup folders at night and then moved a few files around for me. When the batch file starts I uses the below code to print the time it starts, I repeat the two lines at the end of the batch file so that I can see what time the job completed. This is useful for figuring out average time of a task so that you can schedule other things without interfering.</p>
<p><span id="more-352"></span><br />
[ad]</p>
<div class="box">Date /T &gt;&gt; c:\script.log<br />
Time /T &gt;&gt; c:\script.log</div>
<p> </p>
<p>And here is what it looks like in a actual batch file:</p>
<div class="box">Echo running backup script &gt;&gt; G:\log\backup.log<br />
Date /T &gt;&gt; G:\log\backup.log<br />
Time /T &gt;&gt; G:\log\backup.log<br />
Rename f:\backup\full f:\backup\full_old<br />
md f:\backup\full<br />
Move f:\backup\full_old g:\archive<br />
Delete f:\backup\full\log.txt<br />
Echo completed at &gt;&gt; G:\log\backup.log<br />
Date /T &gt;&gt; G:\log\backup.log</div>
<div class="box">Time /T &gt;&gt; G:\log\backup.log</div>
<p> </p>
<p>The output would look like:</p>
<div class="box">Running backup script<br />
Thu 04/23/2009<br />
10:53 AM<br />
Completed at<br />
Thu 04/23/2009<br />
11:23 AM</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/add-date-and-time-to-any-batch-file-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Rename a File Over a Network Through a Batch File</title>
		<link>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/</link>
		<comments>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 04:12:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Batch]]></category>
		<category><![CDATA[Command Prompt]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=349</guid>
		<description><![CDATA[Sometime you need to rename a file or a folder that does not reside on your sever. For example I run a scheduled task on one sever to rename the folder on another server so that I can automatically archive backups weekly. Batch files or command line operations do not support UNC paths like \\myserver\my_share [...]]]></description>
			<content:encoded><![CDATA[<p>Sometime you need to rename a file or a folder that does not reside on your sever. For example I run a scheduled task on one sever to rename the folder on another server so that I can automatically archive backups weekly. Batch files or command line operations do not support UNC paths like \\myserver\my_share without taking some steps first.<br />
<span id="more-349"></span></p>
<p>[ad]</p>
<p>For this example I have a server called &#8220;server01&#8243; is is running a script that will rename a folder called &#8216;Full&#8217; that resides in a share called backup on a server called &#8216;server02&#8242;. First we map to the share, perform the operation, and then unmap the session. This method does not require a drive letter and thus works well and will never cause a DLA conflict.</p>
<p> </p>
<div class="box">net use \\server02\backup<br />
rename \\server02\backup\full \\server02\backup\archive<br />
net use /delete \\server02\backup</div>
<p>Essentially the net use function allows you to then use the path in the script. Remember that if you do not have rights to the folder you are mapping to you may need to specify them in the first line.</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/how-to-rename-a-file-over-a-network-through-a-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scripted Enumeration of Accounts with Local Admin Rights</title>
		<link>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/</link>
		<comments>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 16:15:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Local Admin]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=333</guid>
		<description><![CDATA[Beefing up security on networks keeps you from having issues in the long run. An hour today can save you three later. In a effort to improve network security and individual computer security I came up with this fancy little kaseya script.  It enumerates the local administrators on a computer and exports them to a [...]]]></description>
			<content:encoded><![CDATA[<p>Beefing up security on networks keeps you from having issues in the long run. An hour today can save you three later. In a effort to improve network security and individual computer security I came up with this fancy little kaseya script.  It enumerates the local administrators on a computer and exports them to a text file named whatever the target computer has been named. This can also be run through a batch login script. In the example below &#8220;g:&#8221; is a admin share on my local server, you can make this what ever you want or use a get file in kaseya to snatch the text file from the computer.</p>
<p><span id="more-333"></span><br />
[ad]</p>
<div class="box">Script Name: Get Local Administrators<br />
Script Description: Enumerates what users are members of the local admin group.<br />
IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : net localgroup administrators &gt;&gt; <span style="color: #ff0000;">gadmin_audit</span>%computername%.txt<br />
Parameter 2 : 1<br />
OS Type : 0<br />
ELSE</div>
<p>Here is the same thing in a batch file with mapping a share:</p>
<div class="box">Net use g: <span style="color: #ff0000;">\server01admin_share</span><br />
net localgroup administrators &gt;&gt; <span style="color: #ff0000;">gadmin_audit</span>%computername%.txt<br />
net use g: /delete</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/sripted-enumeration-of-accounts-with-local-admin-rights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Trend Micro Client/Server Security Silently Through Kaseya or a Login Script</title>
		<link>http://tehtech.com/removing-trend-micro-clientserver-security-silently-through-kaseya-or-a-login-script/</link>
		<comments>http://tehtech.com/removing-trend-micro-clientserver-security-silently-through-kaseya-or-a-login-script/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 15:44:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Anti-Virus]]></category>
		<category><![CDATA[Trend]]></category>
		<category><![CDATA[Uninstall]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=326</guid>
		<description><![CDATA[As you might have noticed from my last post I have spent some time cleaning up Trend Micro issues on my networks this week. I have a few installs that are messed up and need a reinstall so I made this. Script Name: Trend Micro Uninstall Script Description: Uninstall Trend Micro client IF True THEN [...]]]></description>
			<content:encoded><![CDATA[<p>As you might have noticed from my last post I have spent some time cleaning up Trend Micro issues on my networks this week. I have a few installs that are messed up and need a reinstall so I made this.</p>
<div class="box">Script Name: Trend Micro Uninstall<br />
Script Description: Uninstall Trend Micro client<br />
IF True<br />
THEN<br />
Set Registry Value<br />
Parameter 1 : HKEY_LOCAL_MACHINESOFTWARETrendMicroPC-cillinNTCorpCurrentVersionMisc.Allow Uninstall<br />
Parameter 2 : 1<br />
Parameter 3 : REG_DWORD<br />
OS Type : 0<br />
Execute File<br />
Parameter 1 : c:Program FilesTrend MicroClient Server Security Agentntrmv.exe<br />
Parameter 2 : /silent /noreboot<br />
Parameter 3 : 0<br />
OS Type : 0<br />
ELSE</div>
<p><span id="more-326"></span><br />
Essentially this will uninstall the trend client from the computer with no user interaction required. Though the silent switch is employed there is still a progress window that I can’t seem to suppress.</p>
<p>[ad]</p>
<p>This can be used as a login script by importing the registry key and then running the uninstaller.  Save the below as trend.reg:</p>
<div class="box">Windows Registry Editor Version 5.00<br />
[HKEY_LOCAL_MACHINESOFTWARETrendMicroPC-cillinNTCorpCurrentVersionMisc.]<br />
&#8220;Allow Uninstall&#8221;=dword:00000001</div>
<p>And run this batch file at login, change the <span style="color: #ff0000;">red </span>to match your paths:</p>
<div class="box">Regedit /s <span style="color: #ff0000;">g:registrytrend.reg</span><br />
c:Program FilesTrend MicroClient Server Security Agentntrmv.exe /silent /noreboot</div>
<p>When run on login the Trend Product will be automatically removed thus preparing the computer for a Trend reinstall, or a new anti-virus install.<br />
[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/removing-trend-micro-clientserver-security-silently-through-kaseya-or-a-login-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Enable and Disable UAC Via Login in Vista</title>
		<link>http://tehtech.com/enable-and-disable-uac-via-login-in-vista/</link>
		<comments>http://tehtech.com/enable-and-disable-uac-via-login-in-vista/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 00:44:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[UAC]]></category>
		<category><![CDATA[Vista]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=305</guid>
		<description><![CDATA[In Vista UAC (User Access Control) is both anoying and can prevent you for doing some tasks remotely. For example, Installing Trend Micro Client Security Agent is not possible over VNC if UAC is enabled. UAC will cause a window to pop up asking you to confirm that the drivers that the antivirus is trying [...]]]></description>
			<content:encoded><![CDATA[<p>In Vista UAC (User Access Control) is both anoying and can prevent you for doing some tasks remotely. For example, Installing Trend Micro Client Security Agent is not possible over VNC if UAC is enabled. UAC will cause a window to pop up asking you to confirm that the drivers that the antivirus is trying to install are legitimate. When UAC is invoked you will often lose VNC to a computer, I found that this a very common issue when installing drivers in particular. In looking for a easy way to disable UAC on a few computers while doing some maintenance I found this command line chunk.<br />
<span id="more-305"></span></p>
<p>Disable UAC:</p>
<div class="box">C:WindowsSystem32cmd.exe /k %windir%System32reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 0 /f</div>
<p>[ad]</p>
<p>Enable UAC:</p>
<div class="box">C:WindowsSystem32cmd.exe /k %windir%System32reg.exe ADD HKLMSOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem /v EnableLUA /t REG_DWORD /d 1 /f</div>
<p>Note that in Vista though this can be run from command line but if you make it a batch file you will have to right click and select &#8216;run as administrator&#8217;</p>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/enable-and-disable-uac-via-login-in-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change The Default Internet Explorer Homepage</title>
		<link>http://tehtech.com/change-the-default-internet-explorer-homepage/</link>
		<comments>http://tehtech.com/change-the-default-internet-explorer-homepage/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 01:34:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Registry]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[Internet Explorer 7]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=290</guid>
		<description><![CDATA[I have a chunk of registry tweaks I run on new computers, this is one of them. It changes the internet explorer homepage to www.google.com, though you can use anything you like in place of google, perhaps a intranet page? Windows Registry Editor Version 5.00  [HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain] &#8220;Start Page&#8221;=&#8221;www.google.com&#8220; Simple but powerful, and can be [...]]]></description>
			<content:encoded><![CDATA[<p>I have a chunk of registry tweaks I run on new computers, this is one of them.  It changes the internet explorer homepage to www.google.com, though you can use anything you like in place of google, perhaps a intranet page?</p>
<div class="box">Windows Registry Editor Version 5.00 </p>
<p>[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain]<br />
&#8220;Start Page&#8221;=&#8221;<span style="color: #ff0000;">www.google.com</span>&#8220;</div>
<p>Simple but powerful, and can be merged to the registry silently using regedit /s, or added to a list of registry hacks.</p>
<p>To use this with kaseya import the below script, change the <span style="color: #ff0000;">red</span> to your best practice and away you go.</p>
<div class="box">Script Name: Default IE Page &#8211; google<br />
Script Description: Set Default Page on Iternet Explorer.  </p>
<p>IF User Is Logged In<br />
Parameter 1 :<br />
THEN<br />
Set Registry Value<br />
Parameter 1 : HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainStart Page<br />
Parameter 2 : <span style="color: #ff0000;">http://www.google.com</span><br />
Parameter 3 : REG_SZ<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/change-the-default-internet-explorer-homepage/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding ‘Lock My Computer’ Shortcut to The Desktop</title>
		<link>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/</link>
		<comments>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 01:14:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Kaseya]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Lock]]></category>

		<guid isPermaLink="false">http://tehtech.com/?p=287</guid>
		<description><![CDATA[In a effort to increase security at one of my healthcare providers they requested a quick way their employees can lock their computers when they walk away from their computers.  I found Mklnk, it is a very tiny free utility that lets you make shortcuts from command line.  I decided to use this to accomplish this task.  I [...]]]></description>
			<content:encoded><![CDATA[<p>In a effort to increase security at one of my healthcare providers they requested a quick way their employees can lock their computers when they walk away from their computers.  I found <a title="mklnk" href="http://smithii.com/mklnk" target="_blank">Mklnk,</a> it is a very tiny free utility that lets you make shortcuts from command line.  I decided to use this to accomplish this task.  I did some research and found that the following command will lock your computer.</p>
<div class="box">rundll32.exe user32.dll,LockWorkStation</div>
<p><span id="more-287"></span><br />
So I used this with mklnk.exe to make a shortcut on the users desktop, with a lock icon.  Below is the batch file I used.  G: is a network share containing mklnk.exe.</p>
<div class="box">g:mklnk.exe -a user32.dll,LockWorkStation -i %SystemRoot%system32SHELL32.dll -n 47 %SystemRoot%system32rundll32.exe &#8220;%ALLUSERSPROFILE%DesktopLock&#8221;</div>
<p>What this does it it passes the arguments user32.dll,LockWorkStation to the rundll32.exe, and the result is a shortcut on the all user desktop called &#8220;lock&#8221; that uses shell icon 47 (a cute lock graphic).</p>
<p>To use this with kaseya you have to upload mklnk.exe to the kserver, and then import the following script.  Be sure to change the <span style="color: #ff0000;">red</span> to match the location you have uploaded mklnk.exe.</p>
<div class="box">Script Name: Lock Computer Icon on Desktop<br />
Script Description: Creates a Lock icon on the all user desktop silently </p>
<p>IF True<br />
THEN<br />
Execute Shell Command<br />
Parameter 1 : md c:temp<br />
Parameter 2 : 0<br />
OS Type : 0<br />
Write File<br />
Parameter 1 : c:tempmklnk.exe<br />
Parameter 2 : <span style="color: #ff0000;">adminutilmklnk.exe</span><br />
OS Type : 0<br />
Execute Shell Command<br />
Parameter 1 : c:tempmklnk.exe -a user32.dll,LockWorkStation -i %SystemRoot%system32SHELL32.dll -n 47 %SystemRoot%system32rundll32.exe &#8220;%ALLUSERSPROFILE%DesktopLock My Computer&#8221;<br />
Parameter 2 : 1<br />
OS Type : 0<br />
Delete File<br />
Parameter 1 : c:tempmklnk.exe<br />
OS Type : 0<br />
ELSE</div>
<p>[ad]</p>
]]></content:encoded>
			<wfw:commentRss>http://tehtech.com/adding-lock-my-computer-shortcut-to-the-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
