coucou Posted January 18, 2005 Share Posted January 18, 2005 Sorry if i bothering you with my stupid question!The RunOnceEx file contain 2 command lines launching prepeare.cmd and cleanup.cmd files as shonwn in the example here bellowcmdow @ /HID@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY%\001 /VE /D "Preparing Installation..." /fREG ADD %KEY%\001 /V 1 /D "%systemdrive%\install\prepare.cmd" /fREG ADD %KEY%\005 /VE /D "Adobe Reader 6" /fREG ADD %KEY%\005 /V 1 /D "%systemdrive%\install\AdobeReader6\AR6.msi /qn" /fREG ADD %KEY%\055 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\055 /V 1 /D "%systemdrive%\install\cleanup.cmd" /fEXITHow far I know/learn, prepare.cmd file is used for things i want the runonceex.cmd to do before it got rolling and cleanup.cmd for what i want it to do at the end (like deleting stuff, etc).I could find example of files in the Unattended Guide except for prepare.cmd.1) My RunOnceEX contain the batch for Office2003, MUI 2003, Diskeeper, Acrobat PowerDVD6, NAV Corp9... How do i intend that ineed a prepare.cmd???Does someone else can give me a link for a prepare.cmd example??? 2) On the cleanup.cmd file exapmle, there are few "del" command regarding Adobe 6, are there any for Acrobat 7(not reader)???How do i know that this apps need a "RD" and/or "del" command???TNX for yr helpcoucou Link to comment Share on other sites More sharing options...
Gagorian Posted January 18, 2005 Share Posted January 18, 2005 I couldn't really understand all what you were actually asking..So if I understood you correctly... You only need "a prepare.cmd" if there is something you want to run before the programs install in RunOnceEx.. So it's up to you. If you cant think of anything you need to add in it you wont probably need it. (OR if you want to write the install commands into the prepare.cmd and make RunOnceEx run it... well, then that's your choice but it defeats most of the point of using RunOnceEx at all)The DEL command is used to delete a file or a group of files (wildcard, for example *.jpg)The RD command (Remove Directory) is as the name says used to delete directories.So if you want to delete a file or files use DEL.. if you want to remove the entire directory (and all the files in it) use RD.2) On the cleanup.cmd file exapmle, there are few "del" command regarding Adobe 6, are there any for Acrobat 7(not reader)???Do you mean things like deleting shortcuts? Just find the location and name of the shortcut and write the command yourself... DEL /Q "%systemdrive%\shortcut_location\shortcut.LNK" Link to comment Share on other sites More sharing options...
coucou Posted January 19, 2005 Author Share Posted January 19, 2005 TNX for yr help and excuse my poor english. I try to make myself more clear.prepare.cmdAs I'm not a computer expert, i would like to know what kind of "prepare" i do need, because every one here in our forum have that file.In fact, all RunOnceEx.cmd examples are starting with a line like REG ADD %KEY... ...\prepare .cmd" /f and i didn't saw any prepare.cmd exapmle, I tought there is a "standard" prepare.cmd file. May someone let me look his own prepare.cmd???cleanup.cmdHow do i know that special apps need a "rd" or "del" link???I notice that some apps like Acrobat 7, Roxio easy Media creator 7... are running a remove backup routine at the end of them standard installation. Do they need therefore a rd/del command line in the cleanup.cmd file??? If so, how could i know what link and where is it???Regardscoucou Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 19, 2005 Share Posted January 19, 2005 (edited) 1:\ A prepare cmd is a option I dont use one2:\ The RunOnceEx.cmd Is What You Use To Install Stuff 3:\ The Clean Up Cmd Is To Remove The Install And Drivers Folders Example Of A RunOnceEx.cmdREG ADD %KEY%\065 /VE /D "Ua065 %A1% Wrar341" /fREG ADD %KEY%\065 /V 1 /D "%CD1%Ua065\Wrar341-SFX.exe" /fHere A Clean Up Cmd That Will Remove The Install And Driver Folders Remove These Shortcuts.CMDecho offclscolor f1mode con: Cols=53 Lines=5Title Clean R1IF EXIST net user aspnet /deleteIF EXIST %SYSTEMDRIVE%\CleanR1.vbs GOTO WORKif not exist %SYSTEMDRIVE%\CleanR1.vbs goto OPSping -n 2 127.0.0.1>Nul | Echo Processing.......:WORKSTART %SYSTEMDRIVE%\CleanR1.vbsecho.ping -n 3 127.0.0.1>Nul | Echo Running CleanUp Script!!.......echo. exit:OPSecho.ECHO R1Cleanup.vbs Is Not At This Location: ECHO Missing %systemdrive%\R1Cleanup.vbsping -n 7 127.0.0.1>nul | Echo Cleanup Of Ua Files Cancel!!!!!echo.exitThings In Purple Are Varibles I Have Try To Add As Many Generic Spots To That People Seem To Use In The Ua. If There Are Some That I Missed Please Post Some More So I Can Add Them To The Script. The Stuff That Is Orange Is Inactive This Is Safe To Delete Or You Can Edit Them To Match Your Needs. '''''' These Must Be Removed The Front Of The Script, To Make Active. The Stuff InGreen Is Safe To Remove From The Script Or Edit To Suit Your NeedsThe Stuff That Is Red Use Caution When Editing VBS SCRIPTOn Error Resume NextDim Garbage, Shell, AP, UP, SD, SPSet Shell = WScript.CreateObject("WScript.Shell")A1 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\")A2 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\DESKTOP\")A3 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\START MENU\")A4 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\START MENU\PROGRAMS\")B1 = Shell.ExpandEnvironmentStrings("%USERPROFILE%\")B2 = Shell.ExpandEnvironmentStrings("%USERPROFILE%\DESKTOP\")B3 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\START MENU\")B4 = Shell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%\START MENU\PROGRAMS\")SD = Shell.ExpandEnvironmentStrings("%SYSTEMDRIVE%\")SP = Shell.ExpandEnvironmentStrings("%SYSTEMDRIVE%\Program Files\")W1 = Shell.ExpandEnvironmentStrings("%WINDIR%\")W2 = Shell.ExpandEnvironmentStrings("%WINDIR%\RESOURCES\THEMES\")W3 = Shell.ExpandEnvironmentStrings("%WINDIR%\SYSTEM32\")W4 = Shell.ExpandEnvironmentStrings("%WINDIR%\WEB\WALLPAPER\")Set fso = CreateObject("Scripting.FileSystemObject")''''''''' REMOVE THESE '''''' BEFORE ANY THING TO MAKE ACTIVE''''''''' SHORTCUT EXAMPLES 'fso.DeleteFile( A2 & "BSPlayer.lnk")'fso.DeleteFile( A2 & "Media Player Classic.lnk")'fso.DeleteFile( A2 & "HP Director.lnk")'fso.DeleteFile( A2 & "HP Memories Disc.lnk")'fso.DeleteFile( A2 & "HP Photo & Imaging.lnk")'fso.DeleteFile( A3 & "Set Program Access and Defaults.lnk")'fso.DeleteFile( A3 & "Windows Catalog.lnk")'fso.DeleteFile( A3 & "Java Web Start.lnk")''''''''' -------- FOLDERS -----------> fso.DeleteFolder( SD & "SOMEFOLDER")''''''''' EXAMPLE THIS IS WHAT THE COMPUTER READS %SYSTEMDRIVE%\SOMEFOLDER fso.DeleteFolder( SD & "DRIVERS")fso.DeleteFolder( SD & "INSTALL")''''''''' USE THIS TO DELETE ANY EXTRA FILES''''''''' I USE THIS TO DELETE THIS FILE AND THE CMD THAT CALLS ITfso.DeleteFile( A2 & "Java Web Start.lnk")fso.DeleteFile( A2 & "Nero StartSmart.lnk")fso.DeleteFile( A2 & "Mozilla.lnk")fso.DeleteFile( A3 & "Set Program Access and Defaults.lnk")fso.DeleteFile( A3 & "Windows Catalog.lnk")fso.DeleteFile( SD & "CLEANR1.VBS")fso.DeleteFile( SD & "CLEANR1.CMD")''''''''' FILES MSGBOX "Defualt Install And Drivers Deleted" & vbcrlf & "Defualt ShortCuts Deleted" & vbcrlf & "Deleted Files For Script", 0 + 64,"RUNONCE CLEAN UP!"To Test This Script Make 2 Folders On Systemdrive Systemdrive Is Where You Have Windows InstalledInstall DriversThan Run The Sfx File And The 2 Folders Will Be Gone Plus Any Shortcuts That Are Listed. Edited February 22, 2006 by gunsmokingman Link to comment Share on other sites More sharing options...
coucou Posted January 19, 2005 Author Share Posted January 19, 2005 Many TNX gunsmokingmanBTW, an hour ago and ffter a looooong search I could find Clean up Cmd Template... Do you know it??? it's YOURS As i'm not a coder, may you difference between the file here attached and the file in "Clean up Cmd Template" attached. In other hand, what file for best use.Again TNXcoucou Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 19, 2005 Share Posted January 19, 2005 The Ones In Tools You have To edit To make Work.This One Is What The One In The Template Can Be Made In to.I would use this one here as it will remove the main folders, and those shortcuts listed, in the post. Without editing it more. Link to comment Share on other sites More sharing options...
coucou Posted January 20, 2005 Author Share Posted January 20, 2005 Oh OK!!!To summarize, i may remove my cleanup.cmd file in my x:\XPCD\Software and replace it by CLEANR1.exe this thread attached???and here will be the command line in RunOnceEx???REG ADD %KEY%\100 /VE /D "Cleaning Up and Rebooting" /fREG ADD %KEY%\100 /V 1 /D "%CDROM%\Software\CLEANR1.exe" /fIf so, what about this command line for PowerDVD6 in my actual clenup.cmd del "%systemdrive%\Program Files\CyberLink\PowerDVD\OLRSubmission\OLRSubmission.exe"del "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\CyberLink PowerDVD\On-Line Registration.lnk"Regardscoucou Link to comment Share on other sites More sharing options...
muiz Posted February 20, 2005 Share Posted February 20, 2005 CLEANR1.exe?? Link to comment Share on other sites More sharing options...
Astalavista Posted February 20, 2005 Share Posted February 20, 2005 I only use prepare to delete my dp or drivers folder. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now