8

Some time we are providing same laptop for 4-5 employees in our office for some testing purpose (since a costly licensed tool is exist in that laptop only), also asked them to do not click the Remember password checkbox in SSMS to store the credentials.

But few of them accidentally click that checkbox, so each time we need to clear the SqlStudio.bin to solve the problem. Instead of that it is nice to disable the Remember password option in the SSMS in that particular laptop.

Is it possible to disable the remember password checkbox in SSMS?

The expecting behavior is as below:

Always disable the Remember password check box

1
  • One account for the expensive tool, and separate accounts for each user to run SSMS.
    – CoveGeek
    Commented Feb 18, 2016 at 5:19

4 Answers 4

11

No, this is not possible, unless you reverse engineer SSMS and either hide the checkbox or make it a no-op, then recompile and deploy. And repeat every time you upgrade, apply a service pack, etc. (To be clear: this is not what I recommend.)

I have a better solution, though:

Why don't your 4-5 employees use different profiles? This takes a tiny bit more disk space, sure, but each profile gets its own SqlStudio.bin - then you could use Windows Authentication, too, which means they don't have to type their password or check a box, and it simplifies auditing, too, in case this isn't the most egregious thing they do.

7
  • I'm not sure whether profiles would work well together with their very expensive licensed tool. It is entirely possible that the ArcGis tool requires licenses per user.
    – Nzall
    Commented Feb 17, 2016 at 22:56
  • @Nate ok, so we should encourage them to violate licensing agreements instead? That's a choice they're going to have to make. I was merely suggesting one way they could avoid the "one user gets another user's password" problem. It may be that compared to the licensing costs that's a negligible problem, but I still think it's totally wrong to be abusing the software agreement this way. (I also couldn't find any info on the product's site about whether it is a seat license or if it's tied to a Windows account, or how hard it is to "transfer" a license in the latter case.) Commented Feb 18, 2016 at 0:27
  • I was not saying they should break licensing agreements. I was just pointing out that separate user profiles, while the right answer usually, might not be feasible due to licensing.
    – Nzall
    Commented Feb 18, 2016 at 13:42
  • @Nate Well, to be pedantic, if the tool really is meant to be licensed per user, they're already breaking the agreement. Not suggesting they fix that is implicitly stating it's ok. Commented Feb 18, 2016 at 13:57
  • I have no idea how the licensing works for ArcGis, and honestly, I don't really care to find out either. I have no interest in going on a pedantic crusade to figure out whether ArcGis is allowed to be licensed in this way or not. Such licenses can be really expensive, especially for smaller businesses. Hell, I've had the same situation myself, where a company I worked for had their developers use Telerik trial licenses while the paid license was on the build server, for saving money. Sometimes, you have to use loopholes.
    – Nzall
    Commented Feb 18, 2016 at 14:07
3

While this may be excessive for your situation, you could try automation software to make your own login window, get the unique user credentials, then launch SSMS with the correct command line options. Obviously, you'll want to prevent users from running SSMS directly and you can do that through Windows group policy or through registry modifications. Or if you get a bit creative with your scripting, AutoHotKey could do that too.

  1. Software to automate almost any Windows action - AutoHotKey
  2. To see the command line options for SSMS, type 'ssms.exe /?'
  3. To learn how to prevent users from running a program, google 'Windows prevent users from running a program'.

It will take a while to get through all that, but then you'll have more options for how to get unique things done quickly.

Ps. I don't condone software piracy or license violations at all. Use the above advice at your own peril. These are standard tools that any good Windows administrator should already know how to do or should have in their bag of tricks.

3

You can write a small tool that would search for the necessary window and send a message to it to disable the control. Or choose one of the existing tools.

Quick search found this question: https://stackoverflow.com/questions/11833500/preventing-cross-process-sendmessage-calls

with this link in it: https://www.raymond.cc/blog/how-to-enable-and-access-disabled-grayed-out-buttons-windows-and-checkboxes/

Of course, any such tool will be brittle. Maybe, instead, make a backup of file where this password is stored (SqlStudio.bin) and overwrite it with a fresh copy each time a user logs into Windows. You said:

But few of them accidentally click that checkbox, so each time we need to clear the SqlStudio.bin to solve the problem.

Rather than handling it as an exceptional situation, handle it as a normal situation and clear the SqlStudio.bin with every log on.

Alternatively, you can try to make that file read-only / deny write permissions to it.

3
  • Preventing writes to SqlStudio.bin looks like a good idea on the face of it but do I understand correctly from your wording that you haven't actually tried that yourself? Are you aware in advance whether there are any side effects? whether other settings are also written to it?
    – Andriy M
    Commented Feb 19, 2016 at 9:57
  • @AndriyM, you are right, I haven't tried it myself. I just thought that it can't be worse than deleting it altogether as OP does. It may be better to make a backup of that file and restore it as needed, or simply always on logon to Windows. Commented Feb 19, 2016 at 10:03
  • 1
    Ah, that makes. Another variation on your suggestion could be to create a simple batch file that restores SqlStudio.bin, then runs SSMS, and edit the shortcut launching SSMS to run that batch instead of SSMS itself.
    – Andriy M
    Commented Feb 19, 2016 at 10:26
0

I know this is an old post, but in order to help other people, i think maybe it's easier to just get a "standard" sqlstudio settings backup and just restore it before providing the laptop to any user. Worst case scenario could include some registry hacking too.

1
  • 2
    can you provide more details on how to get a "standard" sql studio settings backup?
    – Greg
    Commented Aug 25, 2016 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.