AutoHotkey Community

It is currently May 27th, 2012, 1:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: January 14th, 2010, 10:44 pm 
Offline

Joined: July 21st, 2009, 7:13 pm
Posts: 27
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2010, 2:23 pm 
Offline

Joined: July 21st, 2009, 7:13 pm
Posts: 27
Still having trouble formatting the Extrrnal batch file to a comspec command. Any suggestions?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2010, 2:47 pm 
Offline

Joined: November 16th, 2009, 9:24 am
Posts: 114
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}.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2010, 3:00 pm 
Perhaps something like Run, %comspec% /c "%AppFolder%\Components\CreateShare.bat" ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2010, 4:20 pm 
Offline

Joined: July 21st, 2009, 7:13 pm
Posts: 27
Ohhhh that worked just fine. Thanks so much!!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2010, 9:24 pm 
Offline

Joined: November 16th, 2009, 9:24 am
Posts: 114
Ahh... That's good to know. I guess I was half-way there by using cmd.exe (%comspec%).


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, JSLover, Tipsy3000 and 20 guests


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 post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group