Joseph Michael Pesch
VP Programming

Microsoft Fix It - Clean Removal Tool Replacement for MSICUU2.exe

by 24. February 2013 09:13

Some times when a software becomes corrupted and you attempt to uninstall/reinstall the software it may be in left in a bad state where it is unusable, leaving you with the only option to reformat your hard drive to reinstall your operating system or attempt to manually fix/unistall which can be very tedious and potentially error prone leaving your system in even a worse state.  The Windows Installer Clean Up tool developed by Microsoft "MSICUU2.exe" was a free and very useful tool to help fix these type of program removal/reinstallation issues.  However, Microsoft decided to retire this tool in 2010 and they have replaced it with another tool called “Microsoft Fix It” which is a progam install and uninstall utility that supports both 32-bit and 64-bit of Windows including Windows 7.  The tool can be run directly from the Microsoft web site; or, it can be downloaded and loaded onto a flash drive, CD, etc. to run locally on an affected machine.

In my case I had Symantec anti-virus software installed and attempted to remove it using the standard Windows Add/Remove Programs from the Control Panel.  However, my uninstall froze in the middle and left my PC in a state where it was gone from the Add/Remove Programs list but not fully removed from my PC.  Worse yet whenever I right-clicked on folders it would prompt me with a series of dialog boxes about trying to install Symantec and can't install.  I was able to successfully remove it using the Microsoft Fix It tool.

Download the tool directly from the Microsoft site: http://support.microsoft.com/mats/Program_Install_and_Uninstall

Tags:

Windows

ASP.Net Security Create New User Account Based on Existing User Account

by 1. February 2013 07:39

This SQL script will create a new ASP.Net user account using an existing user account as the basis.  The new user account will have the same password and roles as the existing user account.  Also included at the end of the main script is a script to change a user account password to a known defualt (e.g. Password1234).


Script to replicate user:

declare 
  @ExisitingUserName varchar(50)
, @ExisitingUserEmail
, @OldUserID uniqueidentifier
, @UserID uniqueidentifier
, @Email varchar(50)
, @UserName varchar(50)
, @DeleteIfExists bit

select
  @UserID = newid()
, @Email = 'new.user@email.com'
, @UserName = 'new.user@email.com'
, @DeleteIfExists = 0
, @ExisitingUserName = 'EXISTING_USER_NAME_HERE'
select
  @UserID
, @Email
, @UserName

select @OldUserID = UserID 
from dbo.aspnet_Users 
where UserName = @UserName

if @DeleteIfExists = 1 begin

delete from dbo.aspnet_UsersInRoles
where UserID = @OldUserID

delete from dbo.aspnet_Membership
where UserID = @OldUserID

delete from dbo.aspnet_Users 
where UserName = @UserName

end

insert into dbo.aspnet_Users
select
  ApplicationId
, @UserID
, @UserName
, lower(@UserName) /* LoweredUserName */
, null /* MobileAlias */
, 0 /* IsAnonymous */ 
, getdate() /* LastActivityDate */
from dbo.aspnet_Users
where UserName = @ExisitingUserName

insert into dbo.aspnet_Membership
select
  ApplicationId
, @UserID
, Password
, PasswordFormat
, PasswordSalt
, MobilePIN
, @Email
, @Email
, PasswordQuestion
, PasswordAnswer
, IsApproved
, IsLockedOut
, getdate() /* CreateDate */
, getdate() /* LastLoginDate */
, getdate() /* LastPasswordChangedDate */
, '1/1/1754 12:00:00 AM' /* LastLockoutDate */
, 0 /* FailedPasswordAttemptCount */
, '1/1/1754 12:00:00 AM' /* FailedPasswordAttemptWindowStart */
, 0 /* FailedPasswordAnswerAttemptCount */
, '1/1/1754 12:00:00 AM' /* FailedPasswordAnswerAttemptWindowStart */
, Comment
from aspnet_Membership
where Email = @ExisitingUserEmail

insert into dbo.aspnet_UsersInRoles
select @UserID, RoleID
from dbo.aspnet_Roles

Script to change password:

update dbo.aspnet_Membership 
set PasswordSalt = 'dArJQD4e4upwMyqCSl9iNA=='
, Password = '1mAUj77CySFAtqlfInt4UFOznAc=' /* Password1234 */
where UserId = 
(
  select UserId 
  from dbo.aspnet_Users 
  where UserName = 'USER_NAME_HERE'
)

Tags:

ASP.Net | SQL Server