Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Windows directory

Posted on 2006-05-24
31
Medium Priority
?
550 Views
Last Modified: 2008-05-30

I would like to know in what directory each program is installed.

Yahoo! Messenger for example:
In Windows xp the default directory is C:\Program Files\...

In Windows 98 and  Windows Me, is the same directory.

Windows 98    "C:\Program Files\Yahoo!\Messenger"
Windows Me   "C:\Program Files\Yahoo!\Messenger"
Windows xp    "C:\Program Files\Yahoo!\Messenger"

But what about  Windows NT,  Windows 2000 and  Windows Server 2003 ?
0
Comment
Question by:Dazm
  • 12
  • 6
  • 6
  • +3
31 Comments
 
LVL 2

Expert Comment

by:cschipper
ID: 16749682
NT, 2000 and 2003 have als a program files folder
0
 

Expert Comment

by:acstua
ID: 16749770
they are in the same place as XP afaik
0
 
LVL 2

Expert Comment

by:chris_bol
ID: 16750001
Check the registry key under HKLM\Software\Microsoft\Windows\CurrentVersion.

This has the location of Program Files and Common Files
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Expert Comment

by:RiDo78
ID: 16750022
Usually program files are installed in the %programfiles% directory. Where %programfiles% is an variable which usually points to C:\Program Files, although it is possible that it points to another (localized) directory or a specialized platform-dependent directory.

On the 64-bit versions of Windows, this folder is called C:\Program Files (x86) as the default C:\Program Files is reserved for 64 bit programs. Because of the %programfiles% variable, most 32 bit programs will point to the C:\Program Files (x86) folder by default.
0
 
LVL 2

Author Comment

by:Dazm
ID: 16752068

cschipper and acstua,
I don't know about that...
Thats right am asking this question.

All i know is that Windows 2000 does not have the same directory

Like a year ago i made a tool for a friend who had Windows 2000
He told me that my tool never work on his computer, Then i realize
that it may be for the directory => "C:\Program Files\Yahoo!\Messenger"

Now for chris_bol...
I am not running Windows 2000 at this time.

To make it a little more understandable...
All i need to know is the location of Yahoo! in Windows 2000.
0
 

Expert Comment

by:acstua
ID: 16752252
going by this post http://www.experts-exchange.com/Operating_Systems/Win2000/Q_21847105.html
it would seem its still under program files
tho like - c:\program files\yahoo messenger\messenger\profiles

ill let yer know if i found out for sure, i did have a win2k machine about somewhere :)
0
 
LVL 39

Expert Comment

by:BillDL
ID: 16752365
Dazm.
Am I correct in thinking that your question is related in a way to your Visual Basic question here?:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_21851760.html

In that question you are apparently trying to have an application (or installer) perform an operating system verification check before running (or installing), and in this question here you appear to be looking for a method of checking to see whether a program is already installed ie. by checking in the "Program Files" folder.

If that IS the case, then you would need to either check for the existence of the program's executable, or check the registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
for the known sub-key created by a previous installation of that program, and then perhaps also check the values set against "DisplayName" and/or "DisplayVersion".

If this isn't what you are seeking to do, then just ignore this.

0
 
LVL 2

Author Comment

by:Dazm
ID: 16753285

acstua...
if "sunnycoder" was under Windows 2000...
Why did he had problems in finding that directory ?
Yahoo! Messenger is in a different directory in Windows 2000
Thats right he post this message => sunnycoder: No luck :-(
Oops! Well i don't know yet if Yahoo! is in that directory in Windows 2000

Comment from moh10ly

The Folder looks like this..
c:\program files\yahoo messenger\messenger\profiles

Comment from sunnycoder

No luck :-(


Nor for BillDL...
The other question sounds a little similar to this
But is totally different because this time is about
JavaScript on load page, so I need to know the right
directory of Yahoo! Mesenger thats all.
But it has nothing to do with the other question.

Thanks for your opinion BillDL, But yeah this is something different.
0
 

Expert Comment

by:acstua
ID: 16753757
only saying what i found :)

Tried to install it on my w2k box, but msgr wouldnt even download :/
will try tomorrow if you want.
0
 
LVL 3

Expert Comment

by:RiDo78
ID: 16754092
It would have been nice if you were clear that you needed the Yahoo! folder only. Because Yahoo Messenger can be anywhere on the system. If you want it to be in Z:\MyPrograms\Messaging\Yahoo, it's possible!

There's no way you can tell where it is, except when checking the registry-info or reading information from the .lnk files in the startmenu and desktop (which can be on a different location as well)

In my machine running XP pro 64-bit I could find the Yahoo installation directory in HKLM\Software\Wow6432Node\Yahoo\Essentials.
0
 
LVL 2

Author Comment

by:Dazm
ID: 16757320

Thanks acstua : )
it will be nice if you do that
I will apreciate, Thank you.


