basicchannel Posted September 18, 2012 Posted September 18, 2012 Hi, Simple thing. I'm trying to run the following command to add a new registry key: REG ADD HKEY_CURRENT_USER\Software\Location /v ValueName /t REG_DWORD /d "\\server\serverpath" /f So I'm basically trying to add a REG_DWORD value with the data string of a server path. Anyway, everytime I get the error: "Too many command line parameters" but as far as I can see it conforms completely with the command format. Can anyone see where I might be going wrong, because I can't? Thanks
Steve21 Posted September 18, 2012 Posted September 18, 2012 Hi, Simple thing. I'm trying to run the following command to add a new registry key: REG ADD HKEY_CURRENT_USER\Software\Location /v ValueName /t REG_DWORD /d "\\server\serverpath" /f So I'm basically trying to add a REG_DWORD value with the data string of a server path. Anyway, everytime I get the error: "Too many command line parameters" but as far as I can see it conforms completely with the command format. Can anyone see where I might be going wrong, because I can't? Thanks Do you have the exact line you're using? Obviously can change servernames etc, but kind of need to see the string Steve
Ergo Posted September 18, 2012 Posted September 18, 2012 (edited) @basicchannel If you are trying to add a REG_DWORD then you have to specitfy a number in /d More likely that you want to add a REG_SZ value (String) if the data is a path to a server? To check that out use Regedit to manually add the value you want in the registry and then use "REG QUERY HKEY_Local_User\Software\Location /ve" to show current values in that area of the registry and their name, type and data. Regards David Irwin Edited September 18, 2012 by Ergo 1
basicchannel Posted September 18, 2012 Author Posted September 18, 2012 OK, I really should have been more specific, so sorry about that. I'm trrying to add a value to HKCU\Software\Microsoft\Office\12.0\Outlook\Setup in the form of ImportPRF to specify a prf server path for setting up Outlook profiles automatically. I assumed it should be a REG_DWORD
Steve21 Posted September 18, 2012 Posted September 18, 2012 REG ADD HKCU\Software\Microsoft\Office\12.0\Outlook\Setup /v ImportPRF /t REG_SZ /d "\\server\serverpath" /f Should work. Even doing it as dword shouldn't give the error you got, unless you're copying an extra space in somewhere? Steve 1
basicchannel Posted September 18, 2012 Author Posted September 18, 2012 REG ADD HKCU\Software\Microsoft\Office\12.0\Outlook\Setup /v ImportPRF /t REG_SZ /d "\\server\serverpath" /f Should work. Even doing it as dword shouldn't give the error you got, unless you're copying an extra space in somewhere? Steve Well REG_SZ worked perfectly. Trying to add it as a REG_DWORD failed miserably with the 'Invalid command line parameter' error. Very strange
Arthur Posted September 18, 2012 Posted September 18, 2012 Trying to add it as a REG_DWORD failed miserably with the 'Invalid command line parameter' error. REG_DWORD's are usually numbers. e.g. reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t [color="#FF0000"]REG_DWORD[/color] /d [color="#FF0000"]1[/color] /f
Ergo Posted September 18, 2012 Posted September 18, 2012 Well REG_SZ worked perfectly. Trying to add it as a REG_DWORD failed miserably with the 'Invalid command line parameter' error. Very strange Glad you got it sorted David Irwin
basicchannel Posted September 19, 2012 Author Posted September 19, 2012 Basically I'm just being an idiot trying to add a string to a DWORD value.
Ergo Posted September 19, 2012 Posted September 19, 2012 I always say - there is no such thing as a stupid question, it's just that questions help point out the daft things we are trying to do! Regards, David Irwin
X-13 Posted September 19, 2012 Posted September 19, 2012 Well REG_SZ worked perfectly. Trying to add it as a REG_DWORD failed miserably with the 'Invalid command line parameter' error. Very strange I was going to say it was supposed to be REG_SV but I wasn't sure and didn't want to look stupid...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now