Prev Previous Post   Next Post Next
Old 14th December 2009, 13:40   #1
mj_blue
Junior Member
 
Join Date: Sep 2007
Posts: 13
Capturing Error returned from UAC::ExecCodeSegment

Hi,

I have the scneario that I need to check the state of a user registry key and if that key exists then do some work that is required to be ran as admin.

I used the Code:


Function un.CheckVSPluginInstall
ReadRegStr $2 HKCU "SOFTWARE\Company\Product" "VSSupport"
FunctionEnd

ClearErrors
GetFunctionAddress $0 un.CheckVSPluginInstall
UAC::ExecCodeSegment $0
IfErrors noVSplugin 0
#DO the admin things
novsplugin:


This has always appeared to work but on Vista it seem that it doesn't as when the VSSupport key is not there no Error is flagged back from the un.CheckVSPluginInstall function.

This works okay in XP but not in Vista when running as a non-admin user

This seems like a common thing to do and I'm sure it used to work..I'm using v0.0.11d of UAC

How do othe rpeople do this type of thing?
mj_blue is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump