hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Batch file runs by clicking on it but fails from Automize

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Windows Service
View previous topic :: View next topic  
Author Message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:16 pm    Post subject: Batch file runs by clicking on it but fails from Automize Reply with quote

User support request:

We are trying to use the Windows Command in Automize to run a bat file called ftp.bat . The ftp.bat file runs fine if I run it manually but when we use Automize it seems like it tries to run it based on the log below but the file never gets ftp'd.

Here's the code in the bat file and like I said before it works file when I run it manually:
x.exe ftpu://..../...../....cmp D:\Automize\...
I've also tried the Command with the above info but it didn't work.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:17 pm    Post subject: Reply with quote

Are you using the Automize NT service?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:18 pm    Post subject: Reply with quote

user reply:

Yes...

We also have other Command line processes like:
"D:\Program Files\remove.exe" D:\Automize... D:\Automize\... And this works fine...

I guess that's why we are surprised that we can't get x.exe process to work...


Last edited by Robert on Fri Mar 30, 2007 12:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:19 pm    Post subject: Reply with quote

Check if this issue is service related:
1) Stop Automize7 service from SCM
2) Start Engine from user interface.
3) test your task again.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:19 pm    Post subject: Reply with quote

user reply:

Awesome.... It worked... So now what happens?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:20 pm    Post subject: Reply with quote

1) There is something in the ftp.bat code that prevents it from running when Automize engine is started in service mode.

2) The most likely cause is not using UNC conventions for the 'D:\Automize\...' folder in 2 locations in your code.

3) Share this D:\Automize folder , then use the UNC convention for it:
\\server_name\Automize.... Once you share the folder, browse to it via 'My Network Places' to get the correct UNC path. The UNC path will be listed in the comments column of windows explorer.

4) Test your task again and ensure that this new UNC convention works in Desktop context.

5) if 4) above works, then shut down engine from user interface and start Automize7 service from SCM.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 12:25 pm    Post subject: Reply with quote

One thing we forgot to ask:
Did you startup the service using the same username as your normal logon account?
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 2:38 pm    Post subject: Reply with quote

user reply:

1. Started the Scheduler engine with my id. The Automize service didn't start and the ftp.bat worked.
2. I restarted the Automize service with my id and the ftp.bat worked.

I started everything with my user id. I'll have to ask around to see what the other account that was being used.
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 2:38 pm    Post subject: Reply with quote

regarding: >> 2. I restarted the Automize service with my id and the ftp.bat worked.
IMPORTANT: Did you stop the engine from user interface before restarting the Automize service?

If you stopped the engine from user interface and restarted Automize service and ftp.bat worked, then it is working correctly in service context and desktop context. (I guess you either started NT service using the correct user account to start service and/or used correct UNC paths in the commandline code.)
Back to top
View user's profile Send private message
Robert
Site Admin


Joined: 25 May 2006
Posts: 1140

PostPosted: Fri Mar 30, 2007 2:39 pm    Post subject: Reply with quote

user feedback:

Thanks a lot with your help. I wouldn't have been able to fix the problem without it.

What looks like that really happened is that Automize was running the bat file correctly while under the user ID of sgk_att.

When I ran it under my id (tsteel) Automize would run the bat file correctly but the stclient.exe that is in the bat file it only knew my settings (tsteel) and not sgk_att.

So when I logged into the system as sgk_att and setup the preference settings in the stclient.exe software and then started up the services as sgk_att and Started the Automize engine as sgk_att the ftp.bat file worked.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Windows Service All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group