![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Path defaults to c:\windows\system32 when using Run as Administrator 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 |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Path defaults to c:\windows\system32 when using Run as Administrator 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. Quote: > and the copies are to external USB drives that don't always have the same > drive letter. 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@xxxxxx Microsoft Windows MVP (Running Windows Live Mail 2008 0908 in Win7 x64 6801) "Nick Payne" <someone@xxxxxx> wrote in message news:e19zfhPSJHA.4680@xxxxxx Quote: > 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 |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Windows Mail Defaults to 40-bit encryption | Vista mail | |||
| Windows Mail Defaults | Vista mail | |||
| Restoring Windows Defaults | Vista installation & setup | |||
| Windows Explorer Defaults | Vista performance & maintenance | |||
| BUG? (Test-Path $path -IsValid) and empty $path | PowerShell | |||