Digivation Hack Central


How to fix a corrupt user profile in Windows 7 and Vista: The User Profile Service failed the logon

by on Feb.16, 2014, under Windows

I had a recent issue with someones laptop where I got the

The User Profile Service failed the logon

for a Vista installation. This is the second time this has happened on the same computer.
The first time I recreated the user and copied the data across and repair installed windows.

This time I used the reference below. I had 2 entries for the user under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList, the second one having a .bak suffix. The first one was also brief containing only 2 entries and missing the rest.

So I:

  • renamed the original to a new suffix (just in case)
  • removed the .bak from the other one
  • and set state to 0 (was 0x8000)

Rebooted and voila login worked again.

This is here for my fast reference. YMMV

Ref: How to fix a corrupt user profile in Windows 7 and Vista: The User Profile Service failed the logon

Comments Off more...

Debugging shared Client/ASP Web Service projects in VS2010

by on May.19, 2011, under Windows

This post details the setup required for combined Remote Debugging server side web services with client programs in the same project. It is here mainly to assist my memory but may be of use to others as I had to dig for a lot of this info.

It assumes you log into the local development machine as a domain user and the remote IIS server is on a different domain with no shared trust.

This applies to VS2010 but should also be relevant to vs2008 and vs2005.

Local Computer Config

You will have logged on the local computer as MAINDOMAIN\user

  • Create a local computer user with the same name and password as your domain one. ( This step may be unnecessary )
  • Change the Sharing and Security Model In Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts
    set Classic – local users authenticate as themselves

Remote IIS Computer

  • Create a local computer user with your domain user name and same password.
  • Add Administrators group to this user.
  • make sure msdeploy works.
  • Add debug rights to new user In Local Security Policy/Local Policies/User Rights Assignment/Debug programs/Add User or Group
  • Change the Sharing and Security Model In Local Security Policy/Local Policies/Network access: Sharing and security model for local accounts
    set Classic – local users authenticate as themselves

msvsmon config

Create a batch file to run msvsmon called runmsvsmon.bat in the base path (e.g. wwwroot\ServiceTest) of the asp service as follows

cd "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Remote Debugger\x86"
start msvsmon.exe

Run the batch file as the user added above.

This will allow symbols to be used during step into service debugging.

Change the server name in msvsmon to


This allows your user to attach juts by entering the remote ip address (domain search for remote server is disabled in this case) in the Qualifier field in VS and thus works for standard debugging too.

Visual Studio Config

In Debugger Options

  • disable Enable just my code
  • enable Enable source server support

In Web Service project properties

  • Web/Use Custom Web Server/Url – http://remoteip/ServiceTest
  • Package/Publish Web/IIS Web Site – Default Web Site/ServiceTest

In Publish Service

  • username user
  • password is whatever
  • save password checked
  • method WebDeploy
  • URL http://remoteipaddr
  • Site Default Web Site/ServerTest or Default Web Site/Server
  • check Mark as IIS app
  • check Leave extra files


Deploy Web service first

This should succeed if msdeploy is working on the remote server.
You should see the files update on the target.
add debug=”true” to compilation tag in web.config.

  <compilation debug="true" targetFramework="4.0">

Test Tools/Process Attach

If you get a list of processes, you have everything should be working.

Debug Client and Web Service together

Set a breakpoint inside the service module and press F5. It should then break with source.

Set a breakpoint in the desktop client and step into a web method.

Comments Off :, , , , , , , more...

No Sound in Limited User Account

by on Sep.17, 2010, under Windows

Recently I needed to do a repair install on Windows XP, after which sound was no longer working on limited user accounts. After extensive searching I realized no one had a solution. The device driver was ok and operating and sound was working fine on administrator capable accounts.

The strange thing is that the Realtek HD sound app worked Ok on the LUA. I concluded from this that the software enumerator was at fault, specifically the registry keys that would have to be read for the software enumerator to read its current list.

Use regedit to change the permissions of the tree on currentcontrolset to fix this issue. Log in again and its all good.

Comments Off more...

Migrating Windows User Ids

by on Mar.12, 2010, under Windows

There are times when domains on windows change and thus your user id changes. However, you may have lots of files owned by you that are not in your user dir. Migrating these user ids to you new one, I’ve found, is not too difficult after all.

All you need is a tool from microsoft called subinacl.

Download and install the msi. Install path is

C:\Program Files\Windows Resource Kits\Tools\subinacl.exe

So use this for the command name below.

First find your old userid. Use a file you know you used to own. E.g. the projects directory.

Subinacl /file c:\projects /display

Copy and paste yours for use in the commands below

Now for the commands. Do for all drives if you have multiple disks.
The lines below are for me of course so sub in your cut S-xxx and new user id

Subinacl /subdir c:\ /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username

also the primary group, which can be found up the top of the display dump.

Subinacl /subdir c:\ "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"

all registry keys

Subinacl /subkeyreg HKEY_CURRENT_USER /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username

Subinacl /subkeyreg HKEY_LOCAL_MACHINE /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username

Subinacl /subkeyreg HKEY_CLASSES_ROOT /accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\username
(none found, so optional)

and the groups
Subinacl /subkeyreg HKEY_CURRENT_USER "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"

Subinacl /subkeyreg HKEY_LOCAL_MACHINE "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"

Subinacl /subkeyreg HKEY_CLASSES_ROOT "/accountmig=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx=newdomain\Domain Users"

After you are happy

Subinacl /subdir c:\ /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx

Subinacl /subkeyreg HKEY_CURRENT_USER /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx

Subinacl /subkeyreg HKEY_LOCAL_MACHINE /suppresssid=S-x-x-xx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxx

When you are finished, everything you used to own you will own again.

Comments Off more...