(Msg. 1) Posted: Tue Nov 18, 2008 8:06 am
Post subject: Path defaults to c:windowssystem32 when using Run as Administrator Archived from groups: microsoft>public>windows>vista>file_management (more info?)
A have a couple of backup cmd files using relative paths. If I double-click
on them in Windows Explorer then they run using as the default path the
location of the cmd file, which is what I want. This worked fine on XP, but
on Vista I have to run the cmd files as administrator for some of the copies
to succeed. However, if I right-click on the cmd file and select "run as
administrator", it seems to use the default path of c:\windows\system32
rather than the cmd file location, because I find that files are getting
copied to paths under c:\windows\system32 rather than under the location of
the cmd file.
I don't want to put in absolute paths because the cmd files are located on
and the copies are to external USB drives that don't always have the same
drive letter. Is there a solution to the problem other than running a cmd
window as administrator, changing path in the cmd window to the external
drive, and running the cmd file that way - this is hardly a user interface
improvement over XP.
(Msg. 2) Posted: Sun Dec 14, 2008 8:57 pm
Post subject: Re: Path defaults to c:windowssystem32 when using Run as Administrator [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi, Nick.
Your post is nearly a month old and you may have already solved your
problem. If not, maybe I can help with a couple of comments.
This is a job for Disk Management, it seems to me.
> and the copies are to external USB drives that don't always have the same
> drive letter.
I've never used USB hard drives, but I have several USB flash drives (and a
USB SD card reader). If I don't assign my choice of letters, then Vista
assigns "the next available letter" each time I plug them in. So I've
assigned letters for them in Disk Management and they get the same letters
when I unplug them and plug them in again. In other words, my ReadyBoost
drive is always R:; my SD card reader is always S:.
I've assigned the often-overlooked letter B: to a USB flash drive that I use
to back up some small-but-critical files. I don't use a backup program, but
a batch file, which I think is what you are using. I've created and edited
the WeekBat.bat file with Notepad and stored it on Drive B:. It has
instructions to Xcopy specific files and folders from my hard drives to
specific places on Drive B:. Each week, I plug in the USB drive, navigate
to B:\WeekBak.bat and click on it. When it is done, I unplug Drive B: and
put it back in the safe. My 8 GB flash drive has about 6 GB free now.
You didn't say how big your files are, or how many different locations are
involved, but this might give you some ideas that you can adapt to your own
situation.
RC
--
R. C. White, CPA
San Marcos, TX
rc.TakeThisOut@grandecom.net
Microsoft Windows MVP
(Running Windows Live Mail 2008 0908 in Win7 x64 6801)
"Nick Payne" <someone.TakeThisOut@nowhere.au> wrote in message
news:e19zfhPSJHA.4680@TK2MSFTNGP06.phx.gbl...
> A have a couple of backup cmd files using relative paths. If I
> double-click on them in Windows Explorer then they run using as the
> default path the location of the cmd file, which is what I want. This
> worked fine on XP, but on Vista I have to run the cmd files as
> administrator for some of the copies to succeed. However, if I right-click
> on the cmd file and select "run as administrator", it seems to use the
> default path of c:\windows\system32 rather than the cmd file location,
> because I find that files are getting copied to paths under
> c:\windows\system32 rather than under the location of the cmd file.
>
> I don't want to put in absolute paths because the cmd files are located on
> and the copies are to external USB drives that don't always have the same
> drive letter. Is there a solution to the problem other than running a cmd
> window as administrator, changing path in the cmd window to the external
> drive, and running the cmd file that way - this is hardly a user interface
> improvement over XP.
>
> Nick
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum