hmaster10 Posted February 27, 2005 Share Posted February 27, 2005 @echo offCOPY /Y "%systemdrive%\Install\AdAware\defs.ref" "%PROGRAMFILES%\Lavasoft\Ad-Aware SE Professional\"COPY /Y "%systemdrive%\Install\AdAware\sites.txt" "%PROGRAMFILES%\Lavasoft\Ad-Aware SE Professional\"COPY /Y "%systemdrive%\Install\AdAware\awsettings.awc" "%UserProfile%\Application Data\Lavasoft\Ad-Aware\"COPY /Y "%systemdrive%\Install\AdAware\settings.awc" "%UserProfile%\Application Data\Lavasoft\Ad-Aware\"PAUSEanything wrong with this code, it won't work (this is called during the first logon after installation of a clean window OS) Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 27, 2005 Share Posted February 27, 2005 Try This COPY /Y "%systemdrive%\Install\AdAware\defs.ref" "%systemdrive%\Program Files\Lavasoft\Ad-Aware SE Professional\"To Test Open Cmd.exe Cut And Paste The First OneThis One Will Failecho test me >> %PROGRAMFILES%\testme.txtThis One Worksecho test me >> "%systemdrive%\Program Files\testme.txt" Link to comment Share on other sites More sharing options...
hmaster10 Posted February 28, 2005 Author Share Posted February 28, 2005 Try This COPY /Y "%systemdrive%\Install\AdAware\defs.ref" "%systemdrive%\Program Files\Lavasoft\Ad-Aware SE Professional\"To Test Open Cmd.exe Cut And Paste The First OneThis One Will Failecho test me >> %PROGRAMFILES%\testme.txtThis One Worksecho test me >> "%systemdrive%\Program Files\testme.txt"<{POST_SNAPBACK}>tested both and got no message... so it means they both work ? Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 28, 2005 Share Posted February 28, 2005 The first one will not output that text fileThe second one will output the text fileTo Test Open Cmd.exeCopy and paste the Red Example In To Cmd.exeThen hit enter Next Open Your Program Files And There Will Not Be A Text File There.Now Cut And Paste The Green Example Into Cmd.exeHit Enter Open Program Files And There Will Be A Text File There Now.Hope This Helps Link to comment Share on other sites More sharing options...
hmaster10 Posted February 28, 2005 Author Share Posted February 28, 2005 The first one will not output that text fileThe second one will output the text fileTo Test Open Cmd.exeCopy and paste the Red Example In To Cmd.exeThen hit enter Next Open Your Program Files And There Will Not Be A Text File There.Now Cut And Paste The Green Example Into Cmd.exeHit Enter Open Program Files And There Will Be A Text File There Now.Hope This Helps<{POST_SNAPBACK}>both commands created the "txt" files. so i guess its not the cause of the problem Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 28, 2005 Share Posted February 28, 2005 Try This Again echo test me >> %PROGRAMFILES%\testme1.txt echo test me >> "%systemdrive%\Program Files\testme2.txt" There will be only one file the one that works. That Is The One You WantOn My computer The Red Does Not Work.The Green One Works. Link to comment Share on other sites More sharing options...
hmaster10 Posted February 28, 2005 Author Share Posted February 28, 2005 Try This Again echo test me >> %PROGRAMFILES%\testme1.txt echo test me >> "%systemdrive%\Program Files\testme2.txt" There will be only one file the one that works. That Is The One You WantOn My computer The Red Does Not Work.The Green One Works.<{POST_SNAPBACK}>i see the error in your post :echo test me >> "%PROGRAMFILES%\testme1.txt"missing quotes Link to comment Share on other sites More sharing options...
gunsmokingman Posted February 28, 2005 Share Posted February 28, 2005 Here Is A script That Might Help You It Will Make A Text File In C:\Than Move it to Program files than open the testme1.txt than it will closenotepad.exe than clean up.echo offcls && Mode 55,3 && Color 19 && Test Program Filesecho Today Is %date% >> "C:\testme1.txt"echo The Time Is %time% >> "C:\testme1.txt"echo Hello >> "C:\testme1.txt"echo This is a Test >> "C:\testme1.txt"ping -n 1 127.0.0.1>nulmkdir "%PROGRAMFILES%\ZZtemp"ping -n 1 127.0.0.1>nulmove "C:\testme1.txt" "%PROGRAMFILES%\ZZtemp"ping -n 1 127.0.0.1>nulstart notepad.exe "%PROGRAMFILES%\ZZtemp\testme1.txt"echo. && echo Here Is Your File && ping -n 5 127.0.0.1>nultaskKill /f /im notepad.exedel /s /q "%PROGRAMFILES%\ZZtemp\*.*"rmdir /s /q "%PROGRAMFILES%\ZZtemp"echo. && echo Completed!!! && ping -n 3 127.0.0.1>nulgoto EOFexit Link to comment Share on other sites More sharing options...
sleepnmojo Posted February 28, 2005 Share Posted February 28, 2005 Donno why no one asked this, but are the directories their before the copy?For the user profile directory, you could try the $DOCS folder approach. Link to comment Share on other sites More sharing options...
hmaster10 Posted March 1, 2005 Author Share Posted March 1, 2005 Donno why no one asked this, but are the directories their before the copy?For the user profile directory, you could try the $DOCS folder approach.<{POST_SNAPBACK}>they're there, i tested it and found out that XCOPY is better than COPYthanks for helping 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