July 31, 201115 yr I have a directory called C:\Applications\CS4\ Inside of the folder is the CS4 installation filesREG ADD %KEY% /V TITLE /D "Post Image Configurations" /fREG ADD %KEY%\020 /VE /D "Installing Adobe CS4" /fREG ADD %KEY%\020 /V 1 /D "C:\Applications\CS4\Setup.exe --mode=Silent --deploymentFile="Adobe Creative Suite 4 Web Premium.install.xml"" /fI keep getting a REG ADD ERROR.
July 31, 201115 yr 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
July 31, 201115 yr Author thanks but that line causes the install to bomb, it seems like it is installing and then it moves on to the next item in the list way to quickly.
July 31, 201115 yr 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.
July 31, 201115 yr Author I made a batch file called ACS4.cmdin 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" /fREG ADD %KEY%\030 /V 1 /D "C:\Applications\CS4\ACS4.cmd" /fand 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 questionhow can I add this command using a REG ADDREG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /f I triedREG ADD %KEY%\010 /VE /D "Delete printer" /fREG ADD %KEY%\010 /V 1 /D "REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /fI get a reg add error Edited July 31, 201115 yr by clivebuckwheat
August 1, 201115 yr I made a batch file called ACS4.cmdin 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" /fREG ADD %KEY%\030 /V 1 /D "C:\Applications\CS4\ACS4.cmd" /fand 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\"" /fhow can I add this command using a REG ADDREG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Printers\,,ipp://dc2,2F24P" /fYou 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 August 1, 201115 yr by 5eraph
August 1, 201115 yr Author WORKED! Thank you sir.I have another questionTo 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 August 1, 201115 yr by clivebuckwheat
August 1, 201115 yr 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
August 1, 201115 yr Author thank you it worked!!One more question I need to check the first 4 letters of the computer name would it be?if /i "%COMPUTERNAME:0,4%" ==2F26 goto :2F26
August 2, 201115 yr That's close. A few reminders:The colon and tilde (:~) must be used to extract a substring from a variable.Don't use spaces before or after the == when comparing strings.If the string variable name is surrounded by quotes then the string to be compared must also be surrounded by quotes.if /i "%COMPUTERNAME:~0,4%"=="2F26" goto :2F26 Edited August 2, 201115 yr by 5eraph
August 2, 201115 yr Author 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 " /fI spoke to soon, the default printer line, never changes to the correct printer Edited August 2, 201115 yr by clivebuckwheat
August 2, 201115 yr 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
August 2, 201115 yr Author Thanks again it worked out greatI have another question on the printer deletion it works fine, I would think there is an unnecessary F alsoThis 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" /fI 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\"" /fAlso 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 August 2, 201115 yr by clivebuckwheat
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now