Group:  English: General ยป microsoft.public.windows.msi
Thread: MCI and %TEMP%

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

MCI and %TEMP%
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> 23.06.2007 21:27:10
Hi,

I like to move my temp and tmp environment variables from the
%UserProfile%\Local\Temp to my partitioned D-Drive\Temp. From here I can
occasionally delete all the junk in it. This works well accept on Virtual
Machines where I map to a physical D-Drive on the host.

The problem I run into is MSI installs always fail when I have my temp on a
mapped drive.

Any thoughts on how I can get MSI installs to work with networked mapped
temp folders?

---
Bob


RE: MCI and %TEMP%
v-kzhao[ at ]online.microsoft.com ("Ken Zhao [MSFT]") 25.06.2007 05:52:00
Hello Bob,

Thank you for using newsgroup!

Based on my research, the temp environment variable is located in the
following registry keys that may be helpful:
HKEY_CURRENT_USER\Environment\TEMP
HKEY_ USER\.Default\Environment\TEMP

Thanks & Regards,

Ken Zhao

Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security <http://www.microsoft.com/security>
====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.





--------------------
| From: "Bob" <86c6c2e6-2146512712[ at ]news.postalias>
| Subject: MCI and %TEMP%
| Date: Sat, 23 Jun 2007 17:27:10 -0400
| Lines: 17
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
| Message-ID: <uR1WD1dtHHA.1188[ at ]TK2MSFTNGP04.phx.gbl>
| Newsgroups: microsoft.public.windows.msi
| NNTP-Posting-Host: 24-151-85-011.dhcp.nwtn.ct.charter.com 24.151.85.11
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP04.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.windows.msi:564
| X-Tomcat-NG: microsoft.public.windows.msi
|
| Hi,
|
| I like to move my temp and tmp environment variables from the
| %UserProfile%\Local\Temp to my partitioned D-Drive\Temp. From here I can
| occasionally delete all the junk in it. This works well accept on
Virtual
| Machines where I map to a physical D-Drive on the host.
|
| The problem I run into is MSI installs always fail when I have my temp on
a
| mapped drive.
|
| Any thoughts on how I can get MSI installs to work with networked mapped
| temp folders?
|
| ---
| Bob
|
|
|

Re: MCI and %TEMP%
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> 25.06.2007 11:38:54
Hi Ken,

I'm not looking to control where my temp is. (I can controll that with the
dialogs).

My question is about MSI's. Is it true that MSI's must have a physical
drive for its TEMP area? And if so, is there a workaround for this
restriction?

