Archive: UAC plugin problem


UAC plugin problem
Hi

I am using the UAC plugin in my installer. The documentation says thay you should use RequestExecutionLevel user. My problem is, that the installer runs perfectly for all cases except when a standard user installs and chooses to install for the current user only. Then no shortcuts are made on the desktop, for quicklaunch or in the all programs menu because the installer cannot write to the registry.

How can i avoid this problem?


How is the registry related to shortcuts?

Could you provide a sample script with this problem?


Shortcuts don't have anything to do with the registry as such. What i meant to say was that I could see that some of the writes to the registry were not performed when installing for the current user as a standard user, which indicated that i was being restricted in some way. I assumed that the restriction was also the reason why the shortcuts were not generated. SetShellVarContext is set to current in this case. The sample looks like this:

WriteRegStr SHCTX "Software\<Product Name>" "" $INSTDIR
WriteRegStr SHCTX "Software\<Product Name>" "major" $Current_major
WriteRegStr SHCTX "Software\<Product Name>" "minor" $Current_minor
WriteRegStr SHCTX "Software\<Product Name>" "build" $Current_build
WriteRegStr SHCTX "Software\<Product Name>" "InstallType" $InstallType
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\<Product Name>" "DisplayName" "<Product Name>"
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\<Product Name>" "UninstallString" "$INSTDIR\Uninstall.exe"


CreateDirectory "$SMPROGRAMS\<Product Directory>"
CreateShortCut "$SMPROGRAMS\<Product Directory>\<Product Name>.lnk" "$INSTDIR\Foo.exe" "" "" "" SW_SHOWNORMAL
CreateShortCut "$SMPROGRAMS\<Product Directory>\Uninstall <Product Name>.lnk" "$INSTDIR\Uninstall.exe" "" "" "" SW_SHOWNORMAL
CreateShortCut "$SMPROGRAMS\<Product Directory>\<Product Name> Manual.lnk" "$INSTDIR\Help\en-manual\en-manual.html" "" "" "" SW_SHOWNORMAL
CreateShortCut "$SMPROGRAMS\<Product Directory>\<Product Name> Read Me.lnk" "$INSTDIR\Help\en-manual\engReadMe.html" "" "" "" SW_SHOWNORMAL

Is the problem that when using the UAC plugin, RequestExecutionLevel must be set to user and consequently this restricts me when being a standard user?


"RequestExecutionLevel user" should not restrict a non admin user in any way (other than the restrictions this user already has)

So what you are saying is that a non admin user performing the install (without elevation) is the problem?

If you don't use the UAC plugin at all (Still using RequestExecutionLevel user), does the problem still exist?

I have not seen this problem before and I will try to look into it