Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How does Excel determine the TEMP directory?

Hello,

I would like to put Excel file into such a directory
in which I will be sure that has security settings ReadWrite.

If I know, on the arbitrary computer,
that Excel is working OK,
it means that Excel's TEMP directory has
under logged user security settings = ReadWrite.

If I set "C:\Documents and Settings\******\Local Settings\Temp"
directory to ReadOnly,
the Excel will not work.

The C function GetTempPath returns
the above directory, may The Excel using this C function?

Do anybody know which way the Excel determine
where the TEMP directory is?

Thanks

Miso



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How does Excel determine the TEMP directory?

Miso,

You can use GetTempPath to get the temporary directory name:


Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long

Sub AAA()
Dim TempPath As String
Dim L As Long: L = 255
Dim Res As Long
TempPath = String$(L, " ")
Res = GetTempPath(L, TempPath)
TempPath = Left(TempPath, Res)
Debug.Print TempPath
End Sub


"Miso" wrote in message
...
Hello,

I would like to put Excel file into such a directory
in which I will be sure that has security settings ReadWrite.

If I know, on the arbitrary computer,
that Excel is working OK,
it means that Excel's TEMP directory has
under logged user security settings = ReadWrite.

If I set "C:\Documents and Settings\******\Local Settings\Temp"
directory to ReadOnly,
the Excel will not work.

The C function GetTempPath returns
the above directory, may The Excel using this C function?

Do anybody know which way the Excel determine
where the TEMP directory is?

Thanks

Miso





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How does Excel determine the TEMP directory?

I did it, as I wrote in my question.
And again :
Do the Excel the same?

Miso

"Chip Pearson" wrote in message
...
Miso,

You can use GetTempPath to get the temporary directory name:


Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long

Sub AAA()
Dim TempPath As String
Dim L As Long: L = 255
Dim Res As Long
TempPath = String$(L, " ")
Res = GetTempPath(L, TempPath)
TempPath = Left(TempPath, Res)
Debug.Print TempPath
End Sub


"Miso" wrote in message
...
Hello,

I would like to put Excel file into such a directory
in which I will be sure that has security settings ReadWrite.

If I know, on the arbitrary computer,
that Excel is working OK,
it means that Excel's TEMP directory has
under logged user security settings = ReadWrite.

If I set "C:\Documents and Settings\******\Local Settings\Temp"
directory to ReadOnly,
the Excel will not work.

The C function GetTempPath returns
the above directory, may The Excel using this C function?

Do anybody know which way the Excel determine
where the TEMP directory is?

Thanks

Miso







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How does Excel determine the TEMP directory?

Hello Miso,

Yes, Excel uses GetTempPath.
--------------------
From: "Miso"
References:


Subject: How does Excel determine the TEMP directory?
Date: Tue, 29 Jul 2003 14:44:22 +0200

I did it, as I wrote in my question.
And again :
Do the Excel the same?

Miso

"Chip Pearson" wrote in message
...
Miso,

You can use GetTempPath to get the temporary directory name:


Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
(ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long

Sub AAA()
Dim TempPath As String
Dim L As Long: L = 255
Dim Res As Long
TempPath = String$(L, " ")
Res = GetTempPath(L, TempPath)
TempPath = Left(TempPath, Res)
Debug.Print TempPath
End Sub


"Miso" wrote in message
...
Hello,

I would like to put Excel file into such a directory
in which I will be sure that has security settings ReadWrite.

If I know, on the arbitrary computer,
that Excel is working OK,
it means that Excel's TEMP directory has
under logged user security settings = ReadWrite.

If I set "C:\Documents and Settings\******\Local Settings\Temp"
directory to ReadOnly,
the Excel will not work.

The C function GetTempPath returns
the above directory, may The Excel using this C function?

Do anybody know which way the Excel determine
where the TEMP directory is?

Thanks

Miso









Regards,
Chris Jensen[MSFT]

This posting is provided “AS IS” with no warranties, and confers no rights.

“Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?* If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026.”

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is my excel spreadsheet now a temp file? Brew Excel Discussion (Misc queries) 0 May 19th 10 12:54 PM
Problem using obj.Namespace(sourceFileName) Namespace(DestinationFilename).Itemsand then opening the xls file which creates a Temp Folder inside Temp Yuvraj Excel Discussion (Misc queries) 3 May 3rd 09 11:59 AM
Why is Word, Excel saving a backup copy in my temp directory? daddyribs Excel Discussion (Misc queries) 1 April 19th 06 04:24 PM
Temp files in Excel Roselyn Nicewarner Excel Discussion (Misc queries) 1 August 10th 05 11:49 PM
Excel creating temp files upon save. Joel Pratt Setting up and Configuration of Excel 2 May 18th 05 10:37 PM


All times are GMT +1. The time now is 10:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"