----- Original Message ----- > From: Zachary Ware <zachary.ware+pyl...@gmail.com> > To: Albert-Jan Roskam <fo...@yahoo.com> > Cc: Python <python-list@python.org> > Sent: Wednesday, July 16, 2014 3:47 PM > Subject: Re: how to msi install Python to non-default target dir? > > On Wed, Jul 16, 2014 at 8:29 AM, Albert-Jan Roskam > > <fo...@yahoo.com.dmarc.invalid> wrote: >> hi, >> >> I am trying to create a .bat file where (among other things) Python will > have to be silently installed. >> It needs to be installed to the non-default location "c:\program > files\python27". Any idea how this can be done? >> I keep getting the 'Help' menu, indicating that something went > wrong. I've been fighting with this for like an hour now! :-( >> >> I followed this structure [1]: msiexec /i (yourFile).msi > TARGETDIR=C:\YourBin\YourApp >> >> The following does NOT work (I added the cd/md commands later, idem for the > /qb) >> >> y:\>set PYTHONDIR="c:\program files\python27" >> y:\>cd /d "c:\program files" >> y:\>md python27 >> y:\>cd /d %temp% >> y:\>msiexec /i python-2.7.3 TARGETDIR="%PYTHONDIR%" /qb > > I'm assuming this is retyped and you missed the '.msi' in retyping?
Yes, typo, sorry. I was working in an environment without email access. > If not, that may be your issue. Also, 'set' doesn't require quotes > around a value with spaces, and you're also quoting %PYTHONDIR% when > you use it in the msiexec command, so you're actually double-quoting > the dir name (which could also be the issue). That was it, thank you!! >And, not necessarily an > issue that would prevent installing, but you may want to make sure > you're in the correctly-bitted Program Files directory if you're on > 64-bit Windows (%PROGRAMFILES% for 64-bit, %PROGRAMFILES(x86)% for > 32-bit; %PROGRAMFILES(x86)% will not be defined on 32-bit Windows or > in a 32-bit process on 64-bit Windows). Good point. The easiest solution would be to write one .bat for 32bit and one for 64bit. Thanks again!! -- https://mail.python.org/mailman/listinfo/python-list