.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cant read registry during custom action

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :.NET Framework
I have built an installer project that uses a custom action that fires during the AfterInstall event.  I am having a strange problem with this code in Windows 7 64 bit that I am not having under Vista 32 bit.  The problem is that in the 64 bit version, a particular registry key that I need to read is showing up as not having any values, even though it definitely contains over 30 values.  Opening the key does not throw an exception - it just doesn't appear to contain any values.  If I execute my code from an EXE and execute it in Windows 7 64 bit, it does not have this problem - the problem only occurs when I call the code from within the context of the custom action and the custom action works fine on 32 bit vista.  The registry key that I am reading ALREADY EXISTS on the machine - my installer is not creating any keys.  I am totally stumped on this one.  Anybody have an idea about what might be going on here?  Thanks in advance for any suggestions or ideas.


View Complete Post

More Related Resource Links

How to read the custom http header



I have just joined the forum. I have a very simple query. I have added custom header to my website. Now I want to read the custom header. I am using IIS 6.0 on windows XP. I have already tried using using the Request.ServerVariables and and Request.header method. But none of them give me the custom header added to website.

Can any body help?

Thanks a lot in advance



Custom Ribbon action using quick step for workflow

I created custom button using the quick step in ribbon, and configured to invoke a workflow. It shows start and stop page of workflow where I have to click start. How to start workflow directly from the ribbon without this redirection to page.  

how to read a custom dynamic data meta data attribute in a field template

All --Please help.I need to know how to read a custom dynamic data meta data attribute in a field template.I know how to do it in a page template because I have a handle to the meta table on the page.However, I do not know how to get a handle to the meta column at run time in a field template.Can you help?Please advise.Thank you.-- Mark Kamoski

List item custom action with custom url

Hello, Is it possible to create a listitem custom action with an url that contains {fieldname} instead of  {ItemId}, {ItemUrl}, {ListId}, {SiteUrl}, for example http://MYSPSITEURL/SitePages/custompage.aspx?Field=} ? {Title  

Is there a way to conditionally enable/disable a custom action

I've created a custom action that kicks off a workflow on an item in a list.  I want the workflow to be initiated only once.  So, once it is kicked off the first time, I'd like the custom action to be disabled so others cannot start it again. Is there a way to do this in Sharepoint Designer?

How to include a javascript file in a custom action?

I need to call a custom javascript function from a ribbon button, how do I include the javascript file within the custom action solution in order that it will be properly referenced by the html output? I am not allowed to define a custom masterpage at this point. So what can I do?   Thanks, Stephan  

When a Task Expired step in a Start Custom Task Process action is not fired?!

When a Task Expired step is not fired?! I created a simple Workflow using the SharePoint Designer. Added one step to which I added the Start Custom Task Process and set the Due Date "2 minutes after now". For the When a task Expired step of the custom Task I added a Log to History List action, which doesn't seems to be fired. What good be wrong??? All the steps I did to create the workflow: Started SP Designer 2010 and created a reusalbe WF. Added Start Custom Task Process action to step 1. Changed the behavior of the When a task Expired stepof the custom task (added a Log to History List action). Changed the behavior of the Before Task is Assigned by adding a Set Field action which set the Due Date of the task to "Now + 2 minutes". Published the WF and started the WF for a simple list item. Unfortunately the Log to History List actionof the When a task Expired step is never called.

How to use (add, read, change, delete) registry keys with vb.net

Find this tutorial on Dot Net SourceReason of this project:This is the next part of the previous tutorial. We'll learn here how to add, change, read, delete registry keys and values using vb.net.I included a sample that contains all those functionality.Project details:1- How to add a registry key/value2- How to read a registry value3- How to delete a key or a value4- Changing a value or a key5- Hints to use registry with VB.net6- The registry reader (VB.net)1- How to add a registry key/valueOne thing that I think I forget to notice. A folder in the registry is name "key" and the elements in this key are named "values".There's a description of each value type in the 5th tutorialNow we'll see how to add a key or a value.Probably you have thought where we'll put it and whether it's a key or a value.So we have 2 things to notice.Visual Basic will automatically show you the hives (they are stored in).You'll have only to choose the needed one.To do that paste the following line. My.Computer.Registry.CurrentUser.CreateSubKey("TestKey")This line will create a key in the HKEY_CURRENT_USER hive and will be named "testkey"Now let's move on to see how to set a value.For the value we'll need three things: Value path, Value name and value value. We can also precise the value type if not Visual Basic will try to assign the value type depending o

Custom Control - Read Only Properties List

How would I add a (dropdown)  list of available values for a custom server control property?(Just like 'Visible' property of most controls has valid values of 'True/False' and nothing else can be entered or selected)

Could not determine the threading model of the Custom Resolver Component from the registry.

