Archive: CreateDirectory not working


CreateDirectory not working
This code dose not make the directory?


CreateDirectory $ProductDirState/EDMproducts/EDMserver/EDMdbServer/database/$mySlotName


Can someone tell me why?

It probably needs the other slash ( \ ) in the path.


this is the second attempt the first one was like this

CreateDirectory $ProductDirState\EDMproducts\EDMserver\EDMdbServer\database\$mySlotName


I think it has to do with the parameters, maybe it can not understand them at runtime?

It can understand variables like those. What values have you put in them? The $ProductDirState should begin with a local drive (like C:\). Does your installer run with enough rights (Admin) for the location you want to create the directory in?


Use MessageBox to verify that the path looks correct, if it still fails; try running Process Monitor


I'm testing it on my developer PC which I run as admin. The $ProductDirState is basically something like C:\some_folder or some other directory.


You better check it with messageBox because it can be ${ProductDirState} for example, or it may be in a section/function that never runs because of some failed condition


Fixed, thanks a lot. It was a combination of bad checking and the slash!, this one I don't understand, shouldn't CreateDirectory() work with both '/' and '\' ?


Why? We're on Windows not Unix. Using / instead of \ is really a code error and ought not to work.

Stu