View Full Version : Running a .jar as a different user
Spandzbab
04-08-2012, 07:30 AM
Hello,
Is there a way to run a .jar file that has been limited to only running one on one computer? I know that you can run .exe files twice by running them from a different user and I wanted to do the same for .jar but it doesn't have that option.
Is there some kind of way to go around the one per computer lock or to run it from a different user?
ShawnjohnSJ
04-08-2012, 03:12 PM
You can try typing this into the console after you cd to the directory the jarfile is in. Just replace the uppercase words with their values.
runas /user:USERNAME@COMPUTERNAME java -jar JARFILENAME.jar
Spandzbab
04-08-2012, 05:28 PM
You can try typing this into the console after you cd to the directory the jarfile is in. Just replace the uppercase words with their values.
runas /user:USERNAME@COMPUTERNAME java -jar JARFILENAME.jar
Could you explain it a bit more maybe step by step? I'm no expert, I'd say I'm even below newbie level in this kind of stuff. :duh:
momotron
04-08-2012, 05:31 PM
can i ask why you want to do this?
Spandzbab
04-08-2012, 09:30 PM
can i ask why you want to do this?
Can't tell you, as if it matters anyway...
Spandzbab
04-09-2012, 07:27 PM
You can try typing this into the console after you cd to the directory the jarfile is in. Just replace the uppercase words with their values.
runas /user:USERNAME@COMPUTERNAME java -jar JARFILENAME.jar
Ok so I typed that in and got nothing but I played around there in a while with what the cmd was giving me and I finally got to a stage where I got it right but there is one problem, it asks me for the password for that user but doesn't let me type anything. When I hit enter it says invalid password.
Make a run.bat for the jar. Then Shift+Right click the run.bat. Then select Run as different user.
Spandzbab
04-10-2012, 09:58 AM
Make a run.bat for the jar. Then Shift+Right click the run.bat. Then select Run as different user.
Thank you so much, it works now I can run multiple instances.
Together we have beat the system ! :D (Just kidding I only posted here and you guys beat it.)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.