I've created a two line batch that checks for the existence of a file and if it exists, imports a reg key with the correct setting values. It needs to work with Windows 7 (32 & 64-bit) as well as Windows XP 32-bit. This is being assigned as a logon script via GPO.
IF EXIST "%programfiles(x86)%\path_to_file\file.exe" REG IMPORT "path_to_reg\file.reg" IF EXIST "%programfiles%\path_to_file\file.exe" REG IMPORT "path_to_reg\file.reg"
This works flawlessly with Windows 7. However, I am also trying to use it for clients using Windows XP and it is there that I am having difficulty. If I run the batch from the logged in user's command-line in Windows XP it works and the values are imported. It simply does not add the values when run at logon in Windows XP. I should also add that I have tried this using both regedit.exe /s and reg import.