Why can't run batch file

Post here issues and solutions that relate to MainLobby Server 3
Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Why can't run batch file

Postby Art Dustman » Fri Jul 29, 2011 12:05 pm

Ok.. so I have a batch file called geomdb.bat with the following text:
reg add HKLM\SOFTWARE\ODBC\ODBC.INI\Geovision /v DBQ /t REG_SZ /d C:\GV-1480\Database\sys20110729.mdb /f

This changes a registry entry for a dsn... and IT WORKS from the command line, and double clicking. Since I am using the "reg" not regedit, elevation is not required.

When I run this thru mlfileopen, it runs, but no value changes... although the window shows it was successful. I am lost on why MLserver macro using the mlfileopen is not working. :?:

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Why can't run batch file

Postby CinemarDave » Sat Jul 30, 2011 9:57 am

it works from the batch file because there is a command parser running. try something like

MLFileOpen|cmd.exe~/C reg add HKLM\SOFTWARE\ODBC\ODBC.INI\Geovision /v DBQ /t REG_SZ /d C:\GV-1480\Database\sys20110729.mdb /f

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Why can't run batch file

Postby Art Dustman » Mon Aug 01, 2011 10:25 am

Still no luck. I also tried the /K switch to keep the dialog open, which shows a "successful" but no go (the value has not changed). Any suggestions on another way?

Tried:
as written above
batch calling another batch
batch passing the parameter
putting CMD in front of the Reg add
putting quotes " " around every combination of the key, name, and value
making the .bat a .cmd

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Why can't run batch file

Postby Art Dustman » Mon Aug 01, 2011 11:35 am

Maybe there's a whole other approach...

I'm trying to access the MDB file created by the Geovision cameras. There is a great deal of data available using the advanced analytics part of the system. You can count how many times people or objects move past a certain point, keep track of people or things coming in, going out, etc. All of this is kept in a MDB file names sysYYYMMDD.mdb that changes each day. I first tried to runa command to initialize a new DSN every day, and that failed. Easier was to setup a DSN and simply change the registry to see the new file. That's where I am stuck. Perhaps you have a more elegant thought of how to bring that data into ML?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Why can't run batch file

Postby CinemarDave » Mon Aug 01, 2011 11:38 am

I'll work on this later today. In the meantime how large is the mdb file? Can you zip it and email it to me to look at?

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Why can't run batch file

Postby Art Dustman » Mon Aug 01, 2011 12:32 pm

no big at all, check your e-mail.


Return to “MLServer 3”

Who is online

Users browsing this forum: No registered users and 1 guest