I have an application that uses web synchronization and performs merge replication programmatically using RMO. A number of the tables in the publication use a COM-based custom conflict resolver that I have written in c#. I have an installation package that creates a virtual directory containing the replication listener (replisapi.dll) and installs the conflict resolver. This week the package was deployed on a 64-bit Small Business Server (SBS) 2008. The first subscriber was able to synchronize successfully but subsequent syncs and syncs by other subscribers resulted in the following exception: Could not determine the threading model of the Customer Resolver Component from the registry. In the registry on the server the ThreadingModel value of my conflict resolver was set to Both and I was able to resolve the issue by changing the value to Free. My first question is why when using the Both model would the resolver not simply be loaded in the same apartment as the merge agent? My second question is whether I have plumbed for the correct alternative of Free (rather than Neutral or not specifying a model)?

write Custom MemberShip provdider only to read the connection string from other file

hi,    In asp.net mvc project I am using MYSQlMemberShipProvider. Now I want that instead of reading the connection string from web.config file, it will read the connection string from external file every time. So that I am implementing the cutsom mebership provider class, this class inherits the MemberShipProvider class.    But the problem is that if I inherits the MemberShipProvider class then I have to impelment all of its method in my cutsom membership provider class, But I want to use all other inbuilt methods of MemeberShip. What can i do.I only want to add the code like below: public class CustomSqlMembershipProvider :MembershipProvider    {        public override void Initialize(string name, NameValueCollection configs)        {            base.Initialize(name, configs);                Connectionstring objProducts = // redaing the connection string.   }}But on compiltaion it is giving me the error does not implement inherit abstract member. Please Suggest me any idea.        Thanks In AdanaceAayushi

Problem with custom workflow action (SP2010, SPD2010)

We have created an assembly containing 3 custom actions to be used in SPD. Everything works correctly; however every Change and Publish cycle requires me to recreate the lines (steps) containing the custom actions. It is simple mechanical replacement but still is a pain and i would like to figure this out. I've spent considerable time on this already with no solution in sight. Tried clearing out proxy cache (http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/34632798-6e45-4eb3-ad3d-2f941c706cda ) Also checked web.config for non-referenced assemblies.  

Custom Action help!

  Question: Hi, we had a Custom List Context menu Item in "Actions menu" in SP 2007. and below is the class we used for that. Now if I would like to use the same code for SP 2010, then What will be my eqquivalent Code with SP Ribbon. For your Reference I am also including the Custom Action XML that we used in 2007. Basically, this code used to Create a menu item on the "Actions Menu" of either a document Library or any type of list. So, I am looking for a Button on the List Tab, that appears on all List Views for list and all Views of Document Library. When a user Clicks on that Button then the user is directed to a URL mentioned in the Code below. Let me know if it is not clear or need more info. Custom Action XML: <CustomAction Id="SomeCustom.Action" Location="Microsoft.SharePoint.StandardMenu" GroupId="ActionsMenu" Sequence="20" ControlAssembly="Some Key" ControlClass="Class mentioned below" /> Class Referenced in Above CustomXML using System; using System.Collections.Generic; using System.Text; using System.Web.UI; using System.Web.UI.WebControls; using Microsoft.SharePoint; using Microsoft.SharePoint.WebPartPages; using Microsoft.SharePoint.WebControls; namespace MyNameSpace { public class MyClass : WebControl { protected override void OnLoad(EventArgs e) { En

Custom action on click of certain type of folders in a lsharepoint list


We have a Moss 2007 set up and we are trying to have the ability where in we have some folders in a list marked as "confidential"., and when the user clicks on these folder, we want to pop up a disclaimer dialog to the user, and force the user to accept or reject it.

Also we want the ability to throw this popup when the user is directly navigatinig to a certain file that resides in the folder.

Any suggestions would be greatly appreciated.



Custom Action for specific External Content Type List


I have an External Content Type list instance feature in Visual Studio. Deploying the instance works fine. However, I can't create a custom action using RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Even if I specify the list Id as follows RegistrationId="{8F595340-5D08-4287-8BF6-30D50989D2F4}" or RegistrationId="8F595340-5D08-4287-8BF6-30D50989D2F4" I get nothing.

However, RegistrationId="600" works fine, but for all External Content Type lists.

I added the custom action with SharePoint Designer and it works as expected. When I generate a site template and import it into Visual Studio, the custom action uses RegistrationId="{$ListId:Lists/yourlistname;}" RegistrationType="List"

Creating a new site based on the site template creates the custom action correctly. However, deploying just the custom action does not work (feature deploys, but no custom action appears). I also tried RegistrationId="0x0100D67E541CC4BB6A4A9D62D22657ECFF68" RegistrationType="ContentType" with no luck. The content type id was pulled from the list instance using the object model.

I have to tie the custom action to a specific list instance. Because the li

Custom Action help!



We had a custom feature in SP 2007, that deployed a Custom Menu item on the List Actions menu in SP 2007. If I were to achieve same in SP 2010, via a button, what would be my code in terms of SPRibbon? I still want to use the control class, to initiate the custom button after the feature is activated. How can I achive this?

The Custom Action XML:





read http custom header from web service


cant read http custome header "MSISDN" from my web service ... same code works on regular asp.net page. Can anyone shade a light on that subject ?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend