PDA

View Full Version : Window folder or WinNT Folder



NewsArchive
01-28-2010, 02:39 AM
What variable do I use to find an ini file placed in the system folder,
either the windows folder or winNT folder

Would this %SYSDIR% ?


--
Dan Scott
C55 C6.3 C7.1 LEGACY
www.garagepartner.com

NewsArchive
01-28-2010, 02:39 AM
Dan,

> What variable do I use to find an ini file placed in the system folder,
> either the windows folder or winNT folder
>
> Would this %SYSDIR% ?

I assume you would like to access the "System32" folder, right? If this is
the case, use %SYS32DIR%

If you would like to access the "Windows" folder, use %WINDIR%

Does this help?

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-29-2010, 02:28 AM
Hi Friedrich

I have always used the %WINDIR%
On an install 2 days ago, on a 2008 server
My ini files were located in the WINNT folder, no Windows folder was there.

I seemed to not find my ini files using %WINDIR%

I had to create a Windows folder and stick the ini's in it to get the
install to find the proper folders.

Does that make sense?

--
Dan Scott
C55 C6.3 C7.1 LEGACY
www.garagepartner.com

NewsArchive
01-29-2010, 02:28 AM
For years, all versions of Windows NT installed into C:\WINNT, not into
Windows. (My old W2K laptop has its OS in WINNT).

Perhaps the guy who installed that server is old enough that he's still in
that habit.

What do you gain by creating your own "Windows" folder when the entire
server is using WINNT?

jf

NewsArchive
01-29-2010, 02:29 AM
Jane,

> What do you gain by creating your own "Windows" folder when the entire
> server is using WINNT?

It sounds like Dan is using hard paths for his INI files.


Dan,

If you are using hard paths - especially to any "Windows" folder the
short, polite, answer is DON'T EVER, EVER, EVER DO THIS - EVER!<g>

Sadly, if you don't provide a path to Clarion then calls to GETINI and
PUTINI will default to the Windows folder - whatever folder that is on
any given machine.

Are these INI files written during install and only read or are they
read and write from your program?

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
01-29-2010, 02:30 AM
Lee

Now stop blaming me for everything... <g>

I am replacing some C55 apps that were installed years ago and not by me
I might add. But the upgrade does use the old data, so I need to find
out where it is located so I can complete the install.

All the other locations had the INI file in c:\Windows. (see my note to
Jane)

BTW, this has been my worst week in the computer business...7 18hr days
in a row with hardly anything going right. So watch out buddy <g>

Dan

--
Dan Scott
C55 C6.3 C7.1 LEGACY
www.garagepartner.com

NewsArchive
01-29-2010, 02:31 AM
Dan,

> Now stop blaming me for everything... <g>

Not everything, no!<g>

> All the other locations had the INI file in c:\Windows. (see my note to
> Jane)

In SB there are predefined variables %WINDIR% contains the path to the
Windows folder regardless of the actual folder name.

Checkout "Predefined Runtime Variables" in the help.

> BTW, this has been my worst week in the computer business...7 18hr days
> in a row with hardly anything going right. So watch out buddy <g>

Consider me watching out!<g>

--
Lee White

Enroll Today at http://CWaddons.com

Reports....: http://www.cwaddons.com/products/rpm/
Free Review: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
Faxing.....: http://www.cwaddons.com/products/afe/

NewsArchive
01-29-2010, 02:31 AM
Jane,

Maybe I didn't make myself clear

I went to install a customer Remotely

The install never completed because it relied on finding an INI file
in the %WINDIR% -

I ended up creating a windows folder just to get thru the install so the
guy could open for business.

I guess my question is

In C55 if you DID NOT specify an INI location, it went to the windows
folder, or Winnt if that was the system folder...

The installs I doing are upgrading old C55 apps over to 6.3(God Help me)

So I want to know how I can find the INI file placed by the Clarion C55 app

Dan

--
Dan Scott
C55 C6.3 C7.1 LEGACY
www.garagepartner.com

NewsArchive
01-29-2010, 02:32 AM
Dan,

There is only one valid Windows folder. And that's the folder returned by
the GetWindowsDirectory Windows API ;-)

BTW, if you do not define a INI file in the PUTINI Clarion command, it
places the entry in the WIN.INI file!

If the filename parameter does not contain a full path and file name for the
file, the Windows WritePrivateProfileString searches the Windows directory
for the file. If the file does not exist, this function creates the file in
the Windows directory.

I assume the developer used a static Windows paths (e.g. C:\Windows) and
forgot to make this dynamic. It's even possible that a standard Windows
folder on, say, NT or Win2k is named c:\apple

Friedrich

NewsArchive
01-30-2010, 03:14 AM
Or in the case of the W2K laptop I mentioned, it's on D:\WINNT (machine
dual-boots 2 operating systems on different partitions)

My 2K3 server is installed in E:\Windows.

I never thought of putting it into c:\apples :-(

jf

NewsArchive
02-01-2010, 02:35 AM
I think this is the case. The old program just had an ini file named, no
path. When I was in I should have looked at the path environment.
I will the next time. All standard OS's XP Vista worked fine.

>It's even possible that a standard Windows
> folder on, say, NT or Win2k is named c:\apple

Dan