• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Gape

98 SE SP 3.32

2,361 posts in this topic

Does anybody know how to rename a directory with a inf. Thanks

0

Share this post


Link to post
Share on other sites

I didn't know it either before starting to read this particular page. It's just 3 entries above the previous one I linked to, in an earlier post.

Granted, it took me a few trials before getting to the correct format, maybe because I was trying to watch a movie on TV at the same time.

Anways, since the explanations are not clear enough, let me put it in my own words:

- folder renaming is done just as any file renaming, through registry keys

- all paths that (may) contains spaces must be enclosed in double quotes

- since at least two entries are required, first one will point to the root of the folder that is to be renamed; second entry will contain old folder name and new folder name

In the following example, Im gonna rename the folder G:\Test folder into G:\Renamed test folder. Note that the main registry key to use is HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles" to which arbitrary names can be added to separate different paths; in this case, the arbitrary name is MyDir.

[Version]
Signature="$CHICAGO$"

[DefaultInstall]
AddReg=RegEntries

[RegEntries]
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir",,, "G:"
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir", "Test folder",, "Renamed test folder"

For further clarification, to rename the folder C:\Windows\Local Settings\Apps into C:\Windows\Local Settings\My applications, one would use the following keys in the [RegEntries] section above:

HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir",,, "C:\Windows\Local Settings"
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir", "Apps",, "My applications"

0

Share this post


Link to post
Share on other sites

Thank Drugwash :thumbup I will start testing it in little bit. If all goes well new update later today.

0

Share this post


Link to post
Share on other sites

You're welcome.

I forgot to mention that the LDID (Logical Disk IDentifier) codes must be used for a correct setup in any circumstances. You probably know them already - they're listed on this page, for anyone interested.

For example, instead of "C:\Windows\Local Settings", use "%25%\Local Settings".

Oh and please, as long as the releases are still in experimental stage, don't use the FINAL attribute, because it's misleading and may even get frustrating. I've got about 5 such "FINAL" packages and that's only because I skipped a few other releases; over 30MB of a package is not that small for a limited download quota over a GPRS connection.:}

0

Share this post


Link to post
Share on other sites

Just for a quick reference on what MS says cannot be done to files, using .infs:

Limitations of .inf Files

  • Directories cannot be deleted.
  • Files cannot be moved to a different location when using RenFiles. (The RenFiles command only renames a file in place.)
  • Copies of a file cannot be made. (The CopyFiles command only copies files from the source disk to the destination directory.)

Quoted from this page.

@Drugwash: Your explanations are so much clearer than MS's that I cannot resist asking you to consider writing a full ".inf How to" or Tutorial. Please do consider it. :yes:

0

Share this post


Link to post
Share on other sites

@Drugwash: Your explanations are so much clearer than MS's that I cannot resist asking you to consider writing a full ".inf How to" or Tutorial. Please do consider it. :yes:

Sure, no problem. As soon as MS acknowledge Win98SE as their best OS version ever released. :D

Seriously now, I knew absolutely nothing about inf structure before PROBLEMCHYLD first asked for help here; all I did was read the available documentation, pass it through my logical filter and then use trial'n'error until the outcome was satisfactory. Anyone could do this, time allowing. And for what it's worth, my plate's already overflowing (need a pinch roller and a few other spare parts for an AKAI GX635D that I have to fix for a good friend - any idea?) and there's no help in view; not to mention I'm not getting any younger... ;) I feel honored for the offer, though.

0

Share this post


Link to post
Share on other sites

Ok, Drugwash

I tried you method and, I failed :huh:

Maybe I did something wrong. But this is what I'm trying to do

Add JET40REPL.EXE linked here http://support.microsoft.com/kb/321076

but when I add it to my inf, it doesn't create the directory with the long folder name Replication Manager 4.0.

Here is what the the MS original inf file looks like. Please help me when you get some time.

[Version]
Signature="$Chicago$"
Provider=%Msft%
ComponentId={F1CAE27D-85D3-4642-B9E9-48D7F9F56C82}
DriverVer=6-19-2003, 4.0.7512.
FriendlyName=Jet 4.0
VersionMajor=4
VersionMinor=0
BuildNumber=7512
QFENumber=
AdvancedINF=2.5


