Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Getting administrator permission
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
packocrayons




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
DemonWasp




PostPosted: 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.
Raknarg




PostPosted: Wed May 22, 2013 12:34 pm   Post subject: RE:Getting administrator permission

sounds more like a school computer
storm2713687




PostPosted: 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. :/
mirhagk




PostPosted: Wed May 22, 2013 9:07 pm   Post subject: RE:Getting administrator permission

sudo, oh wait windows computer
Dreadnought




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: