Run as administrator not working for bat files inside folder having (

sraghunandan

New Member
Dear All,
I'm unable to run any bat file with "Run As Administrator" when the bat file is present in a folder which has ( in its name.
For example: I have main.bat which is in d:\test(_8july)\main.bat.
The contents of main.bat is like this.

c:\windows\system32\cmd.exe /C "e:\test.bat"

The contents of test.bat is like this:

echo "testing" >> %temp%/test.txt
pause

If I just double click on main.bat, i can see the file text.txt being created and "testing" written into it.
If i right click on main.bat and select "Run as Administrator", the bat file cannot be run and I get the error "d:\test" is not a recognized command.
How to handle these situations?

Thanks in advance
Raghu
 

My Computer

I recommend you remove the ( and ) characters from the folder names and see if the .bat files then work. If so, then maybe the simple answer is to avoid using those characters in folder names and then you won't have the problem. From the message, it looks like the first ( cuts off the command at that point which is why it fails.

I hope this helps.

Good luck!
 

My Computer

System One

  • Manufacturer/Model
    Dell Inc. MP061 Inspiron E1705
    CPU
    2.00 gigahertz Intel Core 2 Duo 64 kilobyte primary memory
    Motherboard
    Board: Dell Inc. 0YD479 Bus Clock: 166 megahertz
    Memory
    2046 Megabytes Usable Installed Memory
    Graphics Card(s)
    ATI Mobility Radeon X1400 (Microsoft Corporation - WDDM) [Di
    Sound Card
    SigmaTel High Definition Audio CODEC
    Monitor(s) Displays
    Generic PnP Monitor (17.2"vis)
    Screen Resolution
    1920 x 1200 pixels
    Hard Drives
    Hitachi HTS541616J9SA00 [Hard drive] (160.04 GB) -- drive 0, s/n SB2411SJGLLRMB, rev SB4OC74P, SMART Status: Healthy
    Case
    Chassis Serial Number: 5YK95C1
    Keyboard
    Standard PS/2 Keyboard
    Mouse
    Logitech HID-compliant Cordless Mouse
    Internet Speed
    1958 Kbps download ; 754.8 Kbps upload
    Other Info
    Optiarc DVD+-RW AD-5540A ATA Device [CD-ROM drive]

    Dell AIO Printer A940

    Conexant HDA D110 MDC V.92 Modem

    6TO4 Adapter
    Broadcom 440x 10/100 Integrated Controller
    Broadcom 802.11n Network Adapter
    Microsoft ISATAP Adapter
    Teredo Tunneling Pseudo-Interface

    Router Linksys / WRT54G -01
Back
Top