Launch a New Program as a Different User
Version Compatibility: Visual Basic 6, Visual Basic 5
Sometimes you might want to launch a program and tell Windows that the new application should be treated as if it was being run by another account. This is particularly useful if you are doing remote deployments and your application will be run by some service on another machine that doesn't have the necessary permissions to run your applicaiton.
Instructions: Copy the declarations and code below and paste directly into your VB project.