Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Why won't this script work in Vista?

Reply
Thread Tools Display Modes

Why won't this script work in Vista?

 
 
ToddAndMargo
Guest
Posts: n/a

 
      01-28-2008
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
 
Reply With Quote
 
 
 
 
Kerry Brown
Guest
Posts: n/a

 
      01-28-2008
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.

--
Kerry Brown
Microsoft MVP - Shell/User
http://www.vistahelp.ca/phpBB2/



"ToddAndMargo" <> wrote in message
news:...
> 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


 
Reply With Quote
 
ToddAndMargo
Guest
Posts: n/a

 
      01-28-2008
Kerry Brown wrote:
> 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
 
Reply With Quote
 
Ralph
Guest
Posts: n/a

 
      01-28-2008

"ToddAndMargo" <> wrote in message
news:...
> Kerry Brown wrote:
> > 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


Right-click


 
Reply With Quote
 
Kerry Brown
Guest
Posts: n/a

 
      01-28-2008
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?

--
Kerry Brown
Microsoft MVP - Shell/User
http://www.vistahelp.ca/phpBB2/



"ToddAndMargo" <> wrote in message
news:...
> Kerry Brown wrote:
>> 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


 
Reply With Quote
 
Cameron Snyder
Guest
Posts: n/a

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

"ToddAndMargo" <> wrote in message
news:...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer logon script doesn't work with Vista D.P. Roberts Windows Vista General Discussion 5 05-30-2008 01:44 PM
Printer logon script doesn't work with Vista D.P. Roberts Windows Vista Networking 5 05-30-2008 01:44 PM
Windows Script Host has no script engine for ".js" files Stephan G. Windows Vista General Discussion 9 04-24-2008 08:04 PM
Why doesn't this mapping script work in Vista? mark1210 Windows Vista Networking 5 04-05-2007 06:21 PM
Vista services WMI script Richard Stallmann Windows Vista General Discussion 0 03-21-2007 10:56 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59