Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
clivebuckwheat

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.

Share this post


Link to post
Share on other sites

All lines ? Then if your %KEY% contain space you might need to double quote it.

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
Guest

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest

That's close. A few reminders:

if /i "%COMPUTERNAME:~0,4%"=="2F26" goto :2F26

Edited by 5eraph

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...