2

So I'm trying to emulate a security related github repository using VMs and for that I had to run a VBScript.

The VBScript is as follows:

Set oShell = CreateObject ("Wscript.Shell")
Dim strArgs
strArgs = "C:\Users\Public\Java-Update.exe"
oShell.Run strArgs, 0, false

where Java-Update.exe is a file that I have present within my computer.

Now I'm performing a Remote Desktop Connection from another VM, and I'm decently sure that I have logged in as an administrator, however, when I try to run the VBScript, I get the Permission Denied with error code 800A0046 error. I got this exact error even when I tried to run the script on the VM itself.

Help would be really appreciated, I'll gladly provide any information needed

8
  • 1
    Try opening a Cmd prompt with Run as administrator. Then run your VBS file from that command line. For example: wscript Java-Update.vbs. Does it still error?
    – LesFerch
    Commented Oct 11, 2023 at 3:56
  • Since all the script does is run Java-Update.exe why not just run that exe directly (as administrator if required)?
    – LesFerch
    Commented Oct 11, 2023 at 4:02
  • So, I tried it by running in cmd prompt under administrator control, but that still gave me the exact same issue. As for your second advice, how would I run the exe file within my cmd/powershell/whatever? Since this won't fit directly into my cmd. Thank you!
    – Linkus
    Commented Oct 11, 2023 at 22:48
  • Take a look at this
    – LesFerch
    Commented Oct 12, 2023 at 1:02
  • So I looked at both the post and the repairwin website, and I tried out the stuff recommended at repairwin website. When I tried to set the UAC to basically 0, nothing changed as far as I could tell. I didn't receive any warnings when I tried to run the script by doubleclicking it, but when I try to run it using cmd (in admin mode) it still gives me permission denied message. As for running the exe as admin, when I do that I get the following error: "Windows cannot find the specified file. You may not have the appropriate permissions" (this is when I've full control for the file)
    – Linkus
    Commented Oct 12, 2023 at 2:13

0

You must log in to answer this question.

Browse other questions tagged .