I have Samsung device and want to run service commands like 'Dial ##634#' and others described in this answer. But I also don't want to lose my guarantee.
Will such commands in general (or whole procedure) affect device guarantee?
Do not make any changes in them that you would otherwise be unable to, that way there should be no verifiable way that you have ran these commands. There is no reason to void your guarantee if you are just watching diagnosis information, you most likely don't want to be doing that in the first place though.
On my HTC phone you can't really do much in that menu, so in my case it would be safe. In your case it depends on what you are doing in these menus; so, only use then when you really need them.
Don't attempt to diagnose it if it ain't broken; and even then, be on your guard...