Discussion:
HKEY_LOCAL_MACHINE Registry Access Denied from TSP in Windows 7 onwards
(too old to reply)
Ravi Kansangara
2014-02-28 06:47:39 UTC
Permalink
Dear all,

I am developing TSP for my PBX.

I want following key path to store my TSP GUI Parameters like PBX IP address, Port, Debug Log File Path, etc...

HKEY_LOCAL_MACHINE\\SOFTWARE\\<Company Name>\\<Product Name>\\

So When user select "Configure" option for my TSP from "Phone & Modem Option"
my TSP GUI pop ups & Whatever configuration is done by user would be saved in above registry Path.

I have opened above Registry key with "KEY_ALL_ACCESS".

Observations:

1. This works fine in Windows XP that is i can create, modify & delete registry
keys from my TSP routines.

2. From Windows 7 on wards, it gives error of ACCESS_DENIED for all registry
operation like create, modify, delete. Though i can read registry keys
that are already present.

3. By Default "Telephony service" in Windows 7 is running under
"Network Account". If i change it to run under "Local Account", registry
Problem solves.

4. Any Console or windows Application can access registry without any extra
efforts. Problem arises in TSP as it is not application &
TSP library (.tsp file) is loaded by Telephony Service which has no
write/modify access of Registry.

Work Around:

1. One can create one console application which will write/modify registry.
So whenever TSP configuration changes, TSP will invoke that application with
appropriate input Parameters to write/modify particular registries.

Problem:

1. As i don't want that user manually change the account of "Telephony Service"
from "Network account" to "Local Account". Also i don't want above work
around.

How can i access registry HKEY_LOCAL_MACHINE from my TSP ?

Any Suggestions are appreciated.
Thanks.
Ravi Kansangara
2014-03-24 06:30:58 UTC
Permalink
Post by Ravi Kansangara
Dear all,
I am developing TSP for my PBX.
I want following key path to store my TSP GUI Parameters like PBX IP address, Port, Debug Log File Path, etc...
HKEY_LOCAL_MACHINE\\SOFTWARE\\<Company Name>\\<Product Name>\\
So When user select "Configure" option for my TSP from "Phone & Modem Option"
my TSP GUI pop ups & Whatever configuration is done by user would be saved in above registry Path.
I have opened above Registry key with "KEY_ALL_ACCESS".
1. This works fine in Windows XP that is i can create, modify & delete registry
keys from my TSP routines.
2. From Windows 7 on wards, it gives error of ACCESS_DENIED for all registry
operation like create, modify, delete. Though i can read registry keys
that are already present.
3. By Default "Telephony service" in Windows 7 is running under
"Network Account". If i change it to run under "Local Account", registry
Problem solves.
4. Any Console or windows Application can access registry without any extra
efforts. Problem arises in TSP as it is not application &
TSP library (.tsp file) is loaded by Telephony Service which has no
write/modify access of Registry.
1. One can create one console application which will write/modify registry.
So whenever TSP configuration changes, TSP will invoke that application with
appropriate input Parameters to write/modify particular registries.
1. As i don't want that user manually change the account of "Telephony Service"
from "Network account" to "Local Account". Also i don't want above work
around.
How can i access registry HKEY_LOCAL_MACHINE from my TSP ?
Any Suggestions are appreciated.
Thanks.
Dear All,

Problem Resolved.
I Found one alternate Solution.

Administrator can Change the Permissions of Registry Keys:

1. Run "regedit" command.
2. Select following Key
HKEY_LOCAL_MACHINE\\SOFTWARE\\<Company Name>\\<Product Name>\\
3. Write Click on Key to modify Access.
4. Select Option "Permissions.."
5. Give Access to All Users.

I have try to Change Permissions of My Key in Registry.
Now i can able to read/write/modify registry values from TSP routines that are created by install shield setup.

So i have added function in Install Shield Script that will Change the Permissions of Registry Key.

Thanks.

Loading...