Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default System Root directory

Any ideas on how to determine what version of windows is
being run, and what the system root directory is?

e.g. c:\winnt OR c:\windows etc.

Thanks

Jack
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default System Root directory

Hi Jack

Environ("windir") will return the windows directory

and

Application.OperatingSystem will return the version of windows

eg msgbox(environ("windir"))
or msgbox(application.operatingsystem)

HTH

David


"Jack" wrote in message
...
Any ideas on how to determine what version of windows is
being run, and what the system root directory is?

e.g. c:\winnt OR c:\windows etc.

Thanks

Jack



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default System Root directory

... the system root directory is?

Would any ideas here help?

Sub Demo()
Const WindowsFolder = 0
Const SystemFolder = 1
Const TemporaryFolder = 2

With CreateObject("Scripting.FileSystemObject")
Debug.Print .GetSpecialFolder(WindowsFolder)
Debug.Print .GetSpecialFolder(SystemFolder)
Debug.Print .GetSpecialFolder(TemporaryFolder)
End With
End Sub

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Jack" wrote in message
...
Any ideas on how to determine what version of windows is
being run, and what the system root directory is?

e.g. c:\winnt OR c:\windows etc.

Thanks

Jack



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default System Root directory

Jack,

Sub test()
MsgBox (Environ("WINDIR") & _
Application.PathSeparator & _
IIf(InStr(1, Application.OperatingSystem, "32"), "System32",
"System"))
End Sub

Rob

"Jack" wrote in message
...
Any ideas on how to determine what version of windows is
being run, and what the system root directory is?

e.g. c:\winnt OR c:\windows etc.

Thanks

Jack



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
How do I open an Excel file on XP system, saved on a Vista system JLS7 Excel Discussion (Misc queries) 3 December 2nd 08 04:21 AM
Excel Email Attachment Save As Root Directory Pete_UK Excel Discussion (Misc queries) 0 March 20th 08 08:02 PM
Saving to root directory ChrisP Excel Discussion (Misc queries) 2 July 31st 06 02:10 AM
global change to document hyperlink root directory mmekennedy Links and Linking in Excel 6 March 24th 05 09:35 AM
Check if directory empty OR no of files in directory. Michael Beckinsale Excel Programming 2 December 4th 03 10:12 PM


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

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

About Us

"It's about Microsoft Excel"