Computer Science Canada

Getting administrator permission

Author:  packocrayons [ Wed May 22, 2013 10:34 am ]
Post subject:  Getting administrator permission

What is it you are trying to achieve?
Install a font on a windows system


What is the problem you are having?
Can't get admin permission


Describe what you have tried to solve this problem
Can't do anything to fix it


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

Turing:


File.Copy ("Fixedsys.ttf", (C:/Windows/Fonts/Fixedsys.ttf")

 


Please specify what version of Turing you are using
4.05, 4.1 or 4.12

Author:  DemonWasp [ Wed May 22, 2013 11:11 am ]
Post subject:  RE:Getting administrator permission

Unless you own the computer, you shouldn't have administrator rights. Either ask the administrator to install the font or use a font that's already installed. If you own the computer, then you should already have the admin password to do it yourself.

Author:  Raknarg [ Wed May 22, 2013 12:34 pm ]
Post subject:  RE:Getting administrator permission

sounds more like a school computer

Author:  storm2713687 [ Wed May 22, 2013 8:29 pm ]
Post subject:  RE:Getting administrator permission

It looks like you're trying to bypass the admin rights, and you can't do that, as that would be dangerous for your OS. Sorry if I understood incorrectly though. :/

Author:  mirhagk [ Wed May 22, 2013 9:07 pm ]
Post subject:  RE:Getting administrator permission

sudo, oh wait windows computer

Author:  Dreadnought [ Wed May 22, 2013 10:50 pm ]
Post subject:  Re: Getting administrator permission

You could always try the Sys.Exec functions and do something like

Turing:
Sys.Exec("runas /user:Administrator <command>")


Where <command> is some windows command for installing a font (don't know what exactly off the top of my head).

Of course this requires the user to type in the admin password but that's probably inevitable.


: