Jump to content

Recommended Posts

Posted

@echo off

COPY /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\"

PAUSE

anything wrong with this code, it won't work (this is called during the first logon after installation of a clean window OS)


Posted

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 One

This One Will Fail

echo test me >> %PROGRAMFILES%\testme.txt

This One Works

echo test me >> "%systemdrive%\Program Files\testme.txt"

Posted
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 One

This One Will Fail

echo test me >> %PROGRAMFILES%\testme.txt

This One Works

echo test me >> "%systemdrive%\Program Files\testme.txt"

tested both and got no message... so it means they both work ?

Posted

The first one will not output that text file

The second one will output the text file

To Test

Open Cmd.exe

Copy and paste the Red Example In To Cmd.exe

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

Hit Enter

Open Program Files And There Will Be A Text File There Now.

Hope This Helps

Posted
The first one will not output that text file

The second one will output the text file

To Test

Open Cmd.exe

Copy and paste the Red Example In To Cmd.exe

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

Hit Enter

Open Program Files And There Will Be A Text File There Now.

Hope This Helps

both commands created the "txt" files. so i guess its not the cause of the problem

Posted

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 Want

On My computer The Red Does Not Work.

The Green One Works.

Posted
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 Want

On My computer The Red Does Not Work.

The Green One Works.

i see the error in your post :

echo test me >> "%PROGRAMFILES%\testme1.txt"

missing quotes

Posted

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 close

notepad.exe than clean up.

echo off
cls && Mode 55,3 && Color 19 && Test Program Files

echo 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>nul
mkdir "%PROGRAMFILES%\ZZtemp"
ping -n 1 127.0.0.1>nul
move "C:\testme1.txt" "%PROGRAMFILES%\ZZtemp"
ping -n 1 127.0.0.1>nul
start notepad.exe "%PROGRAMFILES%\ZZtemp\testme1.txt"
echo. && echo Here Is Your File && ping -n 5 127.0.0.1>nul
taskKill /f /im notepad.exe
del /s /q "%PROGRAMFILES%\ZZtemp\*.*"
rmdir /s /q "%PROGRAMFILES%\ZZtemp"
echo. && echo Completed!!! && ping -n 3 127.0.0.1>nul
goto EOF
exit

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

they're there, i tested it and found out that XCOPY is better than COPY

thanks for helping :)

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