<?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>lupigabriel &#187; Windows</title>
	<atom:link href="https://www.lupigabriel.it/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lupigabriel.it</link>
	<description>Create something new is nice... Create something useful is important!</description>
	<lastBuildDate>Wed, 27 May 2015 01:59:17 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.22</generator>
	<item>
		<title>PrivateArk Workspace Link</title>
		<link>https://www.lupigabriel.it/privateark-workspace-link/</link>
		<comments>https://www.lupigabriel.it/privateark-workspace-link/#comments</comments>
		<pubDate>Mon, 30 Jun 2014 15:36:15 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Repository]]></category>
		<category><![CDATA[CyberArk]]></category>
		<category><![CDATA[Explorer]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[PrivateArk]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Workspace]]></category>

		<guid isPermaLink="false">http://www.lupigabriel.it/?p=249</guid>
		<description><![CDATA[This VBScript must be run as a logon script of windows GPO that will create the CyberArk PrivateArk Workspace Link in Windows Explorer Favorites Requirements: CyberArk PrivateArk Microsoft Windows 7 or higher PrivateArkWorkspaceLink_v1.0.vbs [crayon-6aaa810733751150889160/]]]></description>
				<content:encoded><![CDATA[<p>This VBScript must be run as a logon script of windows GPO that will create the CyberArk <strong>PrivateArk Workspace Link</strong> in Windows Explorer Favorites</p>
<p><strong>Requirements:</strong></p>
<ul>
<li><em>CyberArk PrivateArk</em></li>
<li><em>Microsoft Windows 7 or higher</em></li>
</ul>
<p><a href="http://www.lupigabriel.it/wp-content/uploads/2014/06/PrivateArkWorkspaceLink_v1.0.vbs.zip" class="mtli_attachment mtli_zip" rel="mtli_filesize716b">PrivateArkWorkspaceLink_v1.0.vbs</a></p>
<p></p><pre class="crayon-plain-tag">' ##############################################################################
' #                                Lupi Gabriel                                #
' #                             www.lupigabriel.it                             #
' #                            info@lupigabriel.it                             #
' ##############################################################################
' #            Copyright (c) 2014 Lupi Gabriel All rights reserved.            #
' ##############################################################################
' # VERSION    : 1.0                                                           #
' # FILE       : PrivateArkWorkspaceLink_v1.0.vbs                              #
' # CLASS      : Script                                                        #
' # LANGUAGE   : VB Script                                                     #
' # OUPUT      : "%UserProfile%\Links"                                         #
' ##############################################################################



On Error Resume Next

Set oShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%PROGRAMFILES%") &amp; "\PrivateArk\Client\Arkui.exe") = True Or objFSO.FileExists(oShell.ExpandEnvironmentStrings("%PROGRAMFILES(X86)%") &amp; "\PrivateArk\Client\Arkui.exe") = True Then
	If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%USERPROFILE%") &amp; "\Links\Workspace.lnk") = False Then
		If objFSO.FolderExists(oShell.ExpandEnvironmentStrings("%APPDATA%") &amp; "\CyberArk\PrivateArk\Workspace") = True Then
			Set oShortCut = oShell.CreateShortcut(oShell.ExpandEnvironmentStrings("%USERPROFILE%") &amp; "\Links\Workspace.lnk")
			oShortCut.TargetPath = oShell.ExpandEnvironmentStrings("%APPDATA%") &amp; "\CyberArk\PrivateArk\Workspace"
			oShortCut.Save
		End If
	End If
Else
	If objFSO.FileExists(oShell.ExpandEnvironmentStrings("%USERPROFILE%") &amp; "\Links\Workspace.lnk") = True Then
		objFSO.DeleteFile oShell.ExpandEnvironmentStrings("%USERPROFILE%") &amp; "\Links\Workspace.lnk"
	End If
End If</pre><p></p>
<style type="text/css">a[rel~="mtli_filesize716b"]:after {content:" (716 b)"}</style>]]></content:encoded>
			<wfw:commentRss>https://www.lupigabriel.it/privateark-workspace-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clear Cached Profile</title>
		<link>https://www.lupigabriel.it/clear-cached-profile/</link>
		<comments>https://www.lupigabriel.it/clear-cached-profile/#comments</comments>
		<pubDate>Sun, 29 Jun 2014 13:36:55 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Repository]]></category>
		<category><![CDATA[Cached]]></category>
		<category><![CDATA[Clear]]></category>
		<category><![CDATA[Local]]></category>
		<category><![CDATA[Mandatory]]></category>
		<category><![CDATA[Profile]]></category>
		<category><![CDATA[Roaming]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.lupigabriel.it/?p=219</guid>
		<description><![CDATA[This VBScript could be run as a start-up or shutdown script of windows GPO or with a scheduled task must be run as administrative user to Clear Local User Chache Files and System Registry Entries of old or orphan user profiles. Tested on the following Microsoft OS versions: Microsoft Windows XP (32bit) Microsoft Windows 7 [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>This VBScript could be run as a start-up or shutdown script of windows GPO or with a scheduled task must be run as administrative user to <strong>Clear Local User Chache Files and System Registry Entries</strong> of old or orphan user profiles.</p>
<p><strong>Tested on the following Microsoft OS versions:</strong></p>
<ul>
<li><em>Microsoft Windows XP (32bit)</em></li>
<li><em>Microsoft Windows 7 (32bit)</em></li>
</ul>
<p><a href="http://www.lupigabriel.it/wp-content/uploads/2014/06/ClearCachedProfile_v1.0.vbs.zip" class="mtli_attachment mtli_zip" rel="mtli_filesize150kB">ClearCachedProfile_v1.0.vbs</a></p>
<p></p><pre class="crayon-plain-tag">' ##############################################################################
' #                                Lupi Gabriel                                #
' #                             www.lupigabriel.it                             #
' #                            info@lupigabriel.it                             #
' ##############################################################################
' #            Copyright (c) 2014 Lupi Gabriel All rights reserved.            #
' ##############################################################################
' # VERSION    : 1.0                                                           #
' # FILE       : ClearCachedProfile.vbs                                        #
' # CLASS      : Script                                                        #
' # LANGUAGE   : VB Script                                                     #
' # LOG FILE   : "%SystemRoot%\ClearCachedProfile.log"                         #
' ##############################################################################



On Error Resume Next



ClearNormalMonths = 12 ' #### CLEAR USER PROFILE CACHE AFTER * MONTHS
ClearMandatoryWeeks = 1 ' #### CLEAR MANDATORY USER PROFILE CACHE AFTER * WEEKS



Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject("WScript.Shell")

LogFilePath = wshShell.ExpandEnvironmentStrings("%SystemRoot%") &amp; "\ClearCachedProfile.log"
If objFSO.FileExists(LogFilePath) = True Then
Set f = objFSO.GetFile(LogFilePath)
If DateDiff("m",f.DateLastModified,Now()) &gt; 1 Then objFSO.DeleteFile LogFilePath End If
End If
Set objFile = objFSO.OpenTextFile(LogFilePath, 8, True)


if objRegistry.EnumKey(&amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList", valueNames1) = 0 then
	if isArray(valueNames1) then
		for i1 = 0 to UBound(valueNames1)
		LocalNTuser = ""
		LocalSID = valueNames1(i1)
		objRegistry.GetStringValue &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" &amp; LocalSID, "Guid", GuidValue
		objRegistry.GetStringValue &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" &amp; LocalSID, "ProfileImagePath", PathValue

		If InStr(LocalSID,"S-1-5-21-137065001-") &gt; 0 Then

			Set objAccount = objWMIService.Get("Win32_SID.SID='" &amp; Split(LocalSID,".",-1,1)(0) &amp; "'")
				
			IsMandatory = ""
			If objFSO.FileExists(Trim(PathValue) &amp; "\ntuser.man") = True Then
			LocalNTuser = Trim(PathValue) &amp; "\ntuser.man"
			IsMandatory = "ON"
			End If
			If objFSO.FileExists(Trim(PathValue) &amp; "\ntuser.dat") = True Then
			LocalNTuser = Trim(PathValue) &amp; "\ntuser.dat"
			IsMandatory = "OFF"
			End If
				
			SpuriousProfile = "No"
			If objFSO.FolderExists(Trim(PathValue)) = False Then
			SpuriousProfile = "Yes"
			End If
				
			LastLogonW = 0
			LastLogonM = 0
			If IsMandatory &lt;&gt; "" Then
			Set f = objFSO.GetFile(LocalNTuser)
			LastLogonW = DateDiff("w",f.DateLastModified,Now())
			LastLogonM = DateDiff("m",f.DateLastModified,Now())
			Set f = Nothing
			End If
				
				
				
				
			ClearProfile = 0
			If IsMandatory = "ON" And LastLogonW &gt; ClearMandatoryWeeks Then ClearProfile = 1 End If
			If IsMandatory = "OFF" And LastLogonM &gt; ClearNormalMonths Then ClearProfile = 1 End If
			If SpuriousProfile = "Yes" Then ClearProfile = 1 End If
				
				

			Wscript.Echo
			Wscript.Echo "Path = " &amp; Trim(PathValue)
			Wscript.Echo "SID = " &amp; LocalSID
			Wscript.Echo "GUID = " &amp; GuidValue
			Wscript.Echo "Mandatory = " &amp; IsMandatory
			Wscript.Echo "LastLogon = " &amp; LastLogonW &amp; " Weeks - " &amp; LastLogonM &amp; " Months"
			Wscript.Echo "Spurious Profile = " &amp; SpuriousProfile
			Wscript.Echo "IS DELETABLE = " &amp; ClearProfile
				
			If ClearProfile = 1 Then
			objRegistry.DeleteKey &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" &amp; LocalSID &amp; "\Preference"
			objRegistry.DeleteKey &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" &amp; LocalSID
			objRegistry.DeleteKey &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid\" &amp; GuidValue
			objRegistry.DeleteKey &amp;H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\PolicyGuid\" &amp; GuidValue
			If objFSO.FolderExists(Trim(PathValue)) = True Then wshShell.run "ccp.bat """ &amp; Trim(PathValue) &amp; "\""",1,1 End If
			End If
				
				

			If ClearProfile = 1 Then
			objFile.WriteLine ""
			objFile.WriteLine ""
			objFile.WriteLine ""
			objFile.WriteLine Now()
			objFile.WriteLine ""
			objFile.WriteLine "Path = " &amp; Trim(PathValue)
			objFile.WriteLine "SID = " &amp; LocalSID
			objFile.WriteLine "GUID = " &amp; GuidValue
			objFile.WriteLine "Mandatory = " &amp; IsMandatory
			objFile.WriteLine "LastLogon = " &amp; LastLogonW &amp; " Weeks - " &amp; LastLogonM &amp; " Months"
			objFile.WriteLine "Spurious Profile = " &amp; SpuriousProfile
			objFile.WriteLine ""
			objFile.WriteLine "=================================================="
			End If

		End If

		Set objAccount = Nothing
		next
	end if
end if

objFile.Close
Set objAccount = Nothing
Set objRegistry = Nothing
Set objWMIService = Nothing
Set objFSO = Nothing
Set wshShell = Nothing
Set objFile = Nothing
Set f = Nothing


'end script ClearCachedProfile</pre><p> </p>
<style type="text/css">a[rel~="mtli_filesize150kB"]:after {content:" (1.50 kB)"}</style>]]></content:encoded>
			<wfw:commentRss>https://www.lupigabriel.it/clear-cached-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
