Make the data for a registry key point to the installati​on folder of my app.

I have an application that creates files with a unique file extension (.myextension).  These files should be associated with a particular icon so that the icon is shown when they are viewed in Windows Explorer, etc.  I know how to do this when I create an installer by adding several registry keys and values under the [HKEY_CLASSES_ROOT] key as shown below.
                   key                                                name              type                                   data
[HKEY_CLASSES_ROOT]
     .myextension                                         (Default)          REG_SZ               Myextension.file.type.record
     Myextension.file.type.record              (Default)          REG_SZ               Text description of file type
               DefaultIcon                                  (Default)          REG_SZ               path to the icon file.
The key for the file extension record (.myextension) has a default value where the data points to the key for the file type record (Myextension.file.type.record).  The data for the default value of the Myextension.file.type.record key is just a description for the file type.  There is also a subkey called DefaultIcon.  The data for it's default value is the path to the file containing the icon that is to associated with the file type.  If the file contains more than one icon, it may be necessary to modify the data (path) to indicate which icon to use.
So, this is all good if path to the file containing the icon is known.  I added an icon file to the build when I built my application and it will be installed in a known location within the directory where my application is installed.  The location is [InstallDirectory]data\myicon.ico, where [InstallDirectory] is the directory where my application is installed.  The installation process, including the addition of registry keys is handled by an installer that I have created.  The problem arises when the user choses to install to a location other than the default directory specified in the installer.  I can't know before hand where that will be.  How can I specify the path in the DefaultIcon key so that it points to the correct location after installation?  Is there some symbol that I can use for the installation directory so that the path will be set correctly at installation time? 

Hi cbfsystems,
If correctly understand what you are trying to do, check this out.  This shows you how to add a user-specified install directory to a registry entry in the installer build spec.
Cheers,
Brian A.
National Instruments
Applications Engineer

Similar Messages

  • Where can I find the reference for modifying registry key for acrobat reader

    I am a Web Developer and I need to limit the option the user may choose in acrobat reader plugin.
    I doubt if there is option to configure in Windows Registry on HKCU\Software\Adobe\Acrobat Reader\9.0\PrefsDialog.
    Anyone know where I can find the reference for those registry key?
    I have downloaded sdk91_v2_win.zip file but I cannot find any reference.

    Refer to this:
    Direct Download Links for Adobe Software
    Mylenium

  • HT1364 I have moved my library to an external hard drive and changed the location of the iTunes media folder in Preferences, but every time I close and re-open iTunes, I have to do it all over again.  How can I make the iTunes media folder change permanen

    I have moved my library to an external hard drive and changed the location of the iTunes media folder in Preferences, but every time I close and re-open iTunes, I have to do it all over again.  How can I make the iTunes media folder change permanent?  I have an older machine with Windows XP.

    I don't believe mounting the hard drive should be necessary, unless you have several external drives and want your computer to recognise them as folders, rather than drives. I've never had to mount a hard drive, ever. If you don't know how to do it, then it shouldn't be necessary now.
    Try this:
    Prepare iTunes so that it can see the external drive.
    Make a note of which drive-letter the external drive has been allocated. (Look in Windows Exploer)
    Look at the file location for a song. Make sure it plays (and therefore that iTunes has found it). Highlight it and select File/Get Info/Summary>Where: and make a note of the drive letter for that song.
    Close and shut down the computer.
    The next time you turn the computer on again, connect the external drive
    Before you start iTunes - check the external drive in Windows Explorer. Is it ready, does it have the same drive-letter that it had last time? Can you go into the drive and see the files on it?
    Once you can, start iTunes. (If the drive lettter has changed, you need to work out why before going any further.)
    If iTunes fails to find your external drive, you need to check where iTunes is looking for your Library.
    Select the same song you checked before (presumably iTunes can no longer find it). Follow the procedure for locating it. You should be able to see where iTunes thinks the file is. It's the drive that counts. Which drive letter is iTunes looking at? Is it the same one that it was previously (which should also be the same one that the drive has now).
    What happens, which step do you have problems with?
    Message was edited by: the fiend

  • How to read the default value for a Registry Key

    I am trying to use webutil 1.0.2 Client_win_api_environment.read_registry to read the client registry key HKEY_CLASSES_ROOT\.xls, but the function is raising no_data_found. I can read the registry key in Regedit. I am logged on as myself as a non-admin NT user.
    P.S: The Client_win_api_environment.read_registry can actually read HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\FORMS90_PATH because FORMS90_PATH is a registry ENTRY, whereas .xls in HKEY_CLASSES_ROOT\.xls is a KEY, but I still need the DEFAULT value of the key and it does NOT seem to work with client_win_api_environment.read_registry
    My platform: Windows NT 4, Developer 9i 9.0.2.12.2, Oracle database 9.2.0.4.0, Oracle 9iDS
    Webutil.log
    ===========
    192.168.0.99:Lewis: 2003-Dec-17 16:36:44.998 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.08 WUL[getProperty()] Value of WUL_ADD_PARAMETER=3
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.08 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to B|14|33|50|0|2000
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.28 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.28 WUL[getProperty()] Value of WUL_ADD_PARAMETER=4
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.38 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to B|14|33|50|0|0
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.48 WUL[getProperty()] Getting property WUL_ADD_PARAMETER
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.48 WUL[getProperty()] Value of WUL_ADD_PARAMETER=5
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.58 WUL[setProperty()] Setting property WUL_INVOKE_SPEC to 1|14|33
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.68 WUL[getProperty()] Getting property WUL_INVOKE
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.68 WUL[getProperty()] Value of WUL_INVOKE=-1
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.78 WUL[setProperty()] Setting property WUL_PARAM_PROPERTIES to F|14|3
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.88 WUL[getProperty()] Getting property WUL_PARAM_VALUE
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.88 WUL[getProperty()] Value of WUL_PARAM_VALUE=
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.98 WUL[setProperty()] Setting property WUL_DESTROY_PARAMLIST to 14
    192.168.0.99:Lewis: 2003-Dec-17 16:36:45.98 WUL[VBeanCommon.eraseFromObjectCache()] Removed cache reference to Object 14
    Lewis Choo Man
    CMIC,
    Canada.

    Hi Manohar,
    You have to give Distribution Key "1" in the Plannner Profile as well as if you take a column for Distribution Key seperately in  your Planning Layout for Cost Element Planning, in the Excel file, you can give Distribution Key as "1" in the respective column. When you upload the data through Excel, the system will take the DKey as "1" only.
    I hope it will solve your problem. Pls revert back for further assistance..
    Srikanth Munnaluri

  • How can I avoid the need for Administra​tor rights for open registry key.vi

    Dear wire workers.
    I would like to do an EXCEL export.
    Therefore I like to check if EXCEL is installed or not.
    I use 'open registry key.vi' and read out the Excel\InstallRoot.
    If there is an installed EXCEL than I export the data using ActiveX.
    Everything works like a charm with LV 8.5.
    The problem I have is that 'open registry key.vi' useses RegOpenKeyExA from the Advapi32.dll.
    RegOpenKeyEx does, in fact, create a non-existing key and returns 0 (ERROR_SUCCESS?).
    LONG lRegResult = RegOpenKeyEx(HKEY_CLASSES_ROOT, m_RegSubKey, 0, KEY_QUERY_VALUE + KEY_WRITE, &hkRegistry);
    Successfully opens or creates m_RegSubKey under HKEY_CLASSES_ROOT.
    Is there a way aroun this call?
    In fact you need administrator rights to do this call because of the try to write a non exsisting key.
    In my case this avoids the EXCEL export and any kind of registry access from LabVIEW without administrator rights.
    :-) Who the hell has done this ;-)
    All ideas are welcome
    With kind regards
    Martin Kunze
    KDI Digital Instrumentation.com
    e-mail: [email protected]
    Tel: +49 (0)441 9490852

    Hi Martin
    Did you try to wire a "KEY_READ" constant to the security access mask input of the open registry key VI? I had a similar problem, if you just need to read a key or check if it's present use read access only, that should work.
    Hope this helps,
    Daniel

  • Query for specific registry key

    hi all,
    could someone,help me on how to query sms DB about specific registry key.
    i need to create collection based on this query:
    all machines that have on the HKLM\software\microsoft\sms\mobile client\software distribution\execution history\system
    path a specific package ID entry.

    Look at Program Rerun behavior setting on an advertisement
    http://technet.microsoft.com/en-ca/library/bb694016.aspx
    Program rerun behavior
    Specifies whether the advertised program will be rerun on the client computer if it has previously been run before the scheduled mandatory time.
    Always rerun program: The program will always be rerun on the client when the advertisement is scheduled, even if the program has already
    been successfully run. This is particularly useful when using recurring advertisements in which the program is routinely updated, as with some virus detection software.
    http://www.enhansoft.com/

  • How do you make the icloud contacts folder the default contacts

    I have set up iCloud Contacts on my PC running Windpws 7, with MS Office 2010.  Whenever I add a name in an email, it goes and looks for that name in my old contacts foler, not the new iCloud folder that was created when I added iCloud.   How do I get Outlook to default to the new iCloud contacts?

    Outlook will not use a subscribed folder (unless it is from MS Exchange) as the default folder, instead you should change the Outlook search parameters to look in the iCloud folders.
    Here are the directions to do that.

  • HT1688 How can I make the keyboard go away in an app

    How can I make the keyboard go away in an app

    Tap the keyboard icon in the bottom right corner.

  • Custom Map in flash using XML data for dynamic map and point of intrest loading...

    Been some time since I have used Flash for anything...
    I'm working on a little project to dynamically build a map
    and set points of interest on the map. At this time I have the
    (mySQL) data being queried and formatted with PHP and pushing the
    data to Flash as XML.
    In starting the project I'm a bit lost... I mean I have my
    data and a good XML format but as it is I'm lost on parsing the
    data in Flash and assigning its values to movie clips or other...
    I've looked at the Loader Component and the XML Connector
    Component and find I can get that to work at all...
    My second though was to create a single movie clip on stage
    and give it an instance name of "Background" and have it load the
    URL of an image given in the attached XML doc... Node "a_zone" and
    the value given to attribute "image"... But this brings me back to
    square one of not quite understanding Flash and parsing XML... With
    this second idea I would use AS to create a movie clip, set it's X
    & Y cords and load an image to it based on the XML attributes
    listed in the "Gatherable" node (one for each node).
    Any suggestions, examples or related info is welcome...
    Thanks in advance!

    Okay, that really wasn't what I was looking for... But I did
    go back and RTM :-)
    Here's what I have... 1st frame:
    2nd Layer: movieclip with the instance name "currentPicture"
    The image loads into "currentPicture" from the URL given in
    the XML "a_zone" node attribute "image" just fine....
    But I'm not able to grab the attributes of each "Gatherable"
    node it seems... am I missing something or just not pointing to the
    right node?
    I keep getting:
    undefined
    undefined
    undefined
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"
    Error opening URL
    "file:///C|/apache2triad/htdocs/gatherer/flash/undefined"

  • Load Same Text data for all language key

    Hello Everyone,
    I have a datasource with Material and Desc fields but no language key.I need to load the same desc into my infoobject for all the languages i am maintaining (EN/DE/IT/FR/PL). Is this possible?
    Thanks,
    Ajay.D

    Hi Ajay,
    you can load same description for all the languages by maintaining constant language value at Transfer rules/ Transformations.
    but here you need to change the constant value for each language.
    Ex, if you are loading for EN, maintain language as Constant "EN".
    and then for DE, maintain language as Constant "DE".
    but this is repetitive process, if new materials are added then need to load again.
    Best Regards.
    Edited by: Daya Sagar on Sep 16, 2009 11:16 AM

  • Meta Data for Outlook (when a message is moved to another folder)

    chris.hone.5688 wrote:
    You need to have audit logging switched on to see this.
    https://technet.microsoft.com/en-us/library/ff459237(v=exchg.150).aspxThank you Chris, this may help us in the future.  No way you know of getting this without audit login

    Hi All,
    We are having an issue at the moment (I cant go into detail) and would like to know if there is any way to pull the meta data from an e-mail to see when it was moved from the main inbox to another folder.  I dont even know if this is possible to get but thought this is the best place to ask.
    We are running outlook 2013 on windows 7 and it is an excahnge account (hosted no local)
    Thanks for the help in advance
    John
    This topic first appeared in the Spiceworks Community

  • The ReFS File System Silently Deletes Folders Without Your Consent? How to Make the File or Folder Disappear with a Simple Rename Operation

    While solving issues with ReFS not deleting some nested folders when I delete its parent, I've noticed that ReFS automatically
    removes the folder without even asking you after you rename it by adding the exclamation mark to the beginning of its name.
    For example:
    In Windows Explorer press Ctrl+N to create a new folder and name it somehow, like Test
    Select this folder and hit F2, then add the ! mark at the beginning renaming the folder to !Test.
    Hit ENTER to change the name.
    Hit F5 to refresh Windows Explorer.
    Voila! The folder disappeared without your consent.
    Why is that?
    Well this is the world we live in And these are the hands we're given...

    Is that specific to Windows TP? Even a specific build?
    I could not repro on Windows 2012 R2.
    I have no unused space on my Win TP system, so could not try there.
    -- SvenC

  • Registry Key or File needed for login status

    Good afternoon,
    I'm looking for a registry key or file or even some string inside a file that would determine whether or not I'm logged into Novell(Not workstation only or disconnected), the reason is for a home grown app we have that needs to copy data off a UNC share but if they are not on the network I want it to fail instantly instead of timing out waiting for the network share to respond.
    Thanks in advance,
    Tim

    I found a variable that I believe will work. WINDOWS_LOGIN Thanks anyway. If anybody has other things to look at please post as I'm not 100% on this yet.

  • CuciLync 9.2 - registry key configuration does not work as expected

    Hi,
    according to the Administration Guide for CuciLync 9.2.2 some registry keys are supported to configure the client.
    In the chapter 'Phone Parameters' there is a statement that four registry keys are supported:
    CcmcipServer1
    CcmcipServer2
    TftpServer1
    TftpServer2
    In the next chapter 'CTI Load Balancing' there is an explanation that the registry key UseCUCMGroupForCti is also supported.
    => Does that mean that five registry keys are supported and not only four ?
    My next questions leads to the possible values for these registry keys.
    With CuciLync 8.6 it was possible to leave the registry keys for CcmcipServer empty.
    In this case the IP addresses for CcmcipServer were automatically defined by downloading the config file.
    And with UseCUCMGroupForCti these IP addresses were 'copied' to CtiServer.
    That means with CuciLync 8.6 there was need to define CcmcipServer and CtiServer.
    Only the TftpServers were configured by registry keys.
    => Is this also supported with CuciLync 9.2 ?
    => If no: In which future version do you plan to implement this ?
    => If yes: Are there any extra settings needed ? Because it does not work at the moment
    Thanks for your feedback
    Best Regards
    Carsten Lucy
    (Bayer Business Services)

    According to MSDN:
    When caching is enabled, the module caches the service information data until it polls the Service Control
    Manager and discovers that the data has changed. If changed, the module updates the cached data and returns it as output. You can disable this caching feature, but doing so will cause the module to return data at every polling interval instead of only returning
    when the data has changed or when the polling interval count has reached a multiple of 10.
    However, the configuration is DisableCaching, and the default is False. Go figure that one out. Gotta
    love Microsoft configuration names and documentation! If true, then it's not disable..... :)
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Duplicate entries for same primary key

    Hi,
    I am facing problem to insert 2 or more than 2 entries for same PRIMARY KEY in the database table.
    As I know that we can’t do that. But Client has given me the XL sheet which contains 2 entries for same primary key. How can it be done? Please let me know how can I insert 2 data for same primary key in database table.
    Waiting for your answers.
    Thanks in advance.
    Regards,
    Prasanna

    Hi,
      You can achieve this .... All you have to do is to add a new field (a Sequence Number ) to the table. This number will be incremented for each duplicate primary keys. For example....
    Consider the excel file has duplicate entries 3 primary keys. Now you add a new field named Sequence Number in your DB Table.....
    When you load the data into Database...then the records will look like this...
    Key1     Key2    Key3    Seq
    A          B          C           1
    A          B          C           2
    A          B          D           1
    A          B          D           2
    A          C          D           1
    A          C          E           1
      and so on...
    I hope this solves your purpose.....
    Whenever there are duplicate entries, such as the one mentioned in your scenario, then a new field can be added in Database. This field acts like a count or sequence number.... Thus you can maintain unique records.
    Regards,
    Vara
    Regards,
    Vara

Maybe you are looking for

  • PDF's no longer appear after download

    When I click on a .pdf link I get a black window while the file downloads but it is never rendered after the download completes. I have Adobe Reader installed as well as the Apple Preview. If I control click the link and "Download linked file as..."

  • Cannot sync my ipad because the connection was reset?

    I can't sync my ipad or iphone because an error code comes up stating that it cannot be synced because the connection was reset.  It comes up after the backup process of the sync session.

  • Standard Navigation Toolbar Items Missing

    Just changed my Windows XP PC on which I have been running Firefox for years, for a new PC with Windows 7 Pro. Installed Firefox on the new PCbut the Navigation Tool Bar looks different (dull grey instead of light) & 'Reload, Stop Reload etc. items a

  • Setting up OD / DNS in a Mac/Win Envoironment

    Hi, I'm not really new to MacOsX but to setting up an XServe: Trying to do what I want I experienced a few problems and didn't find a solution so hopefully someone can give me a hint - what i'm trying to do is the following: I have an XServe that sha

  • Multiple Databases in one Business Area?

    Can I put multiple databases into the same Business Area? The crux of the problem is as follows: I am migrating data from one database to another. There will be a period of dual running, whilst the products are migrated. I want to be able to write re