Link to home
Create AccountLog in
Avatar of Scott Abraham
Scott AbrahamFlag for United States of America

asked on

PSEXEC SERVER 2008 PROGRAM FILES (X86) ACCESS 2007 ISSUE

I have been having a problem executing a batch file remotely through psexec and through cold fusion cfexecute.  I think the root of the problem is the fact that I am trying to start Access 2007 on the server and run a make table macro, and Access 2007 resides in the c:\Program Files (x86) directory.  I do not think Server 2008 wants to let me do that.  The other parts of the batch file run great.

I am using Server 2008 x64, and Access 2007.

To troubleshoot this, I have diabled UAC, and changed some other permissions to no avail.  Any suggestions would be appreciated.  I can go back later and make it secure, I just want to get it to work and understand why it wasn't
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

What's the syntax of the Batch statement - at least the part that fires off the Access database.

Are you getting an error? If so, error number and error text would help.
FWIW, I notice that  a fair amount of your Question Titles are in ALL CAPS.

All caps is interpreted as YELLING!

Just FYI

JeffCoachman
Avatar of Scott Abraham

ASKER

"C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.exe" "D:\Data\SEDCAccess\NNPPDintegrator.mdb" /x Missed_Meters_Daily

REM Mapguide Missed Meters Daily to spatial SQLite

del /f /q "D:\Data\SEDCAccess\mmd.db"

"C:\Program Files (x86)\FWTools2.4.7\bin\ogr2ogr" -f "SQLITE" -dsco  FORMAT=WKB "D:\Data\SEDCAccess\mmd.db" "D:\Data\SEDCAccess\mmd.vrt"

REM SQLITE VIEW TO SHP
del /f /q "D:\Data\ShapeFiles\missedmd.dbf"
del /f /q "D:\Data\ShapeFiles\missedmd.idx"
del /f /q "D:\Data\ShapeFiles\missedmd.shp"
del /f /q "D:\Data\ShapeFiles\missedmd.shx"

"C:\Program Files (x86)\FWTools2.4.7\bin\ogr2ogr" -f "ESRI Shapefile" "D:\Data\ShapeFiles" "D:\Data\SEDCAccess\mmd.db"

This batch file runs fine when logged in through remote desktop, it does what it is supposed to.  If I try it remotely from the other programs, it only runs if I REM out the first line having to do with access.  All the rest run fine.  If the first line is not REM'ed, it spawns a cmd process and an access process but get no further and hangs.

I will have to remember that about question titles.  Too long posting titles on ebay :)
Try changing the following....

"C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.exe" "D:\Data\SEDCAccess\NNPPDintegrator.mdb" /x Missed_Meters_Daily

to

start "C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.exe" "D:\Data\SEDCAccess\NNPPDintegrator.mdb" /x Missed_Meters_Daily
ping -n 30 localhost>nul

The ping is onbly there for a 30 second pause to allow access to do what it needs to do.... If you dont need it, or need to make it longer, go for it....

Using the Start command though, without the /WAIT switch, means it moves on to the next line....
ASKER CERTIFIED SOLUTION
Avatar of Scott Abraham
Scott Abraham
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer

Good fix......
Got it working mostly.