clivebuckwheat Posted July 31, 2011 Share Posted July 31, 2011 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. Link to comment Share on other sites More sharing options...
allen2 Posted July 31, 2011 Share Posted July 31, 2011 All lines ? Then if your %KEY% contain space you might need to double quote it. Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2011 Share Posted July 31, 2011 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 More sharing options...
clivebuckwheat Posted July 31, 2011 Author Share Posted July 31, 2011 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. Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2011 Share Posted July 31, 2011 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 More sharing options...
clivebuckwheat Posted July 31, 2011 Author Share Posted July 31, 2011 (edited) 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, 2011 by clivebuckwheat Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2011 Share Posted August 1, 2011 (edited) 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, 2011 by 5eraph Link to comment Share on other sites More sharing options...
clivebuckwheat Posted August 1, 2011 Author Share Posted August 1, 2011 (edited) 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, 2011 by clivebuckwheat Link to comment Share on other sites More sharing options...
Guest Posted August 1, 2011 Share Posted August 1, 2011 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 More sharing options...
clivebuckwheat Posted August 1, 2011 Author Share Posted August 1, 2011 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 Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2011 Share Posted August 2, 2011 (edited) 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, 2011 by 5eraph Link to comment Share on other sites More sharing options...
clivebuckwheat Posted August 2, 2011 Author Share Posted August 2, 2011 Thanks man, you came through for me big time. Link to comment Share on other sites More sharing options...
clivebuckwheat Posted August 2, 2011 Author Share Posted August 2, 2011 (edited) 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, 2011 by clivebuckwheat Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2011 Share Posted August 2, 2011 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 More sharing options...
clivebuckwheat Posted August 2, 2011 Author Share Posted August 2, 2011 (edited) 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, 2011 by clivebuckwheat Link to comment Share on other sites More sharing options...
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