The problem I was having with AdminMisc and the C++ Runtime Error is a result of Windows 2000 SP1. After you install Service Pack 1 on Windows 2000, the RunAS command may not function properly. When you type runas /? at a CMD prompt, the following is displayed: RUNAS USAGE: RUNAS [/profile] [/env] [/netonly] /user:<UserName> program /profile if the user's profile needs to be loaded /env to use current environment instead of user's. /netonly use if the credentials specified are for remote access only. /userThe format of the /user: entries are:
If you use the UPN, the program starts, but you receive: Microsoft Visual C++ Runtime Library Runtime Error! Program "path to executable" abnormal program termination.If you use the <UserName> syntax on a standalone computer, the same error occurs. If you use the <UserName> syntax on a domain member or domain controller, you receive: RUNAS ERROR: Unable to run - "command" 1326: Logon failure: unknown user name or bad password.You may also experience these problems with MMC.EXE and Ntbackup.exe. Occasionally, when the RunAS command tries to convert the UserName syntax to the Security Principal \ UserName syntax, it errors, failing to grant desktop access to the user. The solution is to always use the Security Principal \ UserName syntax, forgoing the UPN and UserName syntax, until the problem is fixed in a future Service Pack. regards Ivano
MY ORIGINAL POST: __________________________________________________________ have found that running some applications, rather ordinary applications, as an Admin using Adminmisc gives this "Microsoft Visual C++ Runtime Library" error. Others, like Server Manager, User Manager, etc..works. All the necessary security policies have been set. Has anybody come across this, and how can I solve this? Here's a snipit: use Win32::AdminMisc; $result=3DWin32::AdminMisc::LogonAsUser('domain','userid','password',LOGON32_LOGON_INTERACTIVE); if ($result){ $process =3D "c:\\program files\\textpad 4\\textpad.exe"; $LogonUser =3D Win32::AdminMisc::GetLogonName(); Win32::AdminMisc::CreateProcessAsUser($process); }else{ print "\nFailed to logon.\n"; } thx Ivano ____________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com |
- Re: for those who are interested... Ivano Di Domenico
- Re: for those who are interested... Chuck Lawhorn