RiDo78...
Yeah, is true what you say...
But normally all users install Yahoo! Messenger in the default folder => C:\Program Files\...

at the time Yahoo! start the installation nobody worry about change directory.
Yahoo!, MSN, AOL, PalTalk, these programs give the user the option to select a target directory, but like i said, 95% of all users install all programs as the default installation.


0
 
LVL 3

Expert Comment

by:RiDo78
ID: 16759081
"at the time Yahoo! start the installation nobody worry about change directory.
Yahoo!, MSN, AOL, PalTalk, these programs give the user the option to select a target directory, but like i said, 95% of all users install all programs as the default installation."

Well if you take that for granted, I could say that Yahoo usually installs in %programfiles%\Yahoo!. As I said, the %programfiles% is substituted for the Program Files directory, regardless of the name. Try 'cd %programfiles' at the command prompt. Setup-programs also use this information to find the Program Files directory so if you assume that most users do not change the directory manually, you're done.
0
 

Expert Comment

by:acstua
ID: 16759145
defaulted on mine to C:\Program Files\Yahoo!\Messenger
0
 
LVL 2

Author Comment

by:Dazm
ID: 16760921

Yesterday i was trying to investigate the Yahoo! root in one of my friends online,
He gives me permission to enter in his machine using net meeting... but he did not
had installed Yahoo! Messenger in his computer, and this is what i find.

C:\NTWIN\...

Now lets see the different in Windows xp

C:\Programs Files\...

C:\Windows\...
0
 
LVL 2

Author Comment

by:Dazm
ID: 16761131

For me is hard to believe that Windows 2000 have this root => C:\Program Files\Yahoo!\Messenger

I try this script with few users on Yahoo! Chat Rooms

<SCRIPT>
onload=window.open('file://C:/Program files/Yahoo!/Messenger')
</SCRIPT>

1.) Open Notepad and paste the script
2.) Save it as Root.html
3.) Open Root.html

Users with Windows 2000 said they didn't find anything
But users with Windows xp said YES!!! HAHAHAHAHAHA
0
 
LVL 39

Expert Comment

by:BillDL
ID: 16762516
Dazm

There are a few issues with your previous postings.

acstua looked for examples to support his belief that Yahoo Instant Messenger installed by default to a particular directory, and quoted the previously asked question by sunnycoder at:
http://www.experts-exchange.com/Operating_Systems/Win2000/Q_21847105.html

moh10ly suggested :
"Have you tried to move all your IM HISTORY to different Directory...?"
to which sunnycoder responded:
"Not sure which directory you are refering to. I could not find any directory named HISTORY in yahoo folder".

You later stated :
"If sunnycoder was under Windows 2000, why did he had problems in finding that directory?
Yahoo! Messenger is in a different directory in Windows 2000. Thats right he post this message => sunnycoder: No luck".

Look again at sunnycoder's feedback, and notice that he DOES appear to have the Yahoo program folder, but did not have a HISTORY folder.

acstua later downloaded and installed Yahoo Instant Messenger on a Windows 2000 system to double-check the default installation directory, and reported back :
"Defaulted on mine to C:\Program Files\Yahoo!\Messenger".

Why do you find it so unbelievable that Yahoo Instant Messenger installs to that folder? :
>>> "For me is hard to believe that Windows 2000 have this root => C:\Program Files\Yahoo!\Messenger". <<<

You stated "Yesterday I was trying to investigate the Yahoo! root in one of my friends online ... but he did not have Yahoo! Messenger installed in his computer".

Why not have your friend install YIM (presumably this is a Windows 2000 system you were talking about), and see what directory it installs to on that computer.

Don't forget that there are quite a few different Yahoo programs, utilities, and applications that can be installed on any computer, so the "root" (as you refer to it) really is:
C:\Program Files\Yahoo!\
or, more correctly (as stated by RiDo78):
%programfiles%\Yahoo!\

These will obviously create their own sub-folders, so keeping them all under the \Yahoo!\ folder makes sense, eg.

C:\Program Files/Yahoo!/Shared/
C:\Program Files/Yahoo!/Shared/Graphics
C:\Program Files\Yahoo!\Companion\
C:\Program Files\Yahoo!\Companion\Installs\
C:\Program Files\Yahoo!\Common\
C:\Program Files\Yahoo!\Messenger\
C:\Program Files\Yahoo!\Messenger\Skins
etc, etc.

Two examples of the C:\Program Files\Yahoo!\ folder being used as the program folder for Yahoo utilities after a quick search on google.  Both are HiJack This! logs that state in the header of the report:

Logfile of HijackThis vx.xx.x
Platform: Windows 2000 SP4 (WinNT 5.00.2195)

http://forum.starmen.net/?t=msg&th=13768&start=0
O3 - Toolbar: Yahoo! Companion - C:\Program Files\Yahoo!\Companion\Installs\etc, etc

http://www.dslreports.com/forum/remark%252C10526441~root=security~mode=flat
O8 - Yahoo! Dictionary - file:///C:\Program Files\Yahoo!\Common/ycdict.htm
O8 - Yahoo! Search - file:///C:\Program Files\Yahoo!\Common/ycsrch.htm

You will find such examples of the Yahoo program folder at C:\Program Files\Yahoo! quoted all over the internet in help/discussion forums, so it seems like a little more than mere coincidence that they all have Yahoo utilities installed to the same folder - even on a Polish version of Windows 2000:
http://komputery.katalogi.pl/temat61365/

You said that Windows 2000 users tried your script from an html document and that "they didn't find anything".
What exactly do you mean by "didn't find anything"?
If the folder didn't exist, I would have expected it to show a "Cannot Find Server or DNS Error" local page.  You can confirm this result using an obviously nonexistent directory in the script.

Perhaps the Windows 2000 users have tighter security concerning the running of scripts from within a web page?  In my experience, the average Windows 2000 user knows a lot more about security than the average Windows XP user hanging around in a Yahoo Chat Room, which might account for the result.
0
 
LVL 3

Expert Comment

by:RiDo78
ID: 16763866
Well said BillDL...
0
 
LVL 2

Author Comment

by:Dazm
ID: 16764708

Four words...

I am not sure if give you the ok or not
Because i am not yet totally convinced.

Why my script doesn't load ok in those computers?
is it there a diference in Win2000 and WinNT?

0
 
LVL 2

Author Comment

by:Dazm
ID: 16764722

Oops! 36 words : )
0
 
LVL 2

Author Comment

by:Dazm
ID: 16764816

I feel like... I cannot accept this answer.

RiDo78: Well said BillDL...

I do not like to be hypocritical, cus if i click the Acept buttom
I'll make you velieve that this was the correct and finall answer.

But...

To be honest, I do not feel satisfied with the result of this answer.
0
 
LVL 39

Expert Comment

by:BillDL
ID: 16767337
Dazm
I'm not really sure what the problem is, but your question was what directory does Yahoo Instant Messenger install to on Windows NT,  Windows 2000 and  Windows Server 2003.
Admittedly, nobody has offered a conclusive answer yet with respect to Windows NT and Windows Server 2003, but acstua went to the bother of installing YIM on his Windows 2000 system for you and reported his findings.  There are several other references to other peoples' Windows 2000 systems with YIM installed to the same directory.

As far as I see it, the only way you would totally convince yourself of this is to install YIM yourself on a Windows 2000 system and check the results.  Before you do so, however, it might be wise to read this page from September 2005:
http://blog.taragana.com/index.php/archive/yahoo-venturing-into-adware-stay-away-from-yahoo-instant-messenger/

Ask those Windows 2000 users on the Yahoo chat room who previously reported that your script found nothing to open a command prompt window and type the command:
cd %programfiles%
Do theirs change directory to C:\Program Files\ or some other directory?

0
 
LVL 3

Expert Comment

by:RiDo78
ID: 16767389
Listen, sometimes the answer is just 'not possible'. You can assign an B or C grade if you want... personally I don't care about the points. Especially not in a 20-point question. I can't talk for others, but I assume they think the same way. We're here to help, and that's what we're trying to do.

And I would like to give you some advice. Please be clear about your intentions as it really helps solving the problem. Take this question for example, we got information piece by piece. First you ask:
> "I would like to know in what directory EACH program is installed."
You do provide an yahoo example, but you ask for EACH program. Oh and you throw in some information about the location of yahoo on certain Operating Systems.

Later you make it more clear that you would like to know the differences in location on certain operating systems.

Another post later it became clear that you don't want to know the location of EACH program, but only Yahoo! Messenger.

Last not least you came up with some sort of javascript that should open the Yahoo program folder.


If you told us straight away that you were writing a javascript and you need to know the exact location of Yahoo!Messenger on any random machine, we could have saved quite some work. As it is generally not possible for javascript to access system-variables, so %programfiles% would fail. (You can enter it in your (i)explorer window manually if you want though). And registery-queries are out of the question for javascripts.

So if you want your script to work, you need to know the exact location of a folder to open it. And believe me, on ALL english windows-versions, the default location of program files is C:\PROGRAM FILES. Only the 64 bit versions have two  folders: C:\PROGRAM FILES (x86) for the 32-bit programs and C:\PROGRAM FILES, which is used for the native 64-bit software.

But be aware that the directory might have a different name on localized NON-english versions of Windows or where the administrator has forced a different name. IT IS ALSO POSSIBLE that securitysettings block your script, because you try to access the local system, which is *should* not be allowed for Javascripts.


I'm sorry to dissapoint you, but as far as I can see it is not possible to build a descent and reliable javascript. But try this instead:
===
%systemdrive%
cd %programfiles%\Yahoo!\Messenger
start .
===
Copy everything BETWEEN the === signs to notepad and save it as test.bat. Now run it
0
 
LVL 39

Accepted Solution

by:
BillDL earned 80 total points
ID: 16767477
Further update.
I have just clean installed Windows NT and 2000 on spare machines here, and YIM installs to
C:\Program Files\Yahoo!\Messenger\
on both of them.

I don't have the luxury of owning Windows Server 2003, and I wouldn't dream of installing YIM on such a system even if I did, so that remains untested.  As far as testing with JavaScript in html documents, I haven't done this because as far as I'm concerned, running scripts from web pages that open local directories is a potential security risk anyway.
0
 

Expert Comment

by:acstua
ID: 16767497
aye ive got about 5 2k3 servers, but im not sticking yahoo on there :)

and ive lost the will to help much more here ;(
0
 
LVL 2

Author Comment

by:Dazm
ID: 16769092

Ok, Thanks acstua

Thank you BillDL

0
 
LVL 3

Expert Comment

by:RiDo78
ID: 16769546
No tnx.
0
 
LVL 39

Expert Comment

by:BillDL
ID: 16774263
Thank you, Dazm.
0
 
LVL 2

Author Comment

by:Dazm
ID: 16775829

: (  RiDo78

You have no idea how much i appreciate you help
Is just that i have problems expressing my self : (

But yeah, i also want to thank you

Thank you Brother
0
 
LVL 2

Author Comment

by:Dazm
ID: 16775841

Do any of you know how can I delete this question?
I feel like this is a dumb question : (
Thank you guys.
0
 
LVL 39

Expert Comment

by:BillDL
ID: 16778827
There's no such thing really as a dumb question.
If you don't know the answer, and you don't have any immediately available way of finding something out, then you have to ask the question - even if it later LOOKS like it has been a dumb question.  When the answer to a question is relatively straightforward, then it can later make the question look as if it was a dumb one, even if at the time it wasn't.

Take a look at one of my questions and make up your own mind if it was a dumb one or not:
http://www.experts-exchange.com/Operating_Systems/Win98/Q_21137237.html

I wouldn't worry too much about it though, because the question is now a PAQ (previously asked question), and in a few days no further comments will be able to be added to it.  It will be filed away on the server along with the other questions that thousands of other members later wished that they hadn't needed to ask.

Bill
0
 
LVL 2

Author Comment

by:Dazm
ID: 16784579

You right Bill...
But you know what?
I don't think you question was a dumb one...
I see that there was an immediate explanation about the solution.
And according with Ask and Google, you may be the first person with
that particular problem : )... So once again, Thanks for you opinion Bill

...And thanks to have helped me in my question.

Thank you Bill
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article covers five tools all IT professionals should know about, as they up productivity by a great deal!
Scripts are great for performing batch jobs against users, however sometimes the GUI is all you need.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question