Jump to content

For those who want to tune their XPCD


Recommended Posts


You should use %systemDrive% In stead of c:\ plus you should run a check to see if the folder exists, before the copy.

Here is a vbs Script That will check for this Folder %SystemDrive%\TempForIcon if it not there then it makes the folder. It then checks for this folder %SystemDrive%\XPCD then it copies the list of files.

Re-Edit with the correct entries added the new file list by Yzowl thanks for the info.
On Error Resume Next
Const OverwriteExisting = TRUE
Dim File_Copy, SD
Dim Act : Set Act = CreateObject("Wscript.Shell")
Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
SD = Act.ExpandEnvironmentStrings("%SystemDrive%")
ZZ1 = MsgBox("Did You Want To Copy The Files To, " & SD & "\TempForIcon" & vbCrLf & "Yes To Start The Copy, No To Exit", 4 + 32, "Make A Choice")
If ZZ1 = 6 Then
File_Copy = Array(_
"access.cp_ ","appwiz.cp_","browseui.dl_","cabview.dl_","calc.ex_","cleanmgr.ex_","cmd.ex_ ", "cmdial32.dl_","console.dl_","credui.dl_",_
"desk.cp_","explorer.ex_","fontext.dl_","hdwwiz.cp_","iexplore.ex_","inetcpl.cp_","inetcplc.dl_","intl.cp_","joy.cp_","keymgr.dl_",_
"logon.sc_","main.cp_","mmsys.cp_","moricons.dl_","msgina.dl_","mshtml.dl_","msimn.ex_", "msoeres.dl_","mspaint.ex_","mstask.dl_","mstscax.dl_",_
"mydocs.dl_","ncpa.cp_","netid.dl_","netshell.dl_","newdev.dl_", "ntshrui.dl_","notepad.ex_","nusrmgr.cp_","occache.dl_","powercfg.cp_",_
"printui.dl_","rasdlg.dl_","regedt32.ex_","shdoclc.dl_","shdocvw.dl_", "shell32.dl_","shimgvw.dl_","shlwapi.dl_","sndvol32.ex_","sndrec32.ex_",_
"stobject.dl_","sysdm.cp_","sysocmgr.ex_","syssetup.dl_","taskmgr.ex_","telephon.cp_", "themeui.dl_","timedate.cp_","url.dl_","urlmon.dl_",_
"webcheck.dl_","wiaacmgr.ex_","winntbbu.dll ","wininet.dl_","winsrv.dl_","wmplayer.ex_","wmploc.dl_","wupdmgr.ex_","xpsp2res.dl_","zipfldr.dl_")
If Not Fso.FolderExists(SD & "\TempForIcon") Then Fso.CreateFolder(SD & "\TempForIcon") End If
For Each strCF In File_Copy
If Fso.FolderExists(SD & "\XPCD") Then
Fso.CopyFile(SD & "\XPCD\i386\" & strCF) ,(SD & "\TempForIcon\"& strCF), OverwriteExisting
Else
Act.Popup "There Is No, " & SD & "\XPCD\i386 source Files" & vbCrLf & "Re Run Script When You Have The Source Files", 10,"Error", 0 + 32
If Fso.FileExists(SD & "\TempForIcon") Then Fso.DeleteFile(SD & "\TempForIcon") End If
If Fso.FileExists(SD & "\CopyIcon.vbs") Then Fso.DeleteFile(SD & "\CopyIcon.vbs") End If
WScript.Quit
End If
Next
Act.Popup "Complete Copy Of Icon Files", 5, "Finish", 0 + 32
If Fso.FileExists(SD & "\CopyIcon.vbs") Then Fso.DeleteFile(SD & "\CopyIcon.vbs") End If
Else
Act.Popup Act.ExpandEnvironmentStrings("%UserName%") & ", Has Cancel The Copy", 5, "User Cancel", 0 + 32
End If

The SFX file has the added updated list

Edited by gunsmokingman
Link to comment
Share on other sites

The following entries are all incorrect, since they do not exist

  • acces.cp_ moriconx.dl_ regedit.ex_ sndvol.ex_ taskmsgr.ex_ winntbbu.dl_ zipfldr.cp_

The following may prove a little more successful:

@ECHO OFF &SETLOCAL ENABLEEXTENSIONS
TITLE .:FiLe CoPiEr - ThEuTlAsS:.
COLOR FC

ECHO/%0 |FINDSTR/I "\\I386\\%~nx0" >NUL 2>&1 ||(ECHO/ Place this file in the I386 folder of your unattended xpcd &&GOTO END)

:YorN
ECHO/
ECHO/ Do you wish to copy the files!
ECHO/
SET "Choice="
SET /P "Choice= Please enter your choice [Y/N] "
IF '%Choice%' EQU '' (ECHO/ &ECHO/ Please make a selection &&GOTO YorN)
IF /I '%Choice:~0,1%' NEQ 'Y' (ECHO/ &ECHO/ Closing script... &&GOTO END)

:STARTCOPY
SET "TMPRY=%SYSTEMDRIVE%\tempforicon"
IF NOT EXIST %TMPRY% MD %TMPRY%
ECHO/
ECHO/ Copying files to %TMPRY%
ECHO/ Please wait...
FOR %%? IN (access appwiz desk hdwwiz inetcpl intl joy main mmsys ncpa nusrmgr powercfg sysdm telephon timedate) DO (COPY %%?.CP_ %TMPRY%)
FOR %%? IN (browseui cabview cmdial32 console credui fontext inetcplc keymgr moricons msgina mshtml msoeres mstask mstscax mydocs netid netshell newdev ntshrui occache printui rasdlg shdoclc shdocvw shell32 shimgvw shlwapi stobject syssetup themeui url urlmon webcheck wininet winsrv wmploc xpsp2res zipfldr) DO (COPY %%?.DL_ %TMPRY%)
FOR %%? IN (calc cleanmgr cmd explorer iexplore msimn mspaint notepad regedt32 sndrec32 sndvol32 sysocmgr taskmgr wiaacmgr wmplayer wupdmgr) DO (COPY %%?.EX_ %TMPRY%)
FOR %%? IN (logon.sc_ winntbbu.dll) DO COPY %%? %TMPRY%
ECHO/
ECHO/ Finished

:END
PING -n 6 127.0.0.1 >NUL
ENDLOCAL &EXIT

Edited by Yzöwl
Link to comment
Share on other sites

Re Edit Removed the file listed by Yzowl thanks for the info.
@ gunsmokingman

The files didn't want removing, they wanted correcting as in my posted batch file.

access.cp_ moricons.dl_ regedt32.ex_ sndvol32.ex_ taskmgr.ex_ winntbbu.dll zipfldr.dl_

Edited by Yzöwl
Link to comment
Share on other sites

Of course, the fun thing is that at the moment, there are still thirty eight people who have downloaded the incorrect, original batch file, since I posted about the incorrect entries; thirty five since I added my version of the corrected batch!

Edited by Yzöwl
Link to comment
Share on other sites

Alternating caps? Are you 12?

Alternating case is an easy way to make code more readable and this is true with all script and programming languages.

MSFN forum rule # 7b

I completely disagree. In fact, this is the FIRST script that I've ever seen written in alternating caps. Caps emphasis (CE) and space emphasis (SE) are the easiest for people to read (that is, general reading ... like an essay, blog, email, etc). But that's neither here nor there.

There's a very defined line between flaming and sarcastic rhetoric. Obviously I think it's juvenile to use alternating caps, but expressing that opinion through rhetoric lightens the situation, as opposed to just saying "Alternating caps is quite juvenile." The latter would be closer related to a flame. "Is it necessary to make such comments?" one might ask. Well no, it isn't. But then again, I'm just being silly (much like how alternating caps is silly). ;)

edit:

I just read someone else's reply. It's obvious you were thinking of CamelCase, not sTudLyCaPs.

And this is right out of Wikipedia as well (regarding studly caps):

It appears to have been popularized among adolescent users during the BBS and early WWW eras of online culture, as a form of rebellion against the rules for proper capitalization of names and sentences.

Edited by Dumpy Dooby
Link to comment
Share on other sites

I just read someone else's reply. It's obvious you were thinking of CamelCase, not sTudLyCaPs.

English is not my primary language and yes I was refering to CamelCase. I thought your comment were based on VBScript or batch posted as reply. I did not took the time to look at ExTrAcT.cMd and it's obvious now that your comments make sense.

My mistake... :blushing:

BTW, it's more newbie than age related. After few batches, he will choose his prefered case and will not hardcode path anymore. :P

Link to comment
Share on other sites

What I do not like is the fact that you have added nothing that has improved his batch.

He choose to have it that way, did it occour to you that he has it that way so it sticks, out

in the thread, and all this person was trying to do was help the other members here.

Yzowl and I choose to help and try and make his batch better, it does not bother me that

he choose to have it posted like that. It just a name nothing more or less it will not affect

the way the batch runs.

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...