Jump to content

Tell me what is wrong with this. REG ADD ERROR


Recommended Posts

I have a directory called C:\Applications\CS4\

Inside of the folder is the CS4 installation files

REG ADD %KEY% /V TITLE /D "Post Image Configurations" /f

REG ADD %KEY%\020 /VE /D "Installing Adobe CS4" /f

REG ADD %KEY%\020 /V 1 /D "C:\Applications\CS4\Setup.exe --mode=Silent --deploymentFile="Adobe Creative Suite 4 Web Premium.install.xml"" /f

I keep getting a REG ADD ERROR.

Link to comment
Share on other sites


Nested quotation marks need to be escaped using backslashes (\):

REG ADD %KEY%\020 /V 1 /D "C:\Applications\CS4\Setup.exe --mode=Silent --deploymentFile=\"Adobe Creative Suite 4 Web Premium.install.xml\"" /f

Link to comment
Share on other sites

Try using a shorter deploymentFile name without spaces—and remove the nested quotes. If the problem persists then there is likely either a problem with your XML file or your Setup.exe command line.

For further Reg.exe troubleshooting you could try testing shorter batch files that only include the SET %KEY% and REG.ADD commands, then run and check the registry for the expected result. I see nothing wrong with the REG ADD command I gave above. It works for me in XPx64. The problem would seem to be with the application to be installed.

Link to comment
Share on other sites

I made a batch file called ACS4.cmd

in it I put

Setup.exe --mode=Silent --deploymentFile="Adobe Creative Suite 4 Web Premium.install.xml"

I then called it with this

REG ADD %KEY%\030 /VE /D "Installing Adobe CS4" /f

REG ADD %KEY%\030 /V 1 /D "C:\Applications\CS4\ACS4.cmd" /f

and the install ran through without issue, so I know the command line and the XML file is ok but calling the cmd file generates a dos window as you know.

I have another question

how can I add this command using a REG ADD

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /f

I tried

REG ADD %KEY%\010 /VE /D "Delete printer" /f

REG ADD %KEY%\010 /V 1 /D "REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /f

I get a reg add error

Edited by clivebuckwheat
Link to comment
Share on other sites

I made a batch file called ACS4.cmd

in it I put

Setup.exe --mode=Silent --deploymentFile="Adobe Creative Suite 4 Web Premium.install.xml"

I then called it with this

REG ADD %KEY%\030 /VE /D "Installing Adobe CS4" /f

REG ADD %KEY%\030 /V 1 /D "C:\Applications\CS4\ACS4.cmd" /f

and the install ran through without issue, so I know the command line and the XML file is ok but calling the cmd file generates a dos window as you know.

The CMD is located in the same directory as the Setup command, so I can assume that the XML file's location is in the current directory. When using RunOnceEX, there is no current directory, and the Setup command may not make the same assumption that I just did. It may help to add the directory name to the deploymentFile switch like so:

REG ADD %KEY%\020 /V 1 /D "C:\Applications\CS4\Setup.exe --mode=Silent --deploymentFile=\"C:\Applications\CS4\Adobe Creative Suite 4 Web Premium.install.xml\"" /f

how can I add this command using a REG ADD

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /f

You still need to escape nested quotes. And don't forget to check your quote pairs.

REG ADD %KEY%\010 /V 1 /D "REG DELETE \"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P\" /f" /f

Edited by 5eraph
Link to comment
Share on other sites

WORKED! Thank you sir.

I have another question

To add this command using reg add cscript %windir%\system32\Printing_Admin_Scripts\en-us\prnmngr.vbs -t -p "\\ipp://dc2.Mydomain.com\2F26P"

is this correct?

REG ADD %KEY%\030 /V 1 /D "cscript %windir%\system32\Printing_Admin_Scripts\en-us\prnmngr.vbs -t -p "\\ipp://dc2.Mydomain.com\2F26P\" /f " /f

Edited by clivebuckwheat
Link to comment
Share on other sites

You missed one backslash (at the beginning of "\\ipp...):

REG ADD %KEY%\030 /V 1 /D "cscript %windir%\system32\Printing_Admin_Scripts\en-us\prnmngr.vbs -t -p \"\\ipp://dc2.Mydomain.com\2F26P\" /f " /f

Link to comment
Share on other sites

You missed one backslash (at the beginning of "\\ipp...):

REG ADD %KEY%\030 /V 1 /D "cscript %windir%\system32\Printing_Admin_Scripts\en-us\prnmngr.vbs -t -p \"\\ipp://dc2.Mydomain.com\2F26P\" /f " /f

I spoke to soon, the default printer line, never changes to the correct printer

Edited by clivebuckwheat
Link to comment
Share on other sites

Looks like I missed the extra unnecessary /f at the end. Sorry about that.

REG ADD %KEY%\030 /V 1 /D "cscript %windir%\system32\Printing_Admin_Scripts\en-us\prnmngr.vbs -t -p \"\\ipp://dc2.Mydomain.com\2F26P\"" /f

Link to comment
Share on other sites

Thanks again it worked out great

I have another question on the printer deletion it works fine, I would think there is an unnecessary F also

This actually worked for the printer delete, I would have that there was too many /f?

REG ADD %KEY%\100 /V 1 /D "REG DELETE \"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2.mydomain.com,2F26P\" /f" /f

I tried but I was prompted to choose yes after every delete.

REG ADD %KEY%\100 /V 1 /D "REG DELETE \"HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2.mydomain.com,2F26P\"" /f

Also trying to add the following command to the RunOnce in the registry is this correct.

REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce\KickOff"="rundll32.exe iernonce.dll,RunOnceExProcess"

Edited by clivebuckwheat
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...