0
votes

When i try to install mongodb as a windows service using the following command:

c:\wamp\bin\mongodb\bin>mongod --bind_ip 127.0.0.1 --logpath c:\wamp\bin\mongodb \logs --logappend --dbpath c:\wamp\bin\mongodb\data --directoryperdb --install

it says that my service has been installed successfully and to use the command "net start 'MongoDB'" to start the service

so when i type the command:

"net start MongoDB"

I receive this error:

"System error 193 has occurred.

* is not a valid Win32 application."

I have a 32bit laptop running windows 7 32bit OS and i made sure i installed the mongodb 1.6.5 32bit version

The interesting part is that i can start mongo server through command line running the command "mongod.exe" and use "mongo.exe" to perform queries.

However, trying to run it as a service i get a windows error.

Any help?

1

1 Answers

1
votes

I believe the problem is the space you have below (see here) ...

c:\wamp\bin\mongodb\bin>mongod --bind_ip 127.0.0.1 --logpath c:\wamp\bin\mongodb \logs --logappend --dbpath c:\wamp\bin\mongodb\data --directoryperdb --install

Right here ...

--logpath c:\wamp\bin\mongodb \logs --logappend 

Take the space out between \mongodb and \logs ... also make sure you are running your command prompt as "administrator" if you using Windows 7 ...

Note if you NEED a space, use quotes around the dir path and that should fix it as well.