AC

registry value names with no data

I'm trying to set up an ODBC driver. The existing registry entries for ODBC include a couple with a value name, but no value data (string). I've not found a way to do that with AI -- it won't let me create a registry entry unless there is value data to go with it. Am I missing something or is that something of a glitch?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Yes, I am afraid it is a bug. I will report it to our development team.

Best regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
AC

Re: registry value names with no data

Looks like there's no (documented) way to create a "default" value for a key.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Yes, that is part of the same bug I was talking about.
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Phill
Posts: 10
Joined: Mon Apr 03, 2006 4:37 am

"Looks like there's no (documented) way to create a "default" value for a key."

Is there any way to do this now ?
I am using version 3.8.1.

Thanks
vonix19
Posts: 3
Joined: Mon Apr 03, 2006 4:31 am

You can create custom actions to create your OBDC using vb script. Is this what you are looking for?

Option Explicit

Dim objShell, Shell
Set Shell = CreateObject( "WScript.Shell" ) Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\Database", "", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\Description", "Database_Name", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\Driver", "C:\WINDOWS\System32\SQLSRV32.dll", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\LastUser", "", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\Server", "Server_Name", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\Database_Name\Trusted_Connection", "Yes", "REG_SZ"
Shell.RegWrite "HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources\Database_Name", "SQL Server", "REG_SZ"
Phill
Posts: 10
Joined: Mon Apr 03, 2006 4:37 am

"You can create custom actions to create your OBDC using vb script. Is this what you are looking for? "

No, I want to create a "default" value for a registry key.

E.g. If you look at a key using regedit you will notice they all have a value named default.

Try "HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail"

I tried to do it by creating a key named default but AI will create a new key named default but not modify the actual default value.

I am doing this to set the default MAPI client.

Thanks for the example VB code. I will write a custom action to do this and will post my results.

It would be nice if this was possible from the Registry section as it is otherwise very good.

:)
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

In order to modify the (Default) value, just follow the same steps used to update any registry value, but leave the "Name" field empty when creating the value.

This procedure is described in the Advanced Installer help pages or you can find it at the following URL location:
http://www.advancedinstaller.com/user-g ... value.html

Please let me know if you encounter any problems.

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
Phill
Posts: 10
Joined: Mon Apr 03, 2006 4:37 am

Thanks. That worked first go.

You might want to change the Documentation to explain how to do this.
You could also put a check box labled "Default" which blanks out the name for "Default" values when selected. Anyway, thanks for the quick response.

:D

Return to “Common Problems”