Are you running from source? Windows doesn't like to allow you to explicitly assume the same path if you are running from a network share. Try download from source and let me know if it works. Alternately you could specify the full path to the .reg file as a full UNC path.
If it was me I'd take a little different approach: Use the reg add command. Unless you've got a LOT of values to import from .reg file it will most likely be easier using the reg add command, and then you don't need the .reg rile at all! Try doing reg add /? from a command line, it's easy to use.
Lemme know if either option helps.
All I'm basically doing is changing the homepage on IE in
So how do I go about doing so using your method?
HKCU is going to be tricky, because we generally don't run as any user, we run as the LocalSystem (computer) account. It won't have access to HKCU. Whether you use my method or your own you'll need to run as the currently logged on user or it won't work.
Outside of that problem here is what you'd need to put in the batch file:
reg add "hkcu\software\microsoft\internet explorer\main" /v "Start Page" /t REG_SZ /d "http://www.nicconet.com" /f
Created a new batch distribution package using the .bat file created using the script given. When attempting to push it out, is fails with this message:
Hash of file in cache did not match hash received on command line
any ideas what could have caused this?
Did you reset the package hash on the distribution package? (Right click on the package, choose "Reset package hash")
I just reset the hash by right clicking the package. I resent to the client. Landesk says it completed successfully. But when checking the registry, it still hasn't changed.
Did you set the package to run as current user? As I mentioned a few posts ago HKCU is going to be difficult because we don't run as the user, we run as LocalSystem (by defualt). Change the distribution package to run as logged on user. It's in the distribution package under Accounts.
I see. What if no one is logged on? How can I still be able to change the homepage for all users on the client? I assumed HKCU was the place to change the key for all users on the client. Is there another place in the registry that would be better to change to affect all users?
Alright, you've hit on the big problem. If no one is logged on the task will fail and say that no one is logged on.
To set the value for every user you need to:
1 - Open HKEY_USERS.
2 - List all subkeys
3 - Determine which of the subkeys are legitimate users keys
4 - Open each one of the legitimate ones and treat that as your HKCU key
5 - Everything else should be the same.
This is extremely difficult to do in a "simple batch file". It's relatively easy to do in VBScript or AutoIt, depending on your level of skill with those utilities.