|
Re: DOS program problem >>Anyway, the elevated command prompt just means I ran cmd.exe as an
>>administrator, so that's not something you can do inside of a batch
>>file
>>as far as I know. Until someone has any other ideas,
This is all I was trying to answer for you. Just show you how to run the elevated CMD with a batch file.
On Fri, 20 Apr 2007 07:39:50 -0400, "Dave R." <dwragle at drbsystems dot com> wrote:
>
>"RScotti" <rscotti1@nospam.verizon.net> wrote in message
>news:dgjf23p9vblv1klcnp1t7nsdrqn1qrf0k5@4ax.com...
>> Hi Dave,
>> On Thu, 19 Apr 2007 12:26:18 -0400, "Dave R." <dwragle at drbsystems
>> dot com> wrote:
>>
>>>
>>>"RScotti" <rscotti1@nospam.verizon.net> wrote in message
>>>news:um4d23hjppierp3a5886e2e39l5ke59ask@4ax.com...
>>>> On Wed, 18 Apr 2007 16:47:52 -0400, "Dave R." <dwragle at drbsystems
>>>> dot com> wrote:
>>>>
>>>>>Anyway, the elevated command prompt just means I ran cmd.exe as an
>>>>>administrator, so that's not something you can do inside of a batch
>>>>>file
>>>>>as far as I know. Until someone has any other ideas, the only thing
>>>>>I've seen that might help was from a post over in the
>>>>>networking_sharing
>>>>>group from Davide Guolo:
>>>>
>>>> I hope this helps you Here's what I did.
>>>> Just type CMD in the search box than pin the command prompt to the
>>>> start menu, than right click on it and run as
>>>> administrator.
>>>
>>>That's how I run the elevated command prompt as well.
>>>
>>>> I have a bat file and it works for me!
>>>
>>>So, if you run the bat file from an elevated command prompt, it works?
>> Yes it does work fine.
>>>When I ran the commands individually from an elevated command prompt
>>>it
>>>didn't work, but I didn't try it in a bat. What's your bat file look
>>>like?
>> Here it is:
>>>@echo off
>>>xcopy /s /y /d /h /c "C:\users\rls\Agent" "G:\Agent\"
>>>xcopy /s /y /d /h /c "C:\users\rls\Agent" "D:\Agent\"
>>>xcopy /s /y /d /h /c "C:\users\rls\Agent XP" "F:\Agent XP\"
>>>xcopy /s /y /d /h /c "C:\users\rls\Agent XP" "D:\Agent XP\"
>>>xcopy /s /y /d /h /c "C:\users\rls\Agent" "M:\Agent\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Documents" "G:\Documents\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Documents" "D:\Documents\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "G:\Downloads\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Downloads" "D:\Downloads\"
>>>xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "G:\Pictures\"
>>>xcopy /s /y /d /h /c "C:\USERS\RLS\Pictures" "D:\Pictures\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "G:\Favorites\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Favorites" "D:\Favorites\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Backup" "G:\Backup\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Backup" "D:\Backup\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Backup" "G:\ABackup\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Setup" "G:\Setup\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Setup" "D:\Setup\"
>>>xcopy /s /y /d /h /c "C:\Users\rls\Setup" "G:\ABackup\"
>>
>
>Oh, well, that's completely different. We were talking about
>redirecting the LPT1: port to a printer configured to print to the FILE:
>device and being able to print to it from a DOS program / CMD prompt and
>have it ask for the file name. Thanks anyway, though.
>
>Regards,
>
>Dave
>
Have a good day,
RScotti
remove "nospam" in order to email me. |