Why won't this script work in Vista?

T

ToddAndMargo

Hi All,

This script works fine in w2k-pro and XP (both),
but not in Vista. Why and how do I fix it?

Many thanks,
-T

@echo off


set Target=C:\Program Files\Mozilla Firefox\searchplugins
if not exist "%Target%" goto Error

attrib -r "%Target%\*.*"
xcopy "SearchPlugins\*.*" "%Target%\." /Y
attrib -r "%Target%\*.*"
Goto end


:Error
echo Unable to locate
echo %Target%
pause
goto end

:end
 
K

Kerry Brown

Have you tried right clicking and choosing Run as administrator? You can't
write to the Program Files folder tree in Vista without elevating your
privileges.
 
T

ToddAndMargo

Kerry said:
Have you tried right clicking and choosing Run as administrator? You
can't write to the Program Files folder tree in Vista without elevating
your privileges.

Tried running as administrator -- no joy.

How do I "elevate" my script's privileges?

-T
 
K

Kerry Brown

Put a pause statement after every line and step through the script one line
at a time. Where does the problem happen and what is the error message?
 
C

Cameron Snyder

Note: Xcopy is now deprecated, please use Robocopy. Are you sure that source
exists and the relative path notation is correct in Vista?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top