I like to map out my temp area on virtual machines so I can controll the VHD
growth. I do this because VHD's do not dynamically shrink in size after
blocks of data are deleted. It also puts all my VM's temp into one area
where I can occassionally delete them (as opposed to logging onto several
guest machines to do it.

My workaround is when I install an MSI, I reconfigure my temp environment
back to the VHD; logoff then on; install my MSI; reconfigure my enviornment
back to the hosts mapped drive; loffoff and on again; go to the VHD's temp
and delete it.

Thanks for your assistance!

Bob.


Re: MCI and %TEMP%
"Anthony" <anthony.spam[ at ]spammedout.com> 25.06.2007 12:16:54
Bob,
I have not tried it with the temp directory, but you can certainly use
non-local drives in msi's. It is just a bit convoluted. I have not got one
in front of me, but IIRC you do something like create a property, then refer
to that. So you would create a property called VTEMP with your mapped drive,
then set the TEMP property to be [VTEMP].
Anthony
http://www.airdesk.co.uk




"Bob" <86c6c2e6-2146512712[ at ]news.postalias> wrote in message
news:OZU%23p1xtHHA.5028[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Hi Ken,
>
> I'm not looking to control where my temp is. (I can controll that with
> the dialogs).
>
> My question is about MSI's. Is it true that MSI's must have a physical
> drive for its TEMP area? And if so, is there a workaround for this
> restriction?
>
> I like to map out my temp area on virtual machines so I can controll the
> VHD growth. I do this because VHD's do not dynamically shrink in size
> after blocks of data are deleted. It also puts all my VM's temp into one
> area where I can occassionally delete them (as opposed to logging onto
> several guest machines to do it.
>
> My workaround is when I install an MSI, I reconfigure my temp environment
> back to the VHD; logoff then on; install my MSI; reconfigure my
> enviornment back to the hosts mapped drive; loffoff and on again; go to
> the VHD's temp and delete it.
>
> Thanks for your assistance!
>
> Bob.
>


Re: MCI and %TEMP%
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> 25.06.2007 14:27:58
Hi Anthony,

Not too sure what you mean, but this is what I do.

On my virtual guest machine, I include in the statup folder a batch program
that runs "net use e: \\rc-server-4\E$ /persistent:no". This maps an
E-Drive to the virtual guest machines host.

I then goto System Properties - Advanced Tab. Click Environment Variables,
change the TEMP and TMP variables for UserName from:
"%USERPROFILE%\Local Settings\Temp"
to my a network drive "E:\Temp"

A log off/on as this is required to chang the variables.

I do this so as to control the size of my VHD (Virtual Hard Drive) file. It
also puts the TEMP in a convient place for me to delete on occassion (as
many ISV's never clean up after themselves).

This works fine except when I run MSI installs. The various MSI installs
always fails with one error code or another and the only way to get around
that is to change the TEMP and TMP back to the VHD C-Drive.

The MSI itself may or may not be on a mapped drive. I'm sure that MSI's
will work just fine regardless of where they are. But I do know the MSI's
apparently require a non-mapped TEMP area to work with during the install.

Thanks,
Bob.


Re: MCI and %TEMP%
"Anthony" <anthony.spam[ at ]spammedout.com> 25.06.2007 18:16:58
Bob,
I have not tried putting tmp on a mapped drive, and not on a mapped drive on
a virtual host, so I don't think I can help further!
The workaround I mentioned was for getting an msi to use a mapped drive
internally,
Anthony
http://www.airdesk.co.uk




"Bob" <86c6c2e6-2146512712[ at ]news.postalias> wrote in message
news:e3F4JUztHHA.4948[ at ]TK2MSFTNGP06.phx.gbl...
[Quoted Text]
> Hi Anthony,
>
> Not too sure what you mean, but this is what I do.
>
> On my virtual guest machine, I include in the statup folder a batch
> program that runs "net use e: \\rc-server-4\E$ /persistent:no". This maps
> an E-Drive to the virtual guest machines host.
>
> I then goto System Properties - Advanced Tab. Click Environment Variables,
> change the TEMP and TMP variables for UserName from:
> "%USERPROFILE%\Local Settings\Temp"
> to my a network drive "E:\Temp"
>
> A log off/on as this is required to chang the variables.
>
> I do this so as to control the size of my VHD (Virtual Hard Drive) file.
> It also puts the TEMP in a convient place for me to delete on occassion
> (as many ISV's never clean up after themselves).
>
> This works fine except when I run MSI installs. The various MSI installs
> always fails with one error code or another and the only way to get around
> that is to change the TEMP and TMP back to the VHD C-Drive.
>
> The MSI itself may or may not be on a mapped drive. I'm sure that MSI's
> will work just fine regardless of where they are. But I do know the MSI's
> apparently require a non-mapped TEMP area to work with during the install.
>
> Thanks,
> Bob.
>
>


Re: MCI and %TEMP%
v-kzhao[ at ]online.microsoft.com ("Ken Zhao [MSFT]") 26.06.2007 05:58:07
Thanks Anthony for your information sharing.

Thanks & Regards,

Ken Zhao

Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security <http://www.microsoft.com/security>
====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
| From: "Anthony" <anthony.spam[ at ]spammedout.com>
| References: <uR1WD1dtHHA.1188[ at ]TK2MSFTNGP04.phx.gbl>
<f7wk7zutHHA.2116[ at ]TK2MSFTNGHUB02.phx.gbl>
<OZU#p1xtHHA.5028[ at ]TK2MSFTNGP02.phx.gbl>
<eOwIsLytHHA.4356[ at ]TK2MSFTNGP02.phx.gbl>
<e3F4JUztHHA.4948[ at ]TK2MSFTNGP06.phx.gbl>
| Subject: Re: MCI and %TEMP%
| Date: Mon, 25 Jun 2007 19:16:58 +0100
| Lines: 46
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
| X-RFC2646: Format=Flowed; Response
| Message-ID: <#srkLU1tHHA.3796[ at ]TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.windows.msi
| NNTP-Posting-Host: 81-86-10-166.dsl.pipex.com 81.86.10.166
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.windows.msi:571
| X-Tomcat-NG: microsoft.public.windows.msi
|
| Bob,
| I have not tried putting tmp on a mapped drive, and not on a mapped drive
on
| a virtual host, so I don't think I can help further!
| The workaround I mentioned was for getting an msi to use a mapped drive
| internally,
| Anthony
| http://www.airdesk.co.uk
|
|
|
|
| "Bob" <86c6c2e6-2146512712[ at ]news.postalias> wrote in message
| news:e3F4JUztHHA.4948[ at ]TK2MSFTNGP06.phx.gbl...
| > Hi Anthony,
| >
| > Not too sure what you mean, but this is what I do.
| >
| > On my virtual guest machine, I include in the statup folder a batch
| > program that runs "net use e: \\rc-server-4\E$ /persistent:no". This
maps
| > an E-Drive to the virtual guest machines host.
| >
| > I then goto System Properties - Advanced Tab. Click Environment
Variables,
| > change the TEMP and TMP variables for UserName from:
| > "%USERPROFILE%\Local Settings\Temp"
| > to my a network drive "E:\Temp"
| >
| > A log off/on as this is required to chang the variables.
| >
| > I do this so as to control the size of my VHD (Virtual Hard Drive)
file.
| > It also puts the TEMP in a convient place for me to delete on occassion
| > (as many ISV's never clean up after themselves).
| >
| > This works fine except when I run MSI installs. The various MSI
installs
| > always fails with one error code or another and the only way to get
around
| > that is to change the TEMP and TMP back to the VHD C-Drive.
| >
| > The MSI itself may or may not be on a mapped drive. I'm sure that
MSI's
| > will work just fine regardless of where they are. But I do know the
MSI's
| > apparently require a non-mapped TEMP area to work with during the
install.
| >
| > Thanks,
| > Bob.
| >
| >
|
|
|

Re: MCI and %TEMP%
"Stefan Krueger [MVP]" <skrueger[ at ]newsgroups.nospam> 26.06.2007 13:05:55
Bob,

I know that Windows Installer doesn't work properly with drive letters that
were mapped using the subst DOS command. I don't know if similar problems
apply to network drives that are mapped to a drive letter. Maybe you could
try using the UNC format instead (not sure if that will cause problems in
the TEMP environment variable).

What are the exact symptoms you are seeing? Remember that the UI sequence
runs in user context, but the file copy etc. runs in system context. Does
local system have access to the mapped network drive, and is the drive
letter mapped for local system, too? Creating a log file of the install
(http://www.msifaq.com/a/1022.htm) should help to spot such a problem (file
or path not found errors). ProcessMonitor from SysInternals (now Microsoft)
could also help to detect such problems.

Another issue could be access rights. Does the local system account have
full access permissions to the network directory? Again, ProcessMonitor
could be useful to find out if there are any "access denied" errors.


--
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)


""Ken Zhao [MSFT]"" <v-kzhao[ at ]online.microsoft.com> schrieb im Newsbeitrag
news:l$PHBc7tHHA.2316[ at ]TK2MSFTNGHUB02.phx.gbl...
[Quoted Text]
> Thanks Anthony for your information sharing.
>
> Thanks & Regards,
>
> Ken Zhao
>
> Microsoft Online Support
> Microsoft Global Technical Support Center
>
> Get Secure! - www.microsoft.com/security
> <http://www.microsoft.com/security>
> ====================================================
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ====================================================
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
>
> --------------------
> | From: "Anthony" <anthony.spam[ at ]spammedout.com>
> | References: <uR1WD1dtHHA.1188[ at ]TK2MSFTNGP04.phx.gbl>
> <f7wk7zutHHA.2116[ at ]TK2MSFTNGHUB02.phx.gbl>
> <OZU#p1xtHHA.5028[ at ]TK2MSFTNGP02.phx.gbl>
> <eOwIsLytHHA.4356[ at ]TK2MSFTNGP02.phx.gbl>
> <e3F4JUztHHA.4948[ at ]TK2MSFTNGP06.phx.gbl>
> | Subject: Re: MCI and %TEMP%
> | Date: Mon, 25 Jun 2007 19:16:58 +0100
> | Lines: 46
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
> | X-RFC2646: Format=Flowed; Response
> | Message-ID: <#srkLU1tHHA.3796[ at ]TK2MSFTNGP02.phx.gbl>
> | Newsgroups: microsoft.public.windows.msi
> | NNTP-Posting-Host: 81-86-10-166.dsl.pipex.com 81.86.10.166
> | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP02.phx.gbl
> | Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.windows.msi:571
> | X-Tomcat-NG: microsoft.public.windows.msi
> |
> | Bob,
> | I have not tried putting tmp on a mapped drive, and not on a mapped
> drive
> on
> | a virtual host, so I don't think I can help further!
> | The workaround I mentioned was for getting an msi to use a mapped drive
> | internally,
> | Anthony
> | http://www.airdesk.co.uk
> |
> |
> |
> |
> | "Bob" <86c6c2e6-2146512712[ at ]news.postalias> wrote in message
> | news:e3F4JUztHHA.4948[ at ]TK2MSFTNGP06.phx.gbl...
> | > Hi Anthony,
> | >
> | > Not too sure what you mean, but this is what I do.
> | >
> | > On my virtual guest machine, I include in the statup folder a batch
> | > program that runs "net use e: \\rc-server-4\E$ /persistent:no". This
> maps
> | > an E-Drive to the virtual guest machines host.
> | >
> | > I then goto System Properties - Advanced Tab. Click Environment
> Variables,
> | > change the TEMP and TMP variables for UserName from:
> | > "%USERPROFILE%\Local Settings\Temp"
> | > to my a network drive "E:\Temp"
> | >
> | > A log off/on as this is required to chang the variables.
> | >
> | > I do this so as to control the size of my VHD (Virtual Hard Drive)
> file.
> | > It also puts the TEMP in a convient place for me to delete on
> occassion
> | > (as many ISV's never clean up after themselves).
> | >
> | > This works fine except when I run MSI installs. The various MSI
> installs
> | > always fails with one error code or another and the only way to get
> around
> | > that is to change the TEMP and TMP back to the VHD C-Drive.
> | >
> | > The MSI itself may or may not be on a mapped drive. I'm sure that
> MSI's
> | > will work just fine regardless of where they are. But I do know the
> MSI's
> | > apparently require a non-mapped TEMP area to work with during the
> install.
> | >
> | > Thanks,
> | > Bob.
> | >
> | >
> |
> |
> |
>

Re: MCI and %TEMP%
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> 26.06.2007 21:56:16
Hi Stefan,

I think you understand, but just to be sure. I don't have a problem
installing a MSI that is found on a mapped drive such as "net use k:
\\rc-server-4\K$ /persistent:no". The problem is when I map my %TEMP% and
%TMP% environment variables to a mapped drive such as "net use e:
\\rc-server-4\E$ /persistent:no".

I suspect the MSI error's depend on how the MSI is written. For example,
the most recent MSI I tried was Microsoft's "System Center Data Protection
Manager 2007 Beta 2". When it ran into the mapped TEMP, the installed just
disappeared with no error at all! (I called that one into the DPM
developers). But generally, the MSI fails with some cryptic message that
would never make me suspect the TEMP (if I didn't know better). But this is
understandable as what MSI developer would be testing for a mapped TEMP
environment anyway?

So when you say that subst DOS command will not allow the Windows Installer
(or MSI as I call it), to work properly, I presume you are referring to how
the MSI is accessed; not how the TEMP is accessed.

I'm not sure what would happen if I use a UNC to access the TEMP
environment. I suppose I could try.

The map is created when the user logs on and automatically runs a batch file
found in their startup folder. I don't know how to tell if the local system
account can access it as well. I would think the MSI is using the users
credentials to install; not the local system account (unless maybe you are
referring to a push install - which I'm not doing).

Thanks for your thoughts, but I guess I'm a lone wolf by having TEMP
enviroments use mapped drives. I'll have to wait for the rest of the
community to "advance" (or decline) to my crazy levels of systems
administration!

Bob.


Re: MCI and %TEMP%
"Stefan Krueger [MVP]" <skrueger[ at ]newsgroups.nospam> 27.06.2007 14:42:10
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> schrieb im Newsbeitrag
news:OCkOTzDuHHA.3476[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> The map is created when the user logs on and automatically runs a batch
> file found in their startup folder. I don't know how to tell if the local
> system account can access it as well. I would think the MSI is using the
> users credentials to install; not the local system account (unless maybe
> you are referring to a push install - which I'm not doing).

Only the UI part runs in the user's context. The file copy runs in system
context (because the user doesn't have rights to write to ProgramFilesFolder
for instance). It's a common problem that network drives are not available
in this case. And if you create the map using a login script for the user, I
bet that's the cause for the problem you are seeing. UNC might work around
this. I don't know if there's any way to create the map for local system.
But doesn't Virtual PC (or VMware) have the option to use a physical disk
instead of a virtual disk? Maybe that way you could redirect the temp folder
to a physical disk.

--
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)

Re: MCI and %TEMP%
"Bob" <86c6c2e6-2146512712[ at ]news.postalias> 28.06.2007 11:33:50
Hi Stephen,

Well I tried the UNC trick today, but it fails just like the MAP to Drive
method. I see the MSI copies its files to the %TEMP% (as it should), but
then fails to run properly. For this test, I used the beta DPM (which fails
by just exiting without error).

As far a virtual machines having an option to use a VHD or a physical disk,
I haven't seen such a thing. It is just VHD (or several VHD's), and then of
course our MAP and UNC thing (which I supposes using the network card for
access - now that I think about it).


Thanks,

Bob.


Re: MCI and %TEMP%
"Stefan Krueger [MVP]" <skrueger[ at ]newsgroups.nospam> 28.06.2007 16:07:48
Which virtual machine software are you using?

--
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)

"Bob" <86c6c2e6-2146512712[ at ]news.postalias> schrieb im Newsbeitrag
news:OHvR0gXuHHA.1188[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Hi Stephen,
>
> Well I tried the UNC trick today, but it fails just like the MAP to Drive
> method. I see the MSI copies its files to the %TEMP% (as it should), but
> then fails to run properly. For this test, I used the beta DPM (which
> fails by just exiting without error).
>
> As far a virtual machines having an option to use a VHD or a physical
> disk, I haven't seen such a thing. It is just VHD (or several VHD's), and
> then of course our MAP and UNC thing (which I supposes using the network
> card for access - now that I think about it).
>
>
> Thanks,
>
> Bob.
>

Re: MCI and %TEMP%
"Adrian Accinelli" <hclnospamalias2[ at ]newsgroup.nospam> 28.06.2007 16:21:43

"Bob" <86c6c2e6-2146512712[ at ]news.postalias> wrote in message
news:OHvR0gXuHHA.1188[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Hi Stephen,
>
> Well I tried the UNC trick today, but it fails just like the MAP to Drive
> method. I see the MSI copies its files to the %TEMP% (as it should), but
> then fails to run properly. For this test, I used the beta DPM (which
> fails by just exiting without error).
>
> As far a virtual machines having an option to use a VHD or a physical
> disk, I haven't seen such a thing. It is just VHD (or several VHD's), and
> then of course our MAP and UNC thing (which I supposes using the network
> card for access - now that I think about it).
>
>
> Thanks,
>
> Bob.

I think Stefan is correct about system not having necessary privileges.
Just because the logged on user has permission to access mapped drive E:
the NT Authority\System account will not have the same permission.
Especially since you are using the built-in ADMIN-only share for your disk
(i.e. only admin users of the remote machine can access it). On that note
you could change the logon user of the Windows Installer to be administrator
and that would allow the process access to network resources. This change
however would completely change semantics of the installer on your machine
so if you are strictly testing installations it's not a good idea.

Alternatively you could create a new virtual disk whose file actually
resides on your other drive. Permanently configure the virtual OS so that
TEMP/TMP are pointing to the new "local" drive - you shouldn't have to use a
login script to change anything. In this case the OS will perceive the
second disk as local and presumably all the system services even those at
startup would honour this disk.

Sincerely,
Adrian Accinelli


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net