![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
|
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Accessing registory remotely Hi I have problem in accessing registory remoteley form one vista machine to othe vista machine . Here is code sip of my application // dwResult = WNetAddConnection2(&NetRes, pCredential->m_szPassword.data(), pCredential->m_szUserName.data(), 0); if(dwResult == ERROR_SUCCESS) { dwResult = RegConnectRegistry(szMachineIP, rootkey, &m_hRemRegKey); if(dwResult == ERROR_SUCCESS) dwResult = RegOpenKeyEx (m_hRemRegKey, pszSubkey, 0L, regFlg, &m_hkeySubkey); goto HANDLE_ERROR; Everything goes fine till RegOpenKeyEx which return error code access denied I am passing credentail of a user who has administrator right on machine for which i am trying to access the registory whicle making connection . Can anybody tell me ahow to move further ? Rajender saini |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: Accessing registory remotely I presume regFlg is KEY_ALL_ACCESS? Is the account you are connecting with a local user or a domain user? If it is a local user then you get a filtered token by default and your call will fail with ERROR_ACCESS_DENIED if you ask for permissions that only administrators have. By default only domain users who are members of the local administrators group get a non-filtered token when connecting remotely. That means that you cannot, by default, connect to a non-domain joined system as an administrator using any of the SMB APIs. There is a reg hack to change this, but it should only be used in situations where you absolutely have to. This behavior blocks a number of interesting attacks. Here is the key: Hive: HKEY_LOCAL_MACHINE Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system Value: LocalAccountTokenFilterPolicy Type: REG_DWORD Data: 0 (default) – Build filtered token 1 – Build elevated token "rajendersaini@gmail.com" wrote: > Hi > > I have problem in accessing registory remoteley form one vista machine > to othe vista machine . > > Here is code sip of my application > > // > dwResult = WNetAddConnection2(&NetRes, > pCredential->m_szPassword.data(), > pCredential->m_szUserName.data(), > 0); > > if(dwResult == ERROR_SUCCESS) > { > dwResult = RegConnectRegistry(szMachineIP, rootkey, > &m_hRemRegKey); > > if(dwResult == ERROR_SUCCESS) > dwResult = RegOpenKeyEx (m_hRemRegKey, pszSubkey, 0L, regFlg, > &m_hkeySubkey); > > goto HANDLE_ERROR; > Everything goes fine till RegOpenKeyEx which return error code access > denied > I am passing credentail of a user who has administrator right on > machine for which i am trying to > access the registory whicle making connection . > > Can anybody tell me ahow to move further ? > > Rajender saini > > |
My System Specs![]() |
|
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| confused about remotely accessing email from windows mail | Verso | Vista mail | 1 | 08-27-2008 11:00 AM |
| Can't connect remotely | Don_M | Vista networking & sharing | 1 | 07-06-2008 02:12 PM |
| Remotely accessing Video and Music using Media Center | Roderic Dohleman | Vista music pictures video | 0 | 05-13-2008 06:49 PM |
| Accessing Mail remotely | Mike H | Vista mail | 1 | 03-01-2008 10:21 AM |
| connecting to a pc remotely... | maya | Vista General | 3 | 08-01-2007 07:04 PM |
| Complimentary Industry Resources Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today! |