Link to home
Start Free TrialLog in
Avatar of amlife
amlife

asked on

Need help in creating a batch file that will add and remove some registy keys.

Hello everyone

This is my first post, I wish i will have some luck with this

we have installed Adobe Acrobat Pro 9 on 3 Pcs in the office today

we are getting this Error when we try to launch the software

"Microsoft Visual C++ Debug Library
Runtime Error!
Program: C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe
The application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. "

after troubleshooting for hours we found a solution which involves editing 2 registry keys .. it must be done before lunching the application or it will not work

so want I want to do,  is to create a batch file that can be added to the login script so it can be done automatically without user awareness

the registry keys that need to be chnaged

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

a string value "AppData"   chnage the current value to C:\Adobe

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

a string value "AppData"  chnage the current value to C:\Adobe


I created a batch file but I did not have luck runing it (every time i try to run it I get this error "Invalid command-line parameters" )

my batch file

REG DELETE HKCU\Software\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders /v AppData

REG ADD HKCU\Software\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders /v AppData /t REG_SZ /d C:\Adobe

REG DELETE HKCU\Software\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders /v AppData

REG ADD HKCU\Software\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders /v AppData /t REG_SZ /d C:\Adobe
pause

Please advice

Thank you

Avatar of sirbounty
sirbounty
Flag of United States of America image


Couple of things...
You don't need to delete the value - just overwrite it...

Secondly, your key shows Software twice.
You also son't have to specify the type, if it's string - that's the default...
Lastly, enclose C:\Adobe in quotes.

Try this:
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders /v AppData /d "C:\Adobe"
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders /v AppData /d "C:\Adobe"


Oh and - welcome to Experts Exchange!
Avatar of amlife
amlife

ASKER

thanks verymuch for your help and support, still getting the same message

Too many command-line parameters

I start thinking there cound be someting wrong with my computer
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial