…remove the trailing back-slash When using %~dp0, the trailing back-slash is automatically added. Your script should look like this:
msiexec /i "%~dp0install.msi" /qn regedit /s "%~dp0change.reg" Troy L. Martin | Product Manager, Endpoint Automation 1E | Software Lifecycle Automation for the Digital Business US Mobile: +1 (678) 898-6147 | UK Phone : +44 208 326 9141 [email protected]<mailto:[email protected]> | www.1e.com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.1e.com_&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=lfm9K0cSqM44FHIoBa6p0wzT4MWYkn_0HYGNmWgkATs&e=> Facebook<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.facebook.com_1eglobal&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=RRWJDZaMGcmivktB58TkvRLoQr1bC6jIDj-MN1oDLlE&e=> | Twitter<https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_1e-5Fglobal_&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=6SY99zYqJ1R5pAavjFi-JmFdxUD0lt-n0XwOK-omJcI&e=> | YouTube<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.youtube.com_1enews&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=XWjlpxF0vI8J3n42uqWMrEXgHphlWI2PD9XZHOHhX8U&e=> | Blogs<https://urldefense.proofpoint.com/v2/url?u=http-3A__blogs.1e.com_&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=tKrxeysyE64idSmjz1G3NP2ojp9RhRdpv1OljUgTbyg&e=> | RSS<https://urldefense.proofpoint.com/v2/url?u=http-3A__blogs.1e.com_index.php_feed_&d=BQMFAg&c=Ln8c1CLEgbhz4W2FGOnrXYpHvIYN4k_cXHVmsANM4XI&r=zAhc69MwvUId2afOheLZsnttbIFqxDANe5KRT-ZKir4&m=uHdy6p01-w9GZjdBVTraJ5PHeWP6yKoA_xCBrm33uC4&s=qGt8-ZGt5rG-J3ClWoppG9TfmFKmktUZprrf0vtNjII&e=> From: [email protected] [mailto:[email protected]] On Behalf Of Heaton, Joseph@Wildlife Sent: Tuesday, November 24, 2015 2:52 PM To: '[email protected]' <[email protected]> Subject: RE: [mssms] RE: Having trouble with this package Come on! Don’t make me do things the easy way! I’ll probably look at that, but now this thing is stuck in my craw, and I want to beat it! From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Juelich, Adam Sent: Tuesday, November 24, 2015 11:47 AM To: [email protected]<mailto:[email protected]> Subject: Re: [mssms] RE: Having trouble with this package Have you tried modifying the MSI with a Transform file? That is best practices and you would have been done already. ----------------------------------------------- Adam Juelich Pulaski Community School District<http://www.pulaskischools.org> Client Management Specialist 920-822-6075 On Tue, Nov 24, 2015 at 1:41 PM, Heaton, Joseph@Wildlife <[email protected]<mailto:[email protected]>> wrote: Latest correction: Installed fine on my test machine and my main machine, but not on any others that I’ve tried. Here’s the batch file again: msiexec /i "%~dp0\Installer.msi" /qn C:\Windows\sysnative\regedit.exe /s "%~dp0Change.reg" Could it be the quotes around the reg file? From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Marcum, John Sent: Tuesday, November 24, 2015 9:20 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] RE: Having trouble with this package Like Daniel said, you command line needs to specify “c:\windows\sysnative\regedit.exe” ________________________________ John Marcum MCITP, MCTS, MCSA Desktop Architect Bradley Arant Boult Cummings LLP ________________________________ [H_Logo] From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Heaton, Joseph@Wildlife Sent: Tuesday, November 24, 2015 10:37 AM To: '[email protected]<mailto:[email protected]>' <[email protected]<mailto:[email protected]>> Subject: [mssms] RE: Having trouble with this package The package is 32-bit. It installs in c:\program files (x86) Here’s the reg file: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\ProductX] [HKEY_LOCAL_MACHINE\SOFTWARE\ProductX\appname] "company"="Our Company" "key"="xxxxxxx" From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Daniel Ratliff Sent: Tuesday, November 24, 2015 8:23 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] RE: Having trouble with this package Is the application 32 or 64 bit? Packages run as 32-bit, you may need to call c:\windows\sysnative\regedit.exe to call the 64-bit version, otherwise it will place it in HKLM\Software\Wow6432Node. Daniel Ratliff From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Enley, Carl Sent: Tuesday, November 24, 2015 11:05 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] RE: Having trouble with this package What hive is the .reg file writing to? Can you post the content of .reg file removing any personal information? From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Heaton, Joseph@Wildlife Sent: Tuesday, November 24, 2015 10:54 AM To: [email protected]<mailto:[email protected]> Subject: [mssms] Having trouble with this package I have a simple program that I need to install, and I need to make a registry change along with it. I chose to batch the process, and here’s what I have: msiexec /i "%~dp0\install.msi" /qn regedit /s "%~dp0\change.reg" The registry setting is not happening. Therefore, the application opens in trial mode. I’ve also tried reversing the order of these commands, and that install doesn’t seem to go anywhere. I’ve looked at other packages that a coworker had done previously, and I’m not seeing any real differences. If I open the ccmcache, and run the setup.bat as my administrator account, it works fine. My SCCM service account is also a Domain Admin, so I’m not sure what the difference there would be, either. Any help would be appreciated. Joe Heaton Information Technology Operations Branch Data and Technology Division CA Department of Fish and Wildlife 1700 9th Street, 3rd Floor Sacramento, CA 95811 Desk: (916) 323-1284<tel:%28916%29%20323-1284> Every Californian should conserve water. Find out how at: [SaveOurWater_Logo]<http://saveourwater.com/> SaveOurWater.com<http://saveourwater.com/> · Drought.CA.gov<http://drought.ca.gov/> The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. ________________________________ Confidentiality Notice: This e-mail is from a law firm and may be protected by the attorney-client or work product privileges. If you have received this message in error, please notify the sender by replying to this e-mail and then delete it from your computer. ________________________________ The Pulaski Community School District does not discriminate on the basis of any characteristic protected under State or Federal law. ________________________________ Legal Notice: This email is intended only for the person(s) to whom it is addressed. If you are not an intended recipient and have received this message in error, please notify the sender immediately by replying to this email or calling +44(0) 2083269015 (UK) or +1 866 592 4214 (USA). This email and any attachments may be privileged and/or confidential. The unauthorized use, disclosure, copying or printing of any information it contains is strictly prohibited. The opinions expressed in this email are those of the author and do not necessarily represent the views of 1E Ltd. Nothing in this email will operate to bind 1E to any order or other contract.