[SourceDisksNames]
55=%ID1%,"Jetsetup.CAB",0

[SourceDisksFiles]
msrecr40.dll=55
msrpfs40.dll=55
msrclr40.dll=55
mstrai40.exe=55
mstran40.exe=55

[Strings]
ID1 = "Jetsetup.cab"
Msft = "Microsoft"
PROGRAMF = "Program files"
COMMON = "Common files"
SHARED = "Microsoft shared"
REPLMAN = "Replication Manager 4.0"
VersionStringHere

[DestinationDirs]
INFDIR=17
SYSTEMDIR=11
DAODIR=24,%PROGRAMF%\%COMMON%\%SHARED%\dao
RMDIR=24,%PROGRAMF%\%COMMON%\%SHARED%\%REPLMAN%
RenFilesSection=11

[DAODIR]

[RMDIR]
msrpfs40.dll,,,96
mstrai40.exe,,,96
mstran40.exe,,,96

[SYSTEMDIR]
msrecr40.dll,,,96
msrclr40.dll,,,96

[DefaultInstall]
RequiredEngine=SETUPAPI
CheckAdminRights=1
Copyfiles=INFDIR,SYSTEMDIR,DAODIR,RMDIR
RegisterOCXs=RegisterOCXSection

[Uninstall]
UnRegisterOCXs=RegisterOCXSection

[RegisterOCXSection]
%11%\msjetoledb40.dll
%11%\msrclr40.dll

Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

@Drugwash: Well, I guess it's your logical filter that makes the difference, plus a gist for formulating it clearly. :thumbup

(need a pinch roller and a few other spare parts for an AKAI GX635D that I have to fix for a good friend - any idea?)

Yes, but you won't like the prices... <link> Working with such beautiful vintage sound equipment has its downsides, price being the worst one, you know. :D

0

Share this post


Link to post
Share on other sites

@dencorso: Doin' my best to make myself understood, although I sometimes fail miserably - maybe, maybe, not always my fault.

Auction sites don't quite "like" our area - coulnd't blame them, all in all: we got our bad seeds and unfortunately, wind is blowing them towards the most remote areas of the world. I'd rather have some first-hand contacts to deal with, when possible. But thanks for trying to help.

@PROBLEMCHYLD: The original inf file I can read just fine from the package; yours - the failed attempt - is what I can't see anywhere around. If you'd be so kind as to post it, I or someone else could point you to the bug(s).

Off the top of my head, I could think of some quotes missing from folder name, or some section name missing (CopyFiles=[...], RMDIR in [DefaultInstall], possibly).

0

Share this post


Link to post
Share on other sites
:thumbup Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

You really need to try harder... I explained the best I could...

First key contains the path to the folder to be renamed but it does not contain the folder name!

Second key contains only the folder name, without the path.

That's how it should look like (theoretically - not tested); considering the mess that's in that inf, it would take me too long to analyze and fix it. If it works as is, fully, it's truly a miracle.:blink:

;MSJET SP8
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir",,, "%PROGRAMF%\%COMMON%\%SHARED%"
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir", REPLICAT.0,, "Replication Manager 4.0"

Edited by Drugwash
0

Share this post


Link to post
Share on other sites

You really need to try harder... I explained the best I could...

Before I even posted here, I been working on this the last 3 days with no success, How harder do you want me to try? :huh:

HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir",,, "%PROGRAMF%\%COMMON%\%SHARED%"

HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir", REPLICAT.0,, "Replication Manager 4.0"

It still does not create the long file name, but thank you for trying. Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

You're probably right... we all have our limits.

The folder should be created on a file copy operation; apparently this operation does not run, for some reason. Until the copy operation succeeds and the folder is created, no renaming will take place.

Now, if the folder is created but the rename fails, then the problem may reside in the original 8+3 folder name - how did you come up with REPLICAT.0? I don't have any such folder in that path so can't check if the name is correct. You may also try with or without quotes around REPLICAT.0.

It also occured to me that this renaming might have to take place at some other time or in a previously/later run inf.

Of course, the issue may reside in a completely different place, but the file is large and complicated and I can't get to the bottom of this right now, so please try a few more workarounds if/when possible.

0

Share this post


Link to post
Share on other sites

You're probably right... we all have our limits.

The folder should be created on a file copy operation; apparently this operation does not run, for some reason. Until the copy operation succeeds and the folder is created, no renaming will take place.

Now, if the folder is created but the rename fails, then the problem may reside in the original 8+3 folder name - how did you come up with REPLICAT.0? I don't have any such folder in that path so can't check if the name is correct. You may also try with or without quotes around REPLICAT.0.

It also occured to me that this renaming might have to take place at some other time or in a previously/later run inf.

Of course, the issue may reside in a completely different place, but the file is large and complicated and I can't get to the bottom of this right now, so please try a few more workarounds if/when possible.

The folder does create and all the files copy. It just won't rename to the long file name. REPLICAT.0 is the name of the folder

when I install the MS installer and view it as a short name.

0

Share this post


Link to post
Share on other sites

Try to put the rename-related keys in a separate inf file and launch it after the main file, see if it works that way.

Although - after a little bit of thinking - just adding the relevant missing strings to the Strings section might fix it:


[Version]
Signature="$Chicago$"

[DefaultInstall]
AddReg=RegEntries

[RegEntries]
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir",,, "%PROGRAMF%\%COMMON%\%SHARED%"
HKLM, "Software\Microsoft\Windows\CurrentVersion\RenameFiles\MyDir", REPLICAT.0,, "Replication Manager 4.0"

[Strings]
PROGRAMF = "Program files"
COMMON = "Common files"
SHARED = "Microsoft shared"
;REPLMAN = "Replication Manager 4.0"

0

Share this post


Link to post
Share on other sites

I tried everything that I can think of, and nothing works. I did find out if you extract the installer and run the inf it does not create the directory. So MS is using some other technique.

Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

Thanks Drugwash, I figured it out. New update later today.

0

Share this post


Link to post
Share on other sites
:thumbup Updated :w00t: Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

UPDATES WILL CONTINUE IF ANY BUGS OCCUR OR IF ANY NEW FILES ARE COMPATIBLE.

Glad you sorted out the folder naming problem!

Just one suggestion ProblemChyld.

Are you declaring this to be a final release of SP3?

If so, it should be called 3.0 and should not then be subsequently altered.

Any subsequent fixes or additions should be SP3.1, 3.2 etc.

The title of this thread should be changed to "98 SE SP 3" too, or a new thread started.

Drop the "beta" if it no longer is a beta.

:)

Edited by Dave-H
0

Share this post


Link to post
Share on other sites

Glad you sorted out the folder naming problem!

Just one suggestion Problemchyld.

If you are declaring this to be a final release of SP3, it should be 3.0 and should not then be subsequently altered.

Any subsequent fixes or additions should be SP3.1, 3.2 etc.

The title of this thread should be changed to 98 SE SP 3 too, or a new thread started!

Drop the "Beta" if it no longer is a beta.

:)

A mod would have to change the title, or I would have to start a new thread. Its not quite final yet but pretty dang close and its not beta anymore either.

Edited by PROBLEMCHYLD
0

Share this post


Link to post
Share on other sites

I'm going to add MSXML 4.0 SP 2, are there an objections?

0

Share this post


Link to post
Share on other sites

I vaguely recall having had some problems with MSXML 4.0, but that was years ago and can't remember the details. If it's not mandatory, you may add it as an optional package. It's worth waiting for other opinions too, maybe it was just me and my notorious bad luck.

0

Share this post


Link to post
Share on other sites

I'm going to add MSXML 4.0 SP 2, are there an objections?

Have you added MSXML 2.5?

Windows 98 SE shipped with MSXML 2.0b (Msxml.dll). MSXML 2.5 SP3 (direct download) was the last version that retained that file name (build 8.00.6730.0). MSXML 2.6 was Msxml2.dll, version 3 was Msxml3.dll, and so on.

List of Microsoft XML Parser (MSXML) versions.

0

Share this post


Link to post
Share on other sites

I thought MSXML 4.0 SP2 supersede older versions. If it doesn't then I can add'em all.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.