4

I would like to install Weblogic 12c in my system. But I do have implications. I do carry admin privilege in my local system but do not carry Administrator login password. I tried in Windows 10. And in prior Windows 7 also, but I had the implication of Logged-in User, that he belongs to Administrators Group, but it was not Windows Administrator login.

C:\Users\Sathasivam_Anand\Downloads\fmw_12.2.1.2.0_wls_Disk1_1of1>runas /user:Ad
ministrator "java -jar fmw_12.2.1.2.0_wls.jar"
Enter the password for Administrator:

As per the first answer to this question, I am able to run java which doesn't need any admin privilege, obviously. cmdlets are correct but unclear what I have deal with Runas argument. I am getting following error in PowerShell

PS C:\Users\Sathasivam_Anand\Downloads\fmw_12.2.1.2.0_wls_Disk1_1of1> Start-Proc
ess -Verb Runas "C:\Progra~1\Java\jdk1.8.0_112\bin\java -jar .\fmw_12.2.1.2.0_wl
s.jar"
Start-Process : This command cannot be run due to the error: The system cannot
find the file specified.
At line:1 char:1
+ Start-Process -Verb Runas "C:\Progra~1\Java\jdk1.8.0_112\bin\java -ja ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOp
   erationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.C
   ommands.StartProcessCommand

PS C:\Users\Sathasivam_Anand\Downloads\fmw_12.2.1.2.0_wls_Disk1_1of1>

How do I overcome this situation.

Is there a way by using cmdLets in powershell this situation can managed by using pipes or so if required.

You should be clear that belonging to Administrators Group doesn't mean that I can do programs which requires to be as Administrator that I can run with runas /user:Administrator "command", obviously wrong answer. Removing right tick hence.

If you can, please clarify as a another Answer.

Dev Anand Sadasivam
  • 699
  • 7
  • 21
  • 49
  • I mainly would like to know how it can be done in Windows 10. I hope in that context its a valid question and I can't rely on negative vote. Someone please give attention and give a solution for this problem. – Dev Anand Sadasivam Jan 10 '17 at 07:29
  • If you are asking if you can somehow bypass the UAC prompt, the answer is no. – Bill_Stewart Jan 17 '17 at 22:31
  • Thanks Stewart. I didn't see your comment. So only by using Administrator password and runas option we could install Weblogic 12c, else it is not possible. Then my question whoever uses Windows 10 then there must be a option, what is that. – Dev Anand Sadasivam Jan 18 '17 at 13:25
  • What is UAC prompt. – Dev Anand Sadasivam Jan 18 '17 at 13:27
  • When you right-click an executable file in Windows Explorer and choose `Run as administrator`, you see the UAC prompt.You must manually confirm or enter administrative credentials. You cannot bypass or programmatically accept this prompt. – Bill_Stewart Jan 18 '17 at 15:10

1 Answers1

4

By using runas /user:Administrator you are telling the computer to run this as the user Administrator, which is very different that running an application with Administrative privileges.

You mentioned that your account has those privileges so either you can run cmd or PowerShell by Right click and selecting "Run as Administrator" which will then likely give the UAC prompt and then everything done in that session will be with Administrative privileges. Otherwise from an unelevated PowerShell window you can run the command Start-Process with the -Verb Runas parameter which will attempt to start that process with administrative rights (likely UAC prompt).

BenH
  • 9,766
  • 1
  • 22
  • 35
  • I am getting salvation with your answer. I need atleast in Windows 10 Weblogic 12c Installation done. Please get rid out of this issue. – Dev Anand Sadasivam Jan 16 '17 at 07:49
  • If the answer worked for you, then you should accept the answer. – BenH Jan 16 '17 at 14:07
  • Your Answer didn't work for me, your advice is not giving anticipated solution. I need this to be done I mean the installation of Weblogic12c in Windows 10 at any cause. If you would done this earlier, please post your answer as another one over here. Or pass it some one who has a better idea. Yours is just a idea its looks like and not even a salvation, but towards of it. Thanks. – Dev Anand Sadasivam Jan 16 '17 at 20:10
  • If it is step by step, its well & good. I definitely delicate this Bounty to the Exact. – Dev Anand Sadasivam Jan 16 '17 at 20:13
  • This works I mean java, `Start-Process -Verb Runas "C:\Progra~1\Java\jdk1.8.0_112\bin\java"` – Dev Anand Sadasivam Jan 18 '17 at 12:39
  • But this didn't worked `Start-Process -Verb Runas "C:\Progra~1\Java\jdk1.8.0_112\bin\java -jar fmw_12.2.1.2.0_wls.jar"` – Dev Anand Sadasivam Jan 18 '17 at 12:40
  • I will hold if you can answer, else will be removing your answer as the right one. Thanks. – Dev Anand Sadasivam Jan 18 '17 at 12:41
  • 2
    Your second attempt did not work because you used arguments, but did not provide them using `-argumentlist`. So `Start-Process` is trying to run the entire string as one command. See this [StackOverflow post](http://stackoverflow.com/questions/651223/powershell-start-process-and-cmdline-switches) which details some ways to use `-argumentlist` – BenH Jan 18 '17 at 14:24
  • In `powershell` Command `Start-Process -Verb Runas C:\Progra~1\Java\jdk1.8.0_112\bin\java -argumentlist "-jar .\fmw_12.2.1.2.0_wls.jar"` succeeds. Thanks. – Dev Anand Sadasivam Jan 23 '17 at 07:59