|
#1
|
|||
|
|||
|
I created a custom session variable named %InstallDirectory%, and assigned a default path to this variable (%ProgramFilesFolder%\%ProductName%).
Then in the Start Up action, I try/want to check and see if the value already exists in the registry and then if it does, assign it to the Session Variable. After several failed attempts, I thought I would see if anyone can tell me what I am doing wrong. SubKey = ".HKEY_CURRENT_USER\\Software\\" .. SessionVar.Expand("%CompanyName%") .. "\\" .. SessionVar.Expand("%RegistryName%"); Value = "UserFileInstall"; InstallDirectory = Registry.GetValue(HKEY_LOCAL_MACHINE, SubKey, Value, true); if "InstallDirectory" ~= "" then SessionVar.Set("%InstallDirectory%", InstallDirectory) result = Dialog.Message("Notice", SessionVar.Expand("%InstallDirectory%"), MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1); end Last edited by Sheritlw; 09-28-2004 at 11:44 PM. |
|
#2
|
||||
|
||||
|
You have gone overboard with your SubKey definition as the REGISTRY.GETVALUE command already refers to the LocalMachine entry so you are defining twice.
Should be something like: Quote:
Also your GETVALUE refers to HKLM then in your SUBKEY you refer to CurrentUser - are you sure you meant this? Perhaps you were trying to get this: Quote:
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using registry for bookmarking | AXXESS | AutoPlay Media Studio 5.0 | 12 | 11-01-2004 10:22 AM |
| HOWTO: Merge Registry Keys | Desmond | Setup Factory 6.0 Knowledge Base | 0 | 10-17-2003 10:31 AM |
| Registry Features | Dwayne | Setup Factory 6.0 | 1 | 02-21-2003 04:30 AM |
| INFO: Finding Shell Folders in the Registry | Support | Setup Factory 6.0 Knowledge Base | 0 | 10-10-2002 04:52 PM |
| HOWTO: Merge REG Files with the Registry | Support | Setup Factory 6.0 Knowledge Base | 0 | 09-23-2002 03:48 PM |
All times are GMT -6. The time now is 10:21 PM.








Linear Mode

