Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Citydesk and NT4

We are deploying Citydesk Version 1.0.29 Build Date: 20020401A to a number of users from an NT4 server.

The only way we can get it to run is by giving users Admin privileges on the box - understandably our sysadms aren't happy about this!

Has anyone else encountered this problem? What is city desk accessing that requires administrator rights?

Thanks

Iain Forsyth
Monday, September 09, 2002

have you checked the file access priveleges on the shared directory in which the .cty file is stored?

Adriaan van den Brand
Monday, September 09, 2002

Tried various locations for the .cty file - differnt server to which users have write access, local c drive etc. -  doesn't seem to make any differnce. Citydesk seems to need access to something on the box it is running on which requires admin rights.

Iain Forsyth
Monday, September 09, 2002

On NT, I'm pretty sure its going to be the registry...

Michael H. Pryor
Monday, September 09, 2002

CityDesk runs fine even as a regular user on NT4. (I just tried it). It probably requires an Admin to install it.

Joel Spolsky
Monday, September 09, 2002

Well it isn't running fine for us!

Symptom is that the intial 'do you want to create a new site or open an existing one' dialog appears.

Choose create a new site, you get to specify a location and give it a name but then dialog box then just sits there rather than going to the main Citydesk screen.

Choose open an existing one and you get to choose the file but then Citydesk says it is corrupt (same file opens fine in a copy of Citydesk running in a standalone machine).

What would cause that corrupt file message to appear? I'm guessing that it may be failing to write something to the registry?

Thanks

Iain Forsyth
Tuesday, September 10, 2002

regmonnt (www.sysinternals.com) will show you exactly what citydesk is writing to the registry, and if it is successfull doing so.

But this dialog... I only see it if CD is not able to open the last site. That looks to me as a file access rights issue.

Adriaan van den Brand
Tuesday, September 10, 2002

The only place we read and write the registry is at HKEY_CURRENT_USER\Software\Fog Creek. Even in tightly locked down situations, HKEY_CURRENT_USER should be world-editable. You can test it yourself by logging in as the user in question, running regedit, and trying to edit a key in that section.

Also, when you try to open a CityDesk file, CityDesk creates a .LDB file right next to the .CTY file (in the same folder). Both the CTY and LDB file need to be globally readable and writable.

[I assume that there's nothing else wrong with these systems, and that CityDesk works fine for administrators].

One more test I would do is try to use Microsoft Access, if you have it, to create and edit an Access file in the same directory as the one where you are trying to create the CityDesk file. If that fails at least we know it's not anything specific to CityDesk, since we use the same file code as Access does.

Finally - try giving the user full permissions on the \Program Files\CityDesk directory, just in case that helps (it's less drastic than making them an administrator!)

Hope some of this helps.

Joel Spolsky
Wednesday, September 11, 2002

Thanks for the tip.

We got to the bottom of it. Citydesk tries to create a registry key "Citydesk.Site" to hold the name of the current .cty file. This works when the user has admin rights  but fails with an ACCDENIED with our standard user profile. We can now try and tune that profile so this works.

Thanks again

Iain Forsyth
Wednesday, September 11, 2002

Interesting... let me look into that one, just a sec...

Joel Spolsky
Wednesday, September 11, 2002

Oh, I figured it out!

Our bug, I apologize.

CityDesk tries to re-register itself as the owner of .CTY files in the system every times it runs. This is not in HKEY_CURRENT_USER, it's in HKEY_CLASSES_ROOT.

It is supposed to "fail silently" but it looks like it's not doing that.

Joel Spolsky
Wednesday, September 11, 2002

I take it back -- this is probably not the problem.

CityDesk does indeed fail silently when it can't write those registry entries. So even though you're seeing an "access denied," this is not what's preventing CityDesk from running.

Joel Spolsky
Wednesday, September 11, 2002

Just from my experience with Access, I would second the suggestion of double-checking the folder permissions, especially the "create" right. I can't tell you how often I've had users complain that "your database isn't letting me in", only to find that it's a simple network folder rights issue. (I don't know why, but our IT guy seems to interpret my request of "full permissions to everyone" as "read and write permissions to existing files, but no permission to create or modify files".)

Martha
Friday, September 13, 2002

good point, thank you, CityDesk will need to create a small .LDB file next to the .CTY file while it is open.

One final suggestion, upgrade to the final version of Jet, which is Jet 4.0 SP 3, on the NT machines. There were old versions of Jet which on NT 4.0 would attempt to write to the Windows directory.

Joel Spolsky
Tuesday, September 17, 2002

*  Recent Topics

*  Fog Creek Home