Jump to content

Changing from cmd to inf (copy files)


Recommended Posts

Hi all!

I'm trying to change from cmd files to inf files on my unattended dvd, but needs some guidelines on how to copy files. I've learned how to import registry tweaks using inf's, but are puzzled by the copy files section.... :)

Let's say I have this cmd file (WinZip)

@ECHO OFFcmdow @ /HIDSET CDROM=IF EXIST D:\cdrom.her SET CDROM=D:IF EXIST E:\cdrom.her SET CDROM=E:IF EXIST F:\cdrom.her SET CDROM=F:IF EXIST G:\cdrom.her SET CDROM=G:IF EXIST H:\cdrom.her SET CDROM=H:IF EXIST I:\cdrom.her SET CDROM=I:IF EXIST J:\cdrom.her SET CDROM=J:IF EXIST K:\cdrom.her SET CDROM=K:IF EXIST L:\cdrom.her SET CDROM=L:IF EXIST M:\cdrom.her SET CDROM=M:IF EXIST N:\cdrom.her SET CDROM=N:IF EXIST O:\cdrom.her SET CDROM=O:IF EXIST P:\cdrom.her SET CDROM=P:IF EXIST Q:\cdrom.her SET CDROM=Q:IF EXIST R:\cdrom.her SET CDROM=R:IF EXIST S:\cdrom.her SET CDROM=S:IF EXIST T:\cdrom.her SET CDROM=T:IF EXIST U:\cdrom.her SET CDROM=U:IF EXIST V:\cdrom.her SET CDROM=V:IF EXIST W:\cdrom.her SET CDROM=W:IF EXIST X:\cdrom.her SET CDROM=X:IF EXIST Y:\cdrom.her SET CDROM=Y:IF EXIST Z:\cdrom.her SET CDROM=Z:
MKDIR "%programfiles%\Winzip"XCOPY %cdrom%\SETUP\WINXP\PRO\$OEM$\Applications\Winzip\*.* %programfiles%\Winzip /q /y /sstart /wait %programfiles%\Winzip\winzip32.exe /noqp /autoinstalldel "%allusersprofile%\start-meny\WinZip.lnk"del "%allusersprofile%\skrivbord\WinZip.lnk"del "%allusersprofile%\start-meny\Program\WinZip\Uninstall WinZip.lnk"del "%allusersprofile%\start-meny\Program\WinZip\Help Manual.lnk"del "%allusersprofile%\start-meny\Program\WinZip\What's New.lnk"EXIT

How would this look as an inf file?

Regards

ToBe

Link to comment
Share on other sites


To copy a file in an inf, you need to defination the destination folder and use the CopyFiles command to specify the files to be copied. By default you have windows (10), system32 (11), and other folders.

[defaultinstall]

CopyFiles = one

[DestinationDirs]

one = 10 ; windows

two = 11 ; windows\system32

[one]

file1

file2

[two]

file1

file2

That's it. Read my install4.inf for more info or read the registry guide.

-gosh

Link to comment
Share on other sites

Thank you for taking time to answer, gosh. I check your site quite often.... Very nice info!

I think i'm getting the hang of it.

This is my CopyFiles.inf:

[Version]signature="$Chicago$"
[sourceDisksNames]one=%name%,,10,\Applications\Winzip
[sourceDisksFiles]EXAMPLE.ZIP=oneFILE_ID.DIZ=oneLICENSE.TXT=oneORDER.TXT=oneREADME.TXT=oneVENDOR.TXT=oneWHATSNEW.TXT=oneWINZIP32.EXE=oneWINZIP.CHM=oneWINZIP.CNT=oneWINZIP.HLP=oneWINZIP.TXT=oneWZ.PIF=oneWZ32.DLL=oneWZ.COM=oneWZCAB3.DLL=oneWZCAB.DLL=oneWZINST.CHM=oneWZINST.HLP=oneWZPOPUP.HLP=oneWZQKPICK.EXE=oneWZQKSTRT.RTF=oneWZSEPE32.EXE=oneWZSHLEX1.DLL=oneWZSHLSTB.DLL=oneWZTUTOR.HLP=oneWZVINFO.DLL=oneWZWIZARD.CHM=oneWZWIZARD.HLP=oneWZZPMAIL.DLL=one
[DestinationDirs]WinZip = 16422,\WinZip
[DefaultInstall]CopyFiles = WinZip
[WinZip]EXAMPLE.ZIPFILE_ID.DIZLICENSE.TXTORDER.TXTREADME.TXTVENDOR.TXTWHATSNEW.TXTWINZIP32.EXEWINZIP.CHMWINZIP.CNTWINZIP.HLPWINZIP.TXTWZ.PIFWZ32.DLLWZ.COMWZCAB3.DLLWZCAB.DLLWZINST.CHMWZINST.HLPWZPOPUP.HLPWZQKPICK.EXEWZQKSTRT.RTFWZSEPE32.EXEWZSHLEX1.DLLWZSHLSTB.DLLWZTUTOR.HLPWZVINFO.DLLWZWIZARD.CHMWZWIZARD.HLPWZZPMAIL.DLL
[strings]name="Windows MultiBoot-DVD"

The setup is called with appinstall.inf through cmdlines.txt:

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\\install01",,,"Installing WinZip"HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\\install01",1,,"%16422%\Winzip\winzip32.exe /noqp /autoinstall"

And then the regtweaks and deletion of files through settings.inf:

[Version]signature="$Chicago$"
[DestinationDirs]ZipDesk =16409ZipStart = 16407,\WinZipZipProg = 16406
[DefaultInstall]AddReg = WinZip.RegDelReg = Delete.RegDelFiles = ZipDesk,ZipStart,ZipProg
[WinZip.Reg]HKCU,"%nico%","ShowTips",,"0"HKCU,"%nico%\fm","shlExt",,"0"
[Delete.Reg]HKCR,"%dir%\%drag%"HKCR,"Drive\shellex\%drag%"HKCR,"%fol%\%drag%"HKCR,"*\shellex\%con%"HKCR,"%fol%\%con%"HKCR,"%dir%\%con%"
[ZipDesk]Winzip.lnk
[ZipStart]Uninstall Winzip.lnkHelp Manual.lnkWhat's New.lnk
[ZipProg]Winzip.lnk
[strings]nico="Software\Nico Mak Computing\WinZip\WinZip"dir=Directory\shellexfol=Folder\shellexcon=ContextMenuHandlers\WinZipdrag=DragDropHandlers\WinZip

It's a whole lot of work to get rid of the cmd and reg files. But it looks kinda neat..

Is there a way to execute a file, like the "start /wait" command, from within an inf file?

Link to comment
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.
×
×
  • Create New...