| View previous topic :: View next topic |
| Author |
Message |
captainspacedog
Joined: 21 Jul 2009 Posts: 27
|
Posted: Thu Jan 14, 2010 9:44 pm Post subject: Bat file will not run using RUN Command |
|
|
I am trying to run a batch file that creates a shared folder using the "Run" command. It does not execute.
Do I have to convert this to a Comspec command and any ideas what the syntax would be?
Thank you for any assitance you can provide.
IfExist, %AppFolder%\Components\CreateShare.bat
Run, %AppFolder%\Components\CreateShare.bat
;Creates a share
Contents of CreateShare.bat file:
rem Creating Admin directory.
mkdir "C:\IO Agent"
net share IOAgent="C:\IO Agent" /UNLIMITED
echo y | CACLS "C:\IO Agent" /T /E /G Everyone:F |
|
| Back to top |
|
 |
captainspacedog
Joined: 21 Jul 2009 Posts: 27
|
Posted: Fri Jan 15, 2010 1:23 pm Post subject: |
|
|
| Still having trouble formatting the Extrrnal batch file to a comspec command. Any suggestions? |
|
| Back to top |
|
 |
BoffinbraiN
Joined: 16 Nov 2009 Posts: 114
|
Posted: Fri Jan 15, 2010 1:47 pm Post subject: |
|
|
| I have no experience on this, but one workaround that comes to mind is to "run cmd.exe" and then type your batch file path into there via Send, and press {enter}. |
|
| Back to top |
|
 |
fred Guest
|
Posted: Fri Jan 15, 2010 2:00 pm Post subject: |
|
|
| Perhaps something like Run, %comspec% /c "%AppFolder%\Components\CreateShare.bat" ? |
|
| Back to top |
|
 |
captainspacedog
Joined: 21 Jul 2009 Posts: 27
|
Posted: Fri Jan 15, 2010 3:20 pm Post subject: |
|
|
| Ohhhh that worked just fine. Thanks so much!!! |
|
| Back to top |
|
 |
BoffinbraiN
Joined: 16 Nov 2009 Posts: 114
|
Posted: Fri Jan 15, 2010 8:24 pm Post subject: |
|
|
| Ahh... That's good to know. I guess I was half-way there by using cmd.exe (%comspec%). |
|
| Back to top |
|
 |
|