<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Techno Chat&#124;Tech Blog!! &#187; Scripts</title>
	<atom:link href="http://technochat.in/category/win/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://technochat.in</link>
	<description>Chat with style.. :P</description>
	<lastBuildDate>Mon, 16 Jan 2012 07:34:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
		<item>
		<title>How to stop extracting/viewing users details from AD</title>
		<link>http://technochat.in/2011/11/how-to-stop-extractingviewing-users-details-from-ad/</link>
		<comments>http://technochat.in/2011/11/how-to-stop-extractingviewing-users-details-from-ad/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 07:25:11 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Admin Tools]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[AD controkl]]></category>
		<category><![CDATA[block users view access]]></category>
		<category><![CDATA[disable AD reports extraction]]></category>
		<category><![CDATA[secure ad view]]></category>

		<guid isPermaLink="false">http://technochat.in/2011/11/how-to-stop-extractingviewing-users-details-from-ad/</guid>
		<description><![CDATA[TweetThere are several tools/script available for extracting all user information from AD. Any domain users can access this information by default. For an example, using following attached .vbs script, we can dump entire AD users base to a excel file with following fields. SamAccountName CN FirstName LastName Initials Descrip Office Telephone Email WebPage Addr1 City [...]]]></description>
			<content:encoded><![CDATA[            <a href="http://twitter.com/share" class="twitter-share-button" data-count="" data-text="How to stop extracting/viewing users details from AD" data-via="" data-url="http://technochat.in/2011/11/how-to-stop-extractingviewing-users-details-from-ad/" >Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p>There are several tools/script available for extracting all user information from AD. Any domain users can access this information by default.</p>
<p>For an example, using following attached .vbs script, we can dump entire AD users base to a excel file with following fields.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
<span id="more-1955"></span></p>
<p>SamAccountName<br />
CN<br />
FirstName<br />
LastName<br />
Initials<br />
Descrip<br />
Office<br />
Telephone<br />
Email<br />
WebPage<br />
Addr1<br />
City<br />
State<br />
ZipCode<br />
Title<br />
Department<br />
Company<br />
Manager<br />
Profile<br />
LoginScript<br />
HomeDirectory<br />
HomeDrive<br />
Adspath<br />
LastLogin<br />
Primary<br />
SMTP</p>
<p>I think, it is kind of security risk.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>This can be block, you just have to follow few steps:</p>
<p>1. You have to create a security group. Here we create <strong>blockinfo</strong> group</p>
<p><a href="http://technochat.in/wp-content/uploads/How-to-stop-extracting-users-details-fro_B4FB/image.png" rel="lightbox"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://technochat.in/wp-content/uploads/How-to-stop-extracting-users-details-fro_B4FB/image_thumb.png" alt="image" width="244" height="206" border="0" /></a></p>
<p>2. Now you have to restrict List Content and Read All Properties on OU where all users are stored and add the normal users into this group.</p>
<p><a href="http://technochat.in/wp-content/uploads/How-to-stop-extracting-users-details-fro_B4FB/image_3.png" rel="lightbox"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://technochat.in/wp-content/uploads/How-to-stop-extracting-users-details-fro_B4FB/image_thumb_3.png" alt="image" width="192" height="244" border="0" /></a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>3. To test, run the above script again, and you will get no output.</p>
<p>With this you can prevent block any reporting tool/script.. <img src='http://technochat.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2011/11/how-to-stop-extractingviewing-users-details-from-ad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>BAT/CMD Script Log Generator</title>
		<link>http://technochat.in/2009/11/batcmd-script-log-generator/</link>
		<comments>http://technochat.in/2009/11/batcmd-script-log-generator/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:18:40 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[bat log creator]]></category>
		<category><![CDATA[Batch file log generator]]></category>
		<category><![CDATA[cmd file log generator]]></category>
		<category><![CDATA[generate batch script log]]></category>
		<category><![CDATA[Script Log Generator]]></category>
		<category><![CDATA[wintee]]></category>
		<category><![CDATA[wtee]]></category>
		<category><![CDATA[wtee log generator]]></category>

		<guid isPermaLink="false">http://technochat.in/2009/11/batcmd-script-log-generator/</guid>
		<description><![CDATA[BAT/CMD scripts are very much helpful to do a monotonous job automatically and sometimes the outputs of the batch script file are very much required. We can generate log file from batch file, but we can't get the 100% log within batch file, so I was looking for a tool which generate log files from [...]]]></description>
			<content:encoded><![CDATA[<p>BAT/CMD scripts are very much helpful to do a monotonous job automatically and sometimes the outputs of the batch script file are very much required. We can generate log file from batch file, but we can't get the 100% log within batch file, so I was looking for a tool which generate log files from a batch script. After a few search, finally I found a tiny utility called <strong>wtee.exe </strong>on <a href="http://code.google.com/p/wintee/" target="_blank"><span style="color:black">wintee</span></a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>To use it properly, I have created a batch file with which u can execute any batch script, and after executing the batch file it will automatically archive the entire output log, also there is an option to send mail notification with the output file as mail attachment (optional). For sending mail notification I used <strong>blat.exe </strong>from <a href="http://www.blat.net" target="_blank">www.<strong>blat</strong>.net</a><em>.</em></p>
<p><em><span id="more-626"></span><br />
</em></p>
<p>Default settings are followsâ€¦</p>
<p>REM Settings Start<br />
::Set Destination, source drive, and restore folder<br />
set LogPath=D:\TCleanLog<br />
set LogName=TempCleanLog<br />
set LogExt=.log<br />
set WinTee=wtee.exe<br />
::Here specify your BAT/CMD Script File<br />
<strong>set CallBAT=D:\AutoTempCleanUp.bat</strong><br />
::E-Mail Settings (SMTP)<br />
::----------x---------<br />
::If 'yes' a mail will be fired after backup<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set _mailnotification=yes<br />
::If 'yes' backup log will attached with mail<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set attachment=no<br />
::Type your e-mail address(for multiple e-mail ID, use ',')<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set email=To Mail Adress<br />
:: Type from mail ID<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set from=From Mail Address<br />
::Set SMTP Server IP Address<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set mserver=Your Mail Server IP<br />
REM Settings End</p>
<p>Here is the complete scriptâ€¦</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p626code2'); return false;">View Code</a> WINBATCH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p6262"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p626code2"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=100 LINES=10</span>
color 0c
title <span style="color: #66cc66;">~</span><span style="color: #FF1010; font-weight: bold;">: BAT File Log Generator :~</span>
REM Settings Start
<span style="color: #FF1010; font-weight: bold;">::Set Destination, source drive, and restore folder</span>
set LogPath=D<span style="color: #FF1010; font-weight: bold;">:\TCleanLog</span>
set LogName=TempCleanLog
set LogExt=.log
set WinTee=wtee.exe
<span style="color: #FF1010; font-weight: bold;">::Here specify your BAT/CMD Script File</span>
set CallBAT=D<span style="color: #FF1010; font-weight: bold;">:\AutoTempCleanUp.bat</span>
<span style="color: #FF1010; font-weight: bold;">::E-Mail Settings (SMTP)</span>
<span style="color: #FF1010; font-weight: bold;">::----------x---------</span>
<span style="color: #FF1010; font-weight: bold;">::If 'yes' a mail will be fired after backup</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set _mailnotification=<span style="color: #0080FF; font-weight: bold;">yes</span>
<span style="color: #FF1010; font-weight: bold;">::If 'yes' backup log will attached with mail</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set attachment=<span style="color: #0080FF; font-weight: bold;">no</span>
<span style="color: #FF1010; font-weight: bold;">::Type your e-mail address(for multiple e-mail ID, use ',')</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set email=<span style="color: #800080;">To</span> Mail Adress
<span style="color: #FF1010; font-weight: bold;">:: Type from mail ID</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set from=From Mail Address
<span style="color: #FF1010; font-weight: bold;">::Set SMTP Server IP Address</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set mserver=Your Mail <span style="color: #0080FF; font-weight: bold;">Server</span> IP
REM Settings <span style="color: #800080;">End</span>
<span style="color: #FF1010; font-weight: bold;">:: get the date and time and then into single variable</span>
<span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>F <span style="color: #ff0000;">&quot;tokens=1-4 delims=/ &quot;</span> <span style="color: #66cc66;">%%</span>i <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'date /t'</span><span style="color: #66cc66;">&#41;</span> do <span style="color: #66cc66;">&#40;</span>
set MM=<span style="color: #66cc66;">%%</span>j
set DD=<span style="color: #66cc66;">%%</span>k
set YYYY=<span style="color: #66cc66;">%%</span>l
set date=<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">-%%</span>j<span style="color: #66cc66;">-%%</span>l
set dirdate=<span style="color: #66cc66;">%%</span>j<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">%%</span>l
<span style="color: #66cc66;">&#41;</span>
<span style="color: #FF1010; font-weight: bold;">::Calling BAT /CMD File</span>
<span style="color: #800080;">call</span> <span style="color: #66cc66;">%</span>CallBAT<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">|</span> <span style="color: #66cc66;">%</span>WinTee<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">%</span>LogPath<span style="color: #66cc66;">%</span>\<span style="color: #66cc66;">%</span>LogName<span style="color: #66cc66;">%</span>_<span style="color: #66cc66;">%</span>date<span style="color: #66cc66;">%%</span>LogExt<span style="color: #66cc66;">%</span>
<span style="color: #FF1010; font-weight: bold;">::Full Log Path</span>
set flog=<span style="color: #66cc66;">%</span>LogPath<span style="color: #66cc66;">%</span>\<span style="color: #66cc66;">%</span>LogName<span style="color: #66cc66;">%</span>_<span style="color: #66cc66;">%</span>date<span style="color: #66cc66;">%%</span>LogExt<span style="color: #66cc66;">%</span>
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%_mailnotification%&quot;</span> == <span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #800080;">goto</span> _end
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%attachment%&quot;</span> == <span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #800080;">goto</span> _noattach
blat <span style="color: #ff0000;">&quot;%flog%&quot;</span> <span style="color: #66cc66;">-</span>attach <span style="color: #ff0000;">&quot;%flog%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #800080;">to</span> <span style="color: #66cc66;">%</span>email<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">-</span>s <span style="color: #ff0000;">&quot;%LogName% of %date%&quot;</span> <span style="color: #66cc66;">-</span>f <span style="color: #ff0000;">&quot;%from%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #0080FF; font-weight: bold;">server</span> <span style="color: #ff0000;">&quot;%mserver%&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">; nul</span>
<span style="color: #800080;">goto</span> _skip
<span style="color: #FF1010; font-weight: bold;">:_noattach</span>
blat <span style="color: #ff0000;">&quot;%flog%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #800080;">to</span> <span style="color: #66cc66;">%</span>email<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">-</span>s <span style="color: #ff0000;">&quot;%LogName% of %date%&quot;</span> <span style="color: #66cc66;">-</span>f <span style="color: #ff0000;">&quot;%from%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #0080FF; font-weight: bold;">server</span> <span style="color: #ff0000;">&quot;%mserver%&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">; nul</span>
<span style="color: #FF1010; font-weight: bold;">:_end</span>
<span style="color: #800080;">exit</span></pre></td></tr></table></div>

<p>Download <strong>wtee.exe </strong>and <strong>blat.exe </strong>from following link and extract it to windows directory.<br />
Note: There is a file embedded within this post, please visit this post to download the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/11/batcmd-script-log-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>AJAX Web Chat Server with Active Directory Authentication</title>
		<link>http://technochat.in/2009/08/ajax-web-chat-server-with-active-directory-authentication/</link>
		<comments>http://technochat.in/2009/08/ajax-web-chat-server-with-active-directory-authentication/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 12:52:15 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Active Directory Chat]]></category>
		<category><![CDATA[AD Chat]]></category>
		<category><![CDATA[AJAX Chat]]></category>
		<category><![CDATA[AJAX Chat - Open Source Web Chat]]></category>
		<category><![CDATA[AJAX Chat Server]]></category>
		<category><![CDATA[AJAX Chat with LDAP]]></category>
		<category><![CDATA[Chat Server with Active Directory Authentication]]></category>
		<category><![CDATA[Chat Server with Active LDAP Authentication]]></category>
		<category><![CDATA[ChatServer with AD Authentication]]></category>
		<category><![CDATA[Easy Chat]]></category>
		<category><![CDATA[Enterprise Chat Server]]></category>
		<category><![CDATA[Free Chat Server]]></category>
		<category><![CDATA[Free Web Chat Server]]></category>
		<category><![CDATA[freen Enterprise Chat Server]]></category>
		<category><![CDATA[LAN Chat]]></category>
		<category><![CDATA[Lan chat server]]></category>
		<category><![CDATA[LAN Messanger]]></category>
		<category><![CDATA[lan talk]]></category>
		<category><![CDATA[PHPBB3 LDAP Authentication]]></category>
		<category><![CDATA[PHPBB3 LDAP Tutorial]]></category>

		<guid isPermaLink="false">http://technochat.in/2009/08/ajax-web-chat-server-with-active-directory-authentication/</guid>
		<description><![CDATA[Again, as per business requirement, we are looking for some free internal (LAN) chat solution. There are some free LAN chat tools available but most of them are failed to detect multiple VLAN, only working fine in single VLAN. But we need something which can be implemented on more than 50 branches across India. So [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify">Again, as per business requirement, we are looking for some free internal (LAN) chat solution. There are some free LAN chat tools available but most of them are failed to detect multiple VLAN, only working fine in single VLAN.</p>
<p style="text-align: justify"><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p style="text-align: justify">But we need something which can be implemented on more than 50 branches across India. So we are looking for a free chat server. There are some chat servers available, but none of them support Active Directory (LDAP) authentication.</p>
<p style="text-align: justify">Suddenly we found a solution, actually it's not a single solution, it a combine solution of PHPBB3 and AJAX Chat.</p>
<p style="text-align: justify"><span id="more-517"></span></p>
<p style="text-align: justify"><span style="text-decoration: underline;"><strong>Requirements:<br />
</strong></span></p>
<ul>
<li>
<div style="text-align: justify"><a href="http://www.php.net/" target="_blank">PHP</a></div>
</li>
<li>
<div style="text-align: justify"><a href="http://www.mysql.com/" target="_blank">MySql</a></div>
</li>
<li>
<div style="text-align: justify"><a href="http://www.phpbb.com/" target="_blank">PHPBB3</a> with LDAP Authentication</div>
</li>
<li>
<div style="text-align: justify"><a href="https://blueimp.net/ajax/" target="_blank">AJAX Chat</a></div>
</li>
</ul>
<p style="text-align: justify">For PHP and MySql with Apache web Server you can use <a href="http://www.wampserver.com/en/" target="_blank">Wamp Server</a>.</p>
<p style="text-align: justify"><span style="text-decoration: underline;"><strong>Instalation:<br />
</strong></span></p>
<p style="text-align: justify">You have to install PHPBB3 first, for PHPBB3 installation help click <a href="http://www.phpbb.com/community/docs/INSTALL.html" target="_blank">here</a>.</p>
<p style="text-align: justify">Now you have to set Active Directory authentication for PHPBB3. For that first you have to enable LDAP extension on php and you have to create a user id in active directory with password never expire enabled. Then you have to create the same id in PHPBB3, if you decided to use <strong>displayName </strong>as all users ID then you have create that ID same as <strong>displayName </strong>or else you can use <strong>sAMAccountName </strong>as all users logon id, for that case you have to create that ID same as <strong>sAMAccountName</strong>.</p>
<p style="text-align: justify">For e.g., you create the ID as <strong>PHPBB User </strong>and its logon id is <strong>phpuse</strong>, in this case <strong>displayName = PHPBB User </strong>and<strong> sAMAccountName = phpuse</strong>.*</p>
<p style="text-align: justify">After that you have to give founder permission on PHPBB3 on that ID, and logon with that ID in phpbb, then goto ACP&gt;General&gt;Authentication, Select an authentication method as <strong>LDAP </strong>and use following as per your domain.</p>
<p>LDAP server name: <strong>Your Active Directory Server IP</strong><br />
LDAP server port: <strong>Port will be default</strong><br />
LDAP base <em>dn</em>: <strong>DC=donainname,DC=com</strong><br />
LDAP <em>uid</em>: <strong>displayName or sAMAccountName *</strong><br />
LDAP user filter: <strong>ObjectClass=person</strong><br />
LDAP e-mail attribute: <strong>mail **</strong><br />
LDAP user <em>dn</em>: <strong>cn=username,ou=ou name,dc=domain,dc=com</strong><br />
LDAP password: <strong>Password of above user id.</strong></p>
<p>If you specify everything properly, then you will get following screen.</p>
<p><a href="http://technochat.in/wp-content/uploads/2009/08/ldap.bmp" rel="lightbox[517]"><img class="alignnone size-full wp-image-520" title="ldap" src="http://technochat.in/wp-content/uploads/2009/08/ldap.bmp" alt="ldap" width="253" height="37" /></a></p>
<p><span style="text-decoration: underline;">Note:<br />
</span> *If you set displayName in LDAP uid, then user id will be their domain Display Name, and if you set sAMAccountName then user id will be domain logon id.<br />
**We have Exchange Server in our network so for that we use <strong>mail </strong>as e-mail attribute.</p>
<p>Now you have to install AJAX Chat on PHPBB3, download AJAX Chat from bellow link, and extract it into PHPBB3 install directory and execute following path.<br />
<a href="http://example.org/phpBB3/chat/install.php">http://example.org/phpBB3/chat/install.php</a></p>
<p>For further details, read supplied <strong>readme.txt</strong></p>
<p><strong>Download(</strong>with Small modification<strong>):<br />
</strong>Note: There is a file embedded within this post, please visit this post to download the file.<strong><br />
</strong></p>
<p>All Done,</p>
<p><span><!-- BEGIN STANDARD TAG - 300 x 250 - technochat.in: Run-of-site - DO NOT MODIFY -->
<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="http://ad.antventure.com/st?ad_type=iframe&ad_size=300x250&section=758500"></IFRAME>
<!-- END TAG --></span></p>
<p>Now go to <a href="http://example.org/phpBB3/">http://example.org/phpBB3/chat</a> and logon with any domain user id and password.</p>
<p><a href="http://technochat.in/wp-content/uploads/2009/08/logon.png" rel="lightbox[517]"><img class="alignnone size-full wp-image-529" title="logon" src="http://technochat.in/wp-content/uploads/2009/08/logon.png" alt="logon" width="125" height="227" /></a></p>
<p>After logon u can easily chat with others... <span style="font-family:Wingdings"> <img src='http://technochat.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p><a href="http://technochat.in/wp-content/uploads/2009/08/mainroom.png" rel="lightbox[517]"><img class="alignnone size-full wp-image-526" title="mainroom" src="http://technochat.in/wp-content/uploads/2009/08/mainroom.png" alt="mainroom" width="361" height="175" /></a></p>
<p>I think this is the easiest way to install chat server on your organization for freeâ€¦<br />
<span><!-- BEGIN STANDARD TAG - 300 x 250 - technochat.in: Run-of-site - DO NOT MODIFY -->
<IFRAME FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=300 HEIGHT=250 SRC="http://ad.antventure.com/st?ad_type=iframe&ad_size=300x250&section=758500"></IFRAME>
<!-- END TAG --></span></p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/08/ajax-web-chat-server-with-active-directory-authentication/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Shared TempDrive Cleanup Script &#8211; Automated</title>
		<link>http://technochat.in/2009/07/share-tempdrive-cleanup-script-automated/</link>
		<comments>http://technochat.in/2009/07/share-tempdrive-cleanup-script-automated/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 11:24:50 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Admin Tools]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[date variable]]></category>
		<category><![CDATA[delete all folder content]]></category>
		<category><![CDATA[share backup]]></category>
		<category><![CDATA[temp cleanup]]></category>
		<category><![CDATA[TempDrive]]></category>

		<guid isPermaLink="false">http://technochat.in/2009/07/share-tempdrive-cleanup-script-automated/</guid>
		<description><![CDATA[Sometimes it's not possible to remember a specific weekly job to perform. So if we can make it as scheduled job to do the same, it will be better. There will be not such risk. Just take my example, I have to clean our office common shared temporary folder on every Sunday, but I am [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it's not possible to remember a specific weekly job to perform. So if we can make it as scheduled job to do the same, it will be better. There will be not such risk. Just take my example, I have to clean our office common shared temporary folder on every Sunday, but I am not in office on Sunday. So, I have two options to do the same, first, I have to call our DCO Support and instruct them to get the job done, and if I go with this option there will be lots of dependencies, or else I have to create a script which will do the job automatically.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
So I decided to go for second option. With second option I have to make sure following things should be perform.</p>
<ul>
<li>I just can't delete all files &amp; folder from temp drive, coz there might came some requirement to recover files from last week temp drive(Yes, everyone aware of the temp drive policy). So, I have to copy all the content of the Temp Drive to a different location.</li>
<li>I have to create a folder with date stamp, eg. Folder_date (tempbkp_23-09-2009). So, I have to create a specific date variable.</li>
<li>After copy all content of the temp drive to other location, I have to give <strong>Everyone â€“ Read only permission</strong> to that folder and then have to share that folder as well.</li>
<li>Delete all files and folder from temp drive. Yea, as per my knowledge, there is no such command available on windows by which I can delete all files and folder from a specific folder or a specific map drive. (Soâ€¦..time to think some alternatives)</li>
<li>Now the critical part, on next scheduled date, this script will automatically delete last backup folder, and create a new folder for latest backup.</li>
</ul>
<p>And finally I made it with considering all above requirement without using any third part tools<span style="font-family:Wingdings">J</span>. And as of now it's working properly, check out the script bellow.<br />
<span id="more-483"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p483code4'); return false;">View Code</a> WINBATCH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4834"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p483code4"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
<span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=100 LINES=10</span>
color 0c
title <span style="color: #66cc66;">~</span><span style="color: #FF1010; font-weight: bold;">: Auto TempFile Cleanup By TechnoChat.IN :~</span>
<span style="color: #FF1010; font-weight: bold;">::Set Destination and source drive</span>
set localdrive=D<span style="color: #FF1010; font-weight: bold;">:\</span>
set tempdrive=Z<span style="color: #FF1010; font-weight: bold;">:\</span>
<span style="color: #FF1010; font-weight: bold;">:: get the date and time and then into single variable</span>
<span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>F <span style="color: #ff0000;">&quot;tokens=1-4 delims=/ &quot;</span> <span style="color: #66cc66;">%%</span>i <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'date /t'</span><span style="color: #66cc66;">&#41;</span> do <span style="color: #66cc66;">&#40;</span>
set MM=<span style="color: #66cc66;">%%</span>j
set DD=<span style="color: #66cc66;">%%</span>k
set YYYY=<span style="color: #66cc66;">%%</span>l
set date=<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">-%%</span>j<span style="color: #66cc66;">-%%</span>l
set dirdate=<span style="color: #66cc66;">%%</span>j<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">%%</span>l
<span style="color: #66cc66;">&#41;</span>
set fullpath=<span style="color: #66cc66;">%</span>localdrive<span style="color: #66cc66;">%</span>TempBKP_<span style="color: #66cc66;">%</span>date<span style="color: #66cc66;">%</span>
set sname=TempBKP
<span style="color: #FF1010; font-weight: bold;">::Get the old Backup path from registry.</span>
<span style="color: #800080;">FOR</span> <span style="color: #66cc66;">/</span>F <span style="color: #ff0000;">&quot;TOKENS=3*&quot;</span> <span style="color: #66cc66;">%%</span>i <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'reg query &quot;HKEY_CURRENT_USER\SOFTWARE\Microsoft&quot; /v Path ^| FINDSTR &quot;REG_SZ&quot; '</span><span style="color: #66cc66;">&#41;</span> do set outpath=<span style="color: #ff0000;">&quot;%%i%%j&quot;</span>
<span style="color: #FF1010; font-weight: bold;">::Removing the old backup share</span>
<span style="color: #800080;">if</span> exist <span style="color: #66cc66;">%</span>outpath<span style="color: #66cc66;">%</span> net share <span style="color: #66cc66;">%</span>sname<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>delete
<span style="color: #FF1010; font-weight: bold;">::Removing old backup folder</span>
<span style="color: #800080;">if</span> exist <span style="color: #66cc66;">%</span>outpath<span style="color: #66cc66;">%</span> rmdir <span style="color: #66cc66;">%</span>outpath<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>S <span style="color: #66cc66;">/</span>Q
<span style="color: #FF1010; font-weight: bold;">::Creatiing the the New backup folder</span>
mkdir <span style="color: #66cc66;">%</span>fullpath<span style="color: #66cc66;">%</span>
<span style="color: #FF1010; font-weight: bold;">::Adding the New backup path into registry</span>
REG ADD <span style="color: #ff0000;">&quot;HKEY_CURRENT_USER\Software\Microsoft&quot;</span> <span style="color: #66cc66;">/</span>v Path <span style="color: #66cc66;">/</span>t REG_SZ <span style="color: #66cc66;">/</span>d <span style="color: #66cc66;">%</span>fullpath<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>f <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
echo Copying files from Source <span style="color: #66cc66;">%</span>tempdrive<span style="color: #66cc66;">%</span> <span style="color: #800080;">to</span> Destination <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">%</span>fullpath<span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #FF1010; font-weight: bold;">::Copying the files from TEMP Drive to Local Drive location</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%tempdrive%&quot;</span> <span style="color: #ff0000;">&quot;%fullpath%&quot;</span>
<span style="color: #FF1010; font-weight: bold;">::Setting the permission to readonly for hole folder</span>
cacls <span style="color: #66cc66;">%</span>fullpath<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>t <span style="color: #66cc66;">/</span>g Everyone<span style="color: #FF1010; font-weight: bold;">:r</span>
<span style="color: #FF1010; font-weight: bold;">::Sharing the folder</span>
net share <span style="color: #66cc66;">%</span>sname<span style="color: #66cc66;">%</span>=<span style="color: #66cc66;">%</span>fullpath<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>remark<span style="color: #FF1010; font-weight: bold;">:&quot;TempDrive Backup Share&quot;</span>
<span style="color: #FF1010; font-weight: bold;">::Removing the temp drive contents</span>
<span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>f <span style="color: #ff0000;">&quot;delims=&quot;</span> <span style="color: #66cc66;">%%</span>a <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'dir /b /ad &quot;%tempdrive%&quot; 2^&amp;gt;NUL'</span><span style="color: #66cc66;">&#41;</span> do rmdir <span style="color: #66cc66;">/</span>S <span style="color: #66cc66;">/</span>Q <span style="color: #ff0000;">&quot;%tempdrive%\%%a&quot;</span>
del <span style="color: #66cc66;">%</span>tempdrive<span style="color: #66cc66;">%*</span>.<span style="color: #66cc66;">*</span> <span style="color: #66cc66;">/</span>S <span style="color: #66cc66;">/</span>Q <span style="color: #66cc66;">/</span>F</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/07/share-tempdrive-cleanup-script-automated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Automatic NT-Backup (System State Backup) with retention period and e-mail notification after complete.</title>
		<link>http://technochat.in/2009/03/automatic-nt-backup-system-state-backup-with-retention-period-and-e-mail-notification-after-complete/</link>
		<comments>http://technochat.in/2009/03/automatic-nt-backup-system-state-backup-with-retention-period-and-e-mail-notification-after-complete/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 11:48:12 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Auto Backup]]></category>
		<category><![CDATA[Auto Backup Manager]]></category>
		<category><![CDATA[Dynamic Backup]]></category>
		<category><![CDATA[Dynamic NTBackup]]></category>
		<category><![CDATA[Everyday Auto Backup]]></category>
		<category><![CDATA[ntbackup]]></category>
		<category><![CDATA[ntbackup batch file/script]]></category>
		<category><![CDATA[NTBACKUP script]]></category>
		<category><![CDATA[NTbackup script with the current date/time]]></category>
		<category><![CDATA[system state backup]]></category>

		<guid isPermaLink="false">http://technochat.in/2009/03/automatic-nt-backup-system-state-backup-with-retention-period-and-e-mail-notification-after-complete/</guid>
		<description><![CDATA[A simple script for automatic System State backup where you can easily set backup retention period and it also send you an e-mail notification after completion. With this script you can also archive backup log and if you wish u can also set backup log retention period. It can also set backup files with date [...]]]></description>
			<content:encoded><![CDATA[<p>A simple script for automatic System State backup where you can easily set backup retention period and it also send you an e-mail notification after completion. With this script you can also archive backup log and if you wish u can also set backup log retention period. It can also set backup files with date stamp.<br />
For e.g., <strong>SysBackup_ComputerName_24-03-2009.bkf</strong><br />
You need two small utility,</p>
<ul>
<li><strong>Blat.exe </strong>for sending mail, you can get details from <a href="http://www.blat.net/" target="_blank">here</a>.</li>
<li><strong>Forfiles.exe </strong>for checking old files, you can get details from <a href="http://technet.microsoft.com/en-us/library/cc753551.aspx" target="_blank">here</a>.</li>
</ul>
<p>Just download following zip file and extract its content to <strong>%windir%\</strong> or <strong>%windir%\system32</strong> folder.<br />
Note: There is a file embedded within this post, please visit this post to download the file.<br />
<strong>Mail Notification<br />
<img src="http://technochat.in/wp-content/uploads/2009/03/032509-1147-automaticnt1.png" alt="" width="350" height="278" /><br />
</strong><br />
<span id="more-455"></span><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<strong>Following are the basic Backup Settings<br />
</strong></p>
<p>::Backup Settings START<br />
::Set Backup Path<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set savepath=D:\TestBackup<br />
::Set Backup Name<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set backupname=SysBackup<br />
::Set Backup Retention Period(in days)<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set retention=3<br />
::Set Log Archive Path(Only Folder Name)<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set logarchivepath=BackupLog<br />
::If 'yes' then backup log retention will enabled<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set logretention=yes<br />
::If avove settings is "yes" then set log Retention Period(in days)<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set logretentionperiod=3<br />
::----------x---------<br />
::E-Mail Settings (SMTP without authentication will work)<br />
::----------x---------<br />
::If 'yes' a mail will be fired after backup<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set _mailnotification=yes<br />
::If 'yes' backup log will attached with mail<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set attachment=no<br />
::Type your e-mail address(for multiple e-mail ID, use ',')<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set email=urname@domain.com<br />
:: Type from mail ID<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set from=%computername%@TC-Auto-NTBackUP<br />
::Set SMTP Server IP Address<br />
::~~~~~~~~~~~~~~~~~~~~<br />
set mserver=10.0.0.1<br />
::Backup Settings END</p>
<p>Batchfile <strong>NTBackup.bat<br />
</strong></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p455code6'); return false;">View Code</a> WINBATCH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4556"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p455code6"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
color 0c
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=50 LINES=11</span>
echo <span style="color: #66cc66;">***************************************</span>
echo Auto SystemState Backup with Retention
echo Log Archive and Mail Notification
echo Code <span style="color: #800080;">By</span> <span style="color: #FF1010; font-weight: bold;">: Saugata Datta</span>
echo <span style="color: #66cc66;">~~~</span>
echo <span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span> <span style="color: #0080FF; font-weight: bold;">http</span><span style="color: #FF1010; font-weight: bold;">://technochat.in</span>
echo Date<span style="color: #FF1010; font-weight: bold;">: %DATE%, Time: %TIME%</span>
echo <span style="color: #66cc66;">***************************************</span>
<span style="color: #FF1010; font-weight: bold;">::Backup Settings START</span>
<span style="color: #FF1010; font-weight: bold;">::Set Backup Path</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set savepath=D<span style="color: #FF1010; font-weight: bold;">:\TestBackup</span>
<span style="color: #FF1010; font-weight: bold;">::Set Backup Name</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set backupname=SysBackup
<span style="color: #FF1010; font-weight: bold;">::Set Backup Retention Period(in days)</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set retention=<span style="color: #cc66cc;">3</span>
<span style="color: #FF1010; font-weight: bold;">::Set Log Archive Path(Only Folder Name)</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set logarchivepath=BackupLog
<span style="color: #FF1010; font-weight: bold;">::If 'yes' then backup log retention will enabled</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set logretention=<span style="color: #0080FF; font-weight: bold;">yes</span>
<span style="color: #FF1010; font-weight: bold;">::If avove settings is &quot;yes&quot; then set log Retention Period(in days)</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set logretentionperiod=<span style="color: #cc66cc;">3</span>
<span style="color: #FF1010; font-weight: bold;">::----------x---------</span>
<span style="color: #FF1010; font-weight: bold;">::E-Mail Settings (SMTP without authentication will work)</span>
<span style="color: #FF1010; font-weight: bold;">::----------x---------</span>
<span style="color: #FF1010; font-weight: bold;">::If 'yes' a mail will be fired after backup</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set _mailnotification=<span style="color: #0080FF; font-weight: bold;">yes</span>
<span style="color: #FF1010; font-weight: bold;">::If 'yes' backup log will attached with mail</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set attachment=<span style="color: #0080FF; font-weight: bold;">no</span>
<span style="color: #FF1010; font-weight: bold;">::Type your e-mail address(for multiple e-mail ID, use ',')</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set email=saugata.datta<span style="color: #66cc66;">@</span>technochat.<span style="color: #800080;">in</span>
<span style="color: #FF1010; font-weight: bold;">:: Type from mail ID</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set from=<span style="color: #66cc66;">%</span>computername<span style="color: #66cc66;">%@</span>FC<span style="color: #66cc66;">-</span>Auto<span style="color: #66cc66;">-</span>NTBackUP
<span style="color: #FF1010; font-weight: bold;">::Set SMTP Server IP Address</span>
<span style="color: #FF1010; font-weight: bold;">::~~~~~~~~~~~~~~~~~~~~</span>
set mserver=10.0.0.6
<span style="color: #FF1010; font-weight: bold;">::Backup Settings END</span>
<span style="color: #FF1010; font-weight: bold;">::--------------------------------</span>
<span style="color: #FF1010; font-weight: bold;">::Don't change following lines.</span>
<span style="color: #FF1010; font-weight: bold;">::--------------------------------</span>
forfiles <span style="color: #66cc66;">-</span>p <span style="color: #ff0000;">&quot;%savepath%&quot;</span> <span style="color: #66cc66;">/</span>m <span style="color: #66cc66;">*</span>.bkf <span style="color: #66cc66;">/</span>s <span style="color: #66cc66;">/</span>d <span style="color: #66cc66;">-%</span>retention<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>c <span style="color: #ff0000;">&quot;cmd /C del @FILE&quot;</span>
<span style="color: #FF1010; font-weight: bold;">:: get the date and time and then into single variable</span>
<span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>F <span style="color: #ff0000;">&quot;tokens=1-4 delims=/ &quot;</span> <span style="color: #66cc66;">%%</span>i <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'date /t'</span><span style="color: #66cc66;">&#41;</span> do <span style="color: #66cc66;">&#40;</span>
set MM=<span style="color: #66cc66;">%%</span>j
set DD=<span style="color: #66cc66;">%%</span>k
set YYYY=<span style="color: #66cc66;">%%</span>l
set date=<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">-%%</span>j<span style="color: #66cc66;">-%%</span>l
set dirdate=<span style="color: #66cc66;">%%</span>j<span style="color: #66cc66;">%%</span>k<span style="color: #66cc66;">%%</span>l
<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">for</span> <span style="color: #66cc66;">/</span>f <span style="color: #ff0000;">&quot;Tokens=1-2 delims=/ &quot;</span> <span style="color: #66cc66;">%%</span>i <span style="color: #800080;">in</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'time /t'</span><span style="color: #66cc66;">&#41;</span> do <span style="color: #66cc66;">&#40;</span>
set tm=<span style="color: #66cc66;">%%</span>i
set ampm=<span style="color: #66cc66;">%%</span>j
<span style="color: #66cc66;">&#41;</span>
<span style="color: #FF1010; font-weight: bold;">::Deleting Old Backup Log files</span>
<span style="color: #800080;">if</span> not exist <span style="color: #ff0000;">&quot;%SystemDrive%%HOMEPATH%\Local Settings\Application Data\Microsoft\Windows NT\NTbackup\Data\*.log&quot;</span> <span style="color: #800080;">goto</span> _nodel
del <span style="color: #ff0000;">&quot;%SystemDrive%%HOMEPATH%\Local Settings\Application Data\Microsoft\Windows NT\NTbackup\Data\*.log&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
<span style="color: #FF1010; font-weight: bold;">:_nodel</span>
ntbackup.exe backup systemstate <span style="color: #66cc66;">/</span>v<span style="color: #FF1010; font-weight: bold;">:no /r:no /rs:no /hc:off /J %backupname% /l:s /f &quot;%savepath%\%backupname%_%computername%_%date%.bkf&quot;</span>
<span style="color: #800080;">if</span> not exist <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%&quot;</span> md <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
move <span style="color: #ff0000;">&quot;%SystemDrive%%HOMEPATH%\Local Settings\Application Data\Microsoft\Windows NT\NTbackup\Data\*.log&quot;</span> <span style="color: #66cc66;">%</span>savepath<span style="color: #66cc66;">%</span>\<span style="color: #66cc66;">%</span>logarchivepath<span style="color: #66cc66;">%</span>\<span style="color: #66cc66;">%</span>backupname<span style="color: #66cc66;">%</span>_<span style="color: #66cc66;">%</span>computername<span style="color: #66cc66;">%</span>_<span style="color: #66cc66;">%</span>date<span style="color: #66cc66;">%</span>.txt <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%_mailnotification%&quot;</span> == <span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #800080;">goto</span> _end
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%attachment%&quot;</span> == <span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #800080;">goto</span> _noattach
blat <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%\%backupname%_%computername%_%date%.txt&quot;</span> <span style="color: #66cc66;">-</span>attach <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%\%backupname%_%computername%_%date%.txt&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #800080;">to</span> <span style="color: #66cc66;">%</span>email<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">-</span>s <span style="color: #ff0000;">&quot;NT Backup Success/Failure Report of %computername%&quot;</span> <span style="color: #66cc66;">-</span>f <span style="color: #ff0000;">&quot;%from%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #0080FF; font-weight: bold;">server</span> <span style="color: #ff0000;">&quot;%mserver%&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">; nul</span>
<span style="color: #800080;">goto</span> _skip
<span style="color: #FF1010; font-weight: bold;">:_noattach</span>
blat <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%\%backupname%_%computername%_%date%.txt&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #800080;">to</span> <span style="color: #66cc66;">%</span>email<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">-</span>s <span style="color: #ff0000;">&quot;NT Backup Success/Failure Report of %computername%&quot;</span> <span style="color: #66cc66;">-</span>f <span style="color: #ff0000;">&quot;%from%&quot;</span> <span style="color: #66cc66;">-</span><span style="color: #0080FF; font-weight: bold;">server</span> <span style="color: #ff0000;">&quot;%mserver%&quot;</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">; nul</span>
<span style="color: #FF1010; font-weight: bold;">:_skip</span>
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%logretention%&quot;</span> == <span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #800080;">goto</span> _end
forfiles <span style="color: #66cc66;">-</span>p <span style="color: #ff0000;">&quot;%savepath%\%logarchivepath%&quot;</span> <span style="color: #66cc66;">/</span>m <span style="color: #66cc66;">*</span>.txt <span style="color: #66cc66;">/</span>s <span style="color: #66cc66;">/</span>d <span style="color: #66cc66;">-%</span>logretentionperiod<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">/</span>c <span style="color: #ff0000;">&quot;cmd /C del @FILE&quot;</span>
<span style="color: #FF1010; font-weight: bold;">:_end</span>
<span style="color: #800080;">exit</span></pre></td></tr></table></div>

<p><span style="text-decoration: underline;"><strong>Now you have to create a schedule for daily backup.<br />
</strong></span></p>
<p><img src="http://technochat.in/wp-content/uploads/2009/03/032509-1147-automaticnt2.png" alt="" /><br />
<img src="http://technochat.in/wp-content/uploads/2009/03/032509-1147-automaticnt3.png" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/03/automatic-nt-backup-system-state-backup-with-retention-period-and-e-mail-notification-after-complete/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Simple script for Windows Profile Backup and Restore</title>
		<link>http://technochat.in/2009/03/simple-script-for-windows-profile-backup-and-restore/</link>
		<comments>http://technochat.in/2009/03/simple-script-for-windows-profile-backup-and-restore/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 15:23:09 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Auto Backup]]></category>
		<category><![CDATA[backup and restore script]]></category>
		<category><![CDATA[profile backup]]></category>
		<category><![CDATA[windows XP user profile backup]]></category>

		<guid isPermaLink="false">http://technochat.in/?p=443</guid>
		<description><![CDATA[Windows Profile Backup and Restore for Win 2000/XP]]></description>
			<content:encoded><![CDATA[<p>A very simple script for automate user profile backup and restore. Easy to use, and highly customizable, so you can modify it as per your needs.</p>
<p><img class="alignnone size-full wp-image-442" title="backup" src="http://technochat.in/wp-content/uploads/2009/03/backup.jpg" alt="backup" width="412" height="278" /><br />
<span id="more-443"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p443code7'); return false;">View Code</a> WINBATCH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4437"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p443code7"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
color 0c
REM PBR_AUTO.BAT
REM Created <span style="color: #800080;">by</span> Saugata Datta
REM <span style="color: #0000FF;">Version</span> <span style="color: #cc66cc;">0.01</span>
REM Auto Profile Backup and Restore
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=50 LINES=20</span>
setlocal
<span style="color: #66cc66;">%~</span>d0
cd <span style="color: #ff0000;">&quot;%~dp0&quot;</span>
<span style="color: #FF1010; font-weight: bold;">:_tsk</span>
title Auto Profile Backup and Restore...
set _task=
cls
echo _____<span style="color: #66cc66;">/</span>TechnoChat.IN_______________________________
echo       Auto Profile Backup and Restore
echo                    <span style="color: #800080;">By</span> <span style="color: #FF1010; font-weight: bold;">: Saugata Datta</span>
echo _______________________________________<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2009</span>______
&nbsp;
echo   <span style="color: #66cc66;">&#91;</span>A<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> Backup Domain Profile
echo   <span style="color: #66cc66;">&#91;</span>B<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> Restore Domain Profile
echo   <span style="color: #66cc66;">&#91;</span>Q<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">-</span> QUIT
echo.
set <span style="color: #66cc66;">/</span>p _task=Your Choice <span style="color: #66cc66;">&#91;</span><span style="color: #800080;">in</span> small<span style="color: #66cc66;">&#93;</span><span style="color: #FF1010; font-weight: bold;">:</span>
echo.
<span style="color: #800080;">if</span> <span style="color: #ff0000;">&quot;%_task%&quot;</span> == <span style="color: #ff0000;">&quot;a&quot;</span> <span style="color: #800080;">goto</span> _bkp
<span style="color: #800080;">if</span> <span style="color: #ff0000;">&quot;%_task%&quot;</span> == <span style="color: #ff0000;">&quot;b&quot;</span> <span style="color: #800080;">goto</span> _res
<span style="color: #800080;">if</span> <span style="color: #ff0000;">&quot;%_task%&quot;</span> == <span style="color: #ff0000;">&quot;q&quot;</span> <span style="color: #800080;">goto</span> _quit
<span style="color: #800080;">if</span> not <span style="color: #ff0000;">&quot;%_task%&quot;</span> == <span style="color: #ff0000;">&quot;a or b or q&quot;</span> <span style="color: #800080;">goto</span> _tsk
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:_bkp</span>
cd\
set <span style="color: #66cc66;">/</span>p _uname=Type user account Name<span style="color: #FF1010; font-weight: bold;">:</span>
<span style="color: #66cc66;">%</span>SystemDrive<span style="color: #66cc66;">%</span>
cd <span style="color: #ff0000;">&quot;Documents and Settings&quot;</span>
<span style="color: #800080;">if</span> not exist <span style="color: #66cc66;">%</span>_uname<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">&#40;</span>echo Wrong user name..
<span style="color: #800080;">goto</span> _bkp<span style="color: #66cc66;">&#41;</span>
<span style="color: #FF1010; font-weight: bold;">:_drv</span>
set <span style="color: #66cc66;">/</span>p _drive=Type <span style="color: #0080FF; font-weight: bold;">Drive</span> letter<span style="color: #66cc66;">&#91;</span>like D<span style="color: #66cc66;">&#93;</span><span style="color: #FF1010; font-weight: bold;">:</span>
<span style="color: #800080;">if</span> not exist <span style="color: #66cc66;">%</span>_drive<span style="color: #66cc66;">%</span><span style="color: #FF1010; font-weight: bold;">:\RECYCLER (echo Wrong drive...</span>
<span style="color: #800080;">goto</span> _drv<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">if</span> exist <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr&quot;</span> <span style="color: #66cc66;">&#40;</span> echo Deleting old Backup
rmdir <span style="color: #66cc66;">/</span>s <span style="color: #66cc66;">/</span>q <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr&quot;</span><span style="color: #66cc66;">&#41;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Favorites&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Desktop&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\My Documents&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Recent&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data\Microsoft&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data\Microsoft\Office&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data\Microsoft\Outlook&quot;</span>
mkdir <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Local Settings\History&quot;</span>
echo <span style="color: #66cc66;">%</span>cd<span style="color: #66cc66;">%</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\Favorites&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Favorites&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\Desktop&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Desktop&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\My Documents&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\My Documents&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\Application Data\Microsoft\Office&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data\Microsoft\Office&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\Application Data\Microsoft\Outlook&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Application Data\Microsoft\Outlook&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_uname%\Local Settings\History&quot;</span> <span style="color: #ff0000;">&quot;%_drive%:\%_uname%_apbr\Local Settings\History&quot;</span>
<span style="color: #800080;">goto</span> _bsucc
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:_res</span>
cd\
set <span style="color: #66cc66;">/</span>p _uname=Type user account Name<span style="color: #FF1010; font-weight: bold;">:</span>
<span style="color: #66cc66;">%</span>SystemDrive<span style="color: #66cc66;">%</span>
cd <span style="color: #ff0000;">&quot;Documents and Settings&quot;</span>
<span style="color: #800080;">if</span> not exist <span style="color: #66cc66;">%</span>_uname<span style="color: #66cc66;">%</span> <span style="color: #66cc66;">&#40;</span>echo Wrong user name..
<span style="color: #800080;">goto</span> _res<span style="color: #66cc66;">&#41;</span>
<span style="color: #FF1010; font-weight: bold;">:_drv2</span>
set <span style="color: #66cc66;">/</span>p _rdes=Type backup <span style="color: #0080FF; font-weight: bold;">drive</span><span style="color: #FF1010; font-weight: bold;">:</span>
<span style="color: #800080;">if</span> not exist <span style="color: #66cc66;">%</span>_rdes<span style="color: #66cc66;">%</span><span style="color: #FF1010; font-weight: bold;">:\RECYCLER (echo Wrong drive...</span>
<span style="color: #800080;">goto</span> _drv2<span style="color: #66cc66;">&#41;</span>
<span style="color: #800080;">if</span> not exist <span style="color: #66cc66;">%</span>_rdes<span style="color: #66cc66;">%</span><span style="color: #FF1010; font-weight: bold;">:\%_uname%_apbr (echo Old backup not available...</span>
cd\
<span style="color: #800080;">goto</span> _res<span style="color: #66cc66;">&#41;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\Favorites&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\Favorites&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\Desktop&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\Desktop&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\My Documents&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\My Documents&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\Application Data\Microsoft\Office&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\Application Data\Microsoft\Office&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\Application Data\Microsoft\Outlook&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\Application Data\Microsoft\Outlook&quot;</span>
xcopy <span style="color: #66cc66;">/</span>e <span style="color: #66cc66;">/</span>h <span style="color: #66cc66;">/</span>r <span style="color: #66cc66;">/</span>y <span style="color: #ff0000;">&quot;%_rdes%:\%_uname%_apbr\Local Settings\History&quot;</span> <span style="color: #ff0000;">&quot;%_uname%\Local Settings\History&quot;</span>
<span style="color: #800080;">goto</span> _rsucc
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:_rsucc</span>
<span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=34 LINES=4</span>
echo.
echo     <span style="color: #66cc66;">***</span> Restore Successful <span style="color: #66cc66;">***</span>
echo.
<span style="color: #0000FF;">pause</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
<span style="color: #800080;">goto</span> _quit
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:_bsucc</span>
<span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
MODE CON<span style="color: #FF1010; font-weight: bold;">: COLS=34 LINES=10</span>
echo.
echo.
echo     <span style="color: #66cc66;">***</span> Backup Successful <span style="color: #66cc66;">***</span>
echo.
echo  Backup taken <span style="color: #800080;">to</span> following folder
echo.
echo         <span style="color: #66cc66;">%</span>_drive<span style="color: #66cc66;">%</span><span style="color: #FF1010; font-weight: bold;">:\%_uname%_apbr</span>
<span style="color: #0000FF;">pause</span> <span style="color: #66cc66;">&amp;</span>gt<span style="color: #008000; font-style: italic;">;nul</span>
<span style="color: #800080;">goto</span> _quit
&nbsp;
<span style="color: #FF1010; font-weight: bold;">:_quit</span>
endlocal
<span style="color: #800080;">exit</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/03/simple-script-for-windows-profile-backup-and-restore/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Set File Association via Group Policy</title>
		<link>http://technochat.in/2009/02/set-file-association-via-group-policy/</link>
		<comments>http://technochat.in/2009/02/set-file-association-via-group-policy/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 13:38:21 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[ADM files]]></category>
		<category><![CDATA[adm script]]></category>
		<category><![CDATA[Changing file extension association via group policy]]></category>
		<category><![CDATA[File association permissions via GOP]]></category>
		<category><![CDATA[File association permissions via Group Policies]]></category>
		<category><![CDATA[File Associations through Group Policy]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Group Policy ADM Files]]></category>

		<guid isPermaLink="false">http://technochat.in/2009/02/set-file-association-via-group-policy/</guid>
		<description><![CDATA[Recently after installing FAX Server on our site, we are having some problem with opening received FAX file from user desktop. FAX files are .G3N/.G3F/.CTL of which .G3N and .G3F file can be opened in Windows Image Viewer and .CTL file can be opened in Notepad. But the problem is, users have to make it [...]]]></description>
			<content:encoded><![CDATA[<p>Recently after installing FAX Server on our site, we are having some problem with opening received FAX file from user desktop. FAX files are <strong>.G3N</strong>/<strong>.G3F</strong>/<strong>.CTL </strong>of which .G3N and .G3F file can be opened in Windows Image Viewer and <strong>.CTL</strong> file can be opened in Notepad.</p>
<p>But the problem is, users have to make it their own, or we have to do it manually on all workstation across all branches.  But it's almost impossible to do so, so we have to think about some global solution.<br />
<span id="more-433"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Now we start working on creation a Group policy with which we can easily define default file association for those files and finally we created one.</p>
<p>FileAssociation.ADM</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left2">Download <a href="http://technochat.in/wp-content/plugins/wp-codebox/wp-codebox.php?p=433&amp;download=FileAssociation.ADM">FileAssociation.ADM</a></span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4339"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p433code9"><pre class="txt" style="font-family:monospace;">CLASS USER
CATEGORY !!category
	CATEGORY &quot;Default Viewer/Icon for G3N File&quot;
	KEYNAME &quot;Software\Classes\.g3n\DefaultIcon&quot;
	 POLICY !!policyg3nicon
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;shimgvw.dll,1&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
	CATEGORY &quot;Default Viewer/Icon for G3N File&quot;
	KEYNAME &quot;Software\Classes\.g3n\shell\Open\command&quot;
	 POLICY !!policyg3nview
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen %1&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
	CATEGORY &quot;Default Viewer/Icon for G3F File&quot;
	KEYNAME &quot;Software\Classes\.g3f\DefaultIcon&quot;
	 POLICY !!policyg3ficon
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;shimgvw.dll,1&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
	CATEGORY &quot;Default Viewer/Icon for G3F File&quot;
	KEYNAME &quot;Software\Classes\.g3f\shell\Open\command&quot;
	 POLICY !!policyg3fview
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;rundll32.exe C:\WINDOWS\system32\shimgvw.dll,ImageView_Fullscreen %1&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
	CATEGORY &quot;Default Viewer/Icon for CTL File&quot;
	KEYNAME &quot;Software\Classes\.ctl\DefaultIcon&quot;
	 POLICY !!policyctlicon
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;C:\WINDOWS\system32\shell32.dll,-152&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
	CATEGORY &quot;Default Viewer/Icon for CTL File&quot;
	KEYNAME &quot;Software\Classes\.ctl\shell\Open\command&quot;
	 POLICY !!policyctlview
	  EXPLAIN !!explain
	  PART Default
	  EDITTEXT
	  DEFAULT &quot;C:\WINDOWS\system32\NOTEPAD.EXE %1&quot;
	  VALUENAME &quot;&quot;
	  END PART
	 END POLICY
	END CATEGORY
&nbsp;
END CATEGORY
&nbsp;
[strings]
category=&quot;Zita FAX File Associations&quot;
policyg3nicon=&quot;Set Default Icon for G3N File&quot;
policyg3nview=&quot;Set default Viewer for G3N File&quot;
policyg3ficon=&quot;Set Default Icon for G3N File&quot;
policyg3fview=&quot;Set default Viewer for G3N File&quot;
policyctlicon=&quot;Set Default Icon for CTL File&quot;
policyctlview=&quot;Set default Viewer for CTL File&quot;
explain=&quot;This policy sets the default file association for G3N files and it's default icon. Custom Group Policy - TechnoChat.IN ! By Saugata Datta.&quot;</pre></td></tr></table></div>

<p>Group Policy Fig -1</p>
<p><img src="http://technochat.in/wp-content/uploads/2009/02/021209-1337-setfileasso1.png" alt="" width="440" height="249" /></p>
<p>Group Policy Fig -2</p>
<p><img src="http://technochat.in/wp-content/uploads/2009/02/021209-1337-setfileasso2.png" alt="" /><br />
EnjoY <img src='http://technochat.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2009/02/set-file-association-via-group-policy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>Disable Print Screen Function Via VBS Script (By using GPO Startup/Shutdown Script)</title>
		<link>http://technochat.in/2008/10/disable-print-screen-function-via-vbs-script-by-using-gpo-startupshutdown-script/</link>
		<comments>http://technochat.in/2008/10/disable-print-screen-function-via-vbs-script-by-using-gpo-startupshutdown-script/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 12:48:13 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[disable print screen]]></category>
		<category><![CDATA[disable print screen on windows]]></category>
		<category><![CDATA[disable print screen on xp]]></category>
		<category><![CDATA[disable print screen via gpo]]></category>
		<category><![CDATA[disable print screen via group policy]]></category>
		<category><![CDATA[printscreen]]></category>

		<guid isPermaLink="false">http://technochat.in/?p=139</guid>
		<description><![CDATA[Another requirement, now customer need to disable default windows Print Screen function on all of their user desktop, So, we started our searching again, and easily we able to find out how to disable print screen on windows by importing following registry. ?View Code REG1 2 3 &#91;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout&#93; &#34;Scancode Map&#34;=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,\ 00,00,00,00 So, again we [...]]]></description>
			<content:encoded><![CDATA[<p>Another requirement, now customer need to disable default windows Print Screen function on all of their user desktop,<br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
So, we started our searching again, and easily we able to find out how to disable print screen on windows by importing following registry.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p139code13'); return false;">View Code</a> REG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13913"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p139code13"><pre class="reg" style="font-family:monospace;"><span style="color: #000000;">&#91;</span><span style="color: #800000;">HKEY_LOCAL_MACHINE</span>\SYSTEM\CurrentControlSet\Control\Keyboard Layout<span style="color: #000000;">&#93;</span>
<span style="color: #0000FF;">&quot;Scancode Map&quot;</span><span style="color: #000000;">=</span><span style="">hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,37,e0,00,00,54,00,\
00,00,00,00</span></pre></td></tr></table></div>

<p>So, again we start working to create a custom adm file. As because this is a HKLM key, so we need Privilege to import it into registry, and only way to do so is to apply some policy via <strong>Computer Configuration</strong>,<strong> </strong>whit which we can force policy on each computer not on individual user.</p>
<p><span style="color: #000000;">But suddenly we discover that </span><strong><span style="color: #ff0000;">ADM files don't support reg_binary values</span></strong>, so we have to find out any other alternatives.</p>
<p><span id="more-139"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Now we have to create tow <strong>.VBS</strong> file, one for to disable print screen and another for to re-enable print screen,</p>
<p>VBS Script for disable print screen,</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p139code14'); return false;">View Code</a> VB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13914"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p139code14"><pre class="vb" style="font-family:monospace;"><span style="color: #008000;">'Disable Print Screen Function
</span><span style="color: #000080;">const</span> HKEY_LOCAL_MACHINE = &amp;H80000002
strKeyPath = <span style="color: #800000;">&quot;SYSTEM\ControlSet001\Control\Keyboard Layout&quot;</span>
strComputer = <span style="color: #800000;">&quot;.&quot;</span>
BinaryValueName = <span style="color: #800000;">&quot;Scancode Map&quot;</span>
iValues = Array(&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H03,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H37,&amp;He0,&amp;H00,&amp;H00,&amp;H54,&amp;H00,&amp;H00,&amp;H00,&amp;H00,&amp;H00)
<span style="color: #000080;">Set</span> oReg=GetObject(<span style="color: #800000;">&quot;winmgmts:{impersonationLevel=impersonate}!\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\default:StdRegProv&quot;</span>)
disablePS = oReg.SetBinaryValue(HKEY_LOCAL_MACHINE,strKeyPath,BinaryValueName,iValues)</pre></td></tr></table></div>

<p>VBS Script for re-enable print screen</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p139code15'); return false;">View Code</a> VB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p13915"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p139code15"><pre class="vb" style="font-family:monospace;"><span style="color: #008000;">'Re-Enable Print Screen Function
</span><span style="color: #000080;">const</span> HKEY_LOCAL_MACHINE = &amp;H80000002
strKeyPath = <span style="color: #800000;">&quot;SYSTEM\ControlSet001\Control\Keyboard Layout&quot;</span>
strComputer = <span style="color: #800000;">&quot;.&quot;</span> 
strStringValueName = <span style="color: #800000;">&quot;Scancode Map&quot;</span>
<span style="color: #000080;">set</span> objReg = GetObject(<span style="color: #800000;">&quot;winmgmts:\\&quot;</span> &amp; strComputer &amp; <span style="color: #800000;">&quot;\root\default:StdRegProv&quot;</span>)
enablePS = objReg.DeleteValue(HKEY_LOCAL_MACHINE,strKeyPath,strStringValueName)</pre></td></tr></table></div>

<p>Now we can easily implement above two script via GPO by using system Startup/Shutdown script.</p>
<p><a href="http://technochat.in/wp-content/uploads/2008/10/gpscreen.jpg" rel="lightbox[139]"><img class="alignnone size-medium wp-image-140" title="gpscreen" src="http://technochat.in/wp-content/uploads/2008/10/gpscreen-300x195.jpg" alt="" width="300" height="195" /></a></p>
<p>Thanks.. <img src='http://technochat.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2008/10/disable-print-screen-function-via-vbs-script-by-using-gpo-startupshutdown-script/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
		<item>
		<title>OS Dependent Logoff/Logon Script run via GPO</title>
		<link>http://technochat.in/2008/10/test/</link>
		<comments>http://technochat.in/2008/10/test/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 17:22:04 +0000</pubDate>
		<dc:creator>Saugata</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[GPO]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Logoff Script]]></category>
		<category><![CDATA[Logon Script]]></category>
		<category><![CDATA[OS Detecting VBS Script]]></category>
		<category><![CDATA[OS Detection VBS Script]]></category>
		<category><![CDATA[OS VBS Script]]></category>

		<guid isPermaLink="false">http://technochat.in/?p=86</guid>
		<description><![CDATA[Use following VBS script Startup or Shutdown script. ?View Code VB1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Option Explicit Dim objItem, colItems, objWMIService, strComputer, objShell strComputer = &#34;.&#34; Set objShell = CreateObject(&#34;WScript.Shell&#34;) Set objWMIService = GetObject(&#34;winmgmts:\\&#34; &#38;amp; strComputer &#38;amp; &#34;\root\cimv2&#34;) Set colItems [...]]]></description>
			<content:encoded><![CDATA[<p>Use following VBS script <strong>Startup</strong> or <strong>Shutdown</strong> script.</p>
<p><a href="http://technochat.in/wp-content/uploads/2008/10/gpedit.jpg" rel="lightbox[86]"><img class="alignnone size-medium wp-image-94" title="gpedit" src="http://technochat.in/wp-content/uploads/2008/10/gpedit-300x214.jpg" alt="" width="300" height="214" /></a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p86code17'); return false;">View Code</a> VB</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8617"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code" id="p86code17"><pre class="vb" style="font-family:monospace;"><span style="color: #000080;">Option</span> <span style="color: #000080;">Explicit</span>
<span style="color: #000080;">Dim</span> objItem, colItems, objWMIService, strComputer, objShell
strComputer = <span style="color: #800000;">&quot;.&quot;</span>
<span style="color: #000080;">Set</span> objShell = CreateObject(<span style="color: #800000;">&quot;WScript.Shell&quot;</span>)
<span style="color: #000080;">Set</span> objWMIService = GetObject(<span style="color: #800000;">&quot;winmgmts:\\&quot;</span> &amp;amp; strComputer &amp;amp; <span style="color: #800000;">&quot;\root\cimv2&quot;</span>)
<span style="color: #000080;">Set</span> colItems = objWMIService.ExecQuery(<span style="color: #800000;">&quot;Select * from Win32_OperatingSystem&quot;</span>,,48)
<span style="color: #000080;">For</span> <span style="color: #000080;">Each</span> objItem <span style="color: #000080;">in</span> colItems
                <span style="color: #000080;">If</span> InStr(objItem.Caption,<span style="color: #800000;">&quot;2000&quot;</span>) <span style="color: #000080;">Then</span>
                                <span style="color: #008000;">'Add your line here for 2000
</span>                                objShell.Run <span style="color: #800000;">&quot;regedit&quot;</span>, 1, <span style="color: #000080;">True</span>
                <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
    		<span style="color: #000080;">If</span> InStr(LCase(objItem.Caption),Lcase(<span style="color: #800000;">&quot;XP&quot;</span>)) <span style="color: #000080;">Then</span>
                                <span style="color: #008000;">'Add your command line here for 2000
</span>                                objShell.Run <span style="color: #800000;">&quot;calc&quot;</span>, 1, <span style="color: #000080;">True</span>
                <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
		<span style="color: #000080;">If</span> InStr(LCase(objItem.Caption),Lcase(<span style="color: #800000;">&quot;2003&quot;</span>)) <span style="color: #000080;">Then</span>
                                <span style="color: #008000;">'Add your command line here for 2000
</span>                                objShell.Run <span style="color: #800000;">&quot;notepad&quot;</span>, 1, <span style="color: #000080;">True</span>
                <span style="color: #000080;">End</span> <span style="color: #000080;">If</span>
<span style="color: #000080;">Next</span></pre></td></tr></table></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-5716594154118768";
/* 336x280, created 10/9/10 */
google_ad_slot = "6120199345";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
with above script, on <strong>Windows 2000</strong> it will execute <strong>regedit.exe</strong>, on <strong>Windows XP</strong> it will execute <strong>calc.exe</strong>, and on <strong>Windows 2003</strong> it will execute <strong>notepad.exe</strong>.</p>
<p>You can change the file as you wish..</p>
]]></content:encoded>
			<wfw:commentRss>http://technochat.in/2008/10/test/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/3.0/us/</creativeCommons:license>
	</item>
	</channel>
</rss>

