How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask MrComputer2010 Your Own Question
MrComputer2010
MrComputer2010, Computer Support Specialist
Category: Computer
Satisfied Customers: 425
Experience:  15+ Years working with computers. Microsoft Partner, AMD Partner, Eset Partner, A+ Certified
46048466
Type Your Computer Question Here...
MrComputer2010 is online now
A new question is answered every 9 seconds

My Windows 10 computer has 2 accounts on it. One is an admin

This answer was rated:

My Windows 10 computer has 2 accounts on it. One is an admin account. The other is a guest account. Upon login to the guest account, a batch script needs to be executed that resides in the admin account (assume this path for this question - in C:\Users\adminaccount\script.cmd). In order to be able to run the batch script, it is expected that a password ***** entered via stdin. That is fine and expected. Without installing any additional software, what is the command and where should it be placed?

Welcome to Justanswer.com, my name is Dustin.
I'm sorry to hear about the issue you are having, I will do my best to help you resolve it.

Question, does the script need to be ran without interaction from the guest user ?

Or, will the guest user be there to approve the admin elevation request inside the script?

And how are your building / executing / compiling the script itself?

Customer: replied 10 months ago.
The script needs to be run without interaction from the guest user. The guest user cannot have the ability to look at its contents nor execute it. It is something that should just run when the guest user logs in.The script, is just a windows batch file. Lets say it's hello.cmd that prints hello world for the purposes of this question.

Allright.

Id would work better if I could see the script in question .

But, if you add this to the beginning of the script, and post your script after that point..

When the script starts, it will elevate the process first, and then the following chain will run as admin

File attached

https://www.mediafire.com/?a4c55c111x891pf

Dustin S.

Senior Technician and Network Switching Systems Operator / Maintainer.

Customer: replied 10 months ago.
I am changing the opening request details slightly to provide clarity. I don't think it will change your answer. But, please let me know Dustin if it is an issue. After the guest user logs in, new.vbs (below) should be automatically executed (which calls hello.bat -also below). That should then show a dialog box to the guest user with "Howdy" inside it.Once I can get that to automatically happen when the guest user logs in, I will be very happy. Please send back a revised attachment taking into consideration these 2 files. Also, as part of the original question, please provide the full path of where I should place the file for it to take effect.
Customer: replied 10 months ago.
I couldn't post the small amount of content of both files in the body above. I worked with technical support at justanswer.com and they said they would post it. But they left it out. So I am now trying to attach it from my Android phone. I am now getting "We're sorry - an unknown error occurred. Please try again." I'll attach it from my desktop as soon as I can - later tonight.
Customer: replied 10 months ago.
I am now trying to attach the file and cannot. Unbelievable. Back to justanswer technical support again.
Customer: replied 10 months ago.
justanswer technical support informed me that they weren't able to upload my file either. But that they did email you the file. Did you receive it?
Customer: replied 10 months ago.
I tried to run the batch file that you provided. I just replaced what you had between the rem statements with .../new.vbs.It didn't make it past the 3rd line. I am receiving the following error:
"& was unexpected at this time."Please send an update that includes an attachment that runs clean.

I would have gotten back to you sooner, But I had some scripts escape from their sandbox and didnt have my outgoing ports shut down like I should have.. Long story short, I spent the vast majority of today rebuilding my system.

Customer service forwarded a file you had sent, I just seen that in my email a bit ago.

at the moment Im a bit exhausted and worn out.. Would the morning / late morning be too late for you? I can pretty much preflight the script on my end on a guest account to see whether it will run correctly.

Customer: replied 10 months ago.
That works. Thanks for getting back to me Dustin.

Not a problem, in the morning ill be ready to code / script through this with you~

See you tomorrow,

Dustin S

Customer: replied 10 months ago.
Hi Dustin. Have you made any progress?
Customer: replied 10 months ago.
Can you confirm that you are actively working this?

Hello my name is Irvin. I will be willing to help you with your windows batch file. Please let me know what you need your script to do and I can help you solve your problem.

Also does your script need administrator privilege?

Customer: replied 10 months ago.
Please check out this link for 2 files-
https://www.mediafire.com/?1ixxt494oiu9fpiI am needing to have new.vbs/hello.bat run automatically from a guest account on Windows 10 when a guest logs in. new.vbs/hello.bat are files that cannot be accessible by the guest user and when new.vbs/hello.bat runs it will not ask the guest user for a password. However, the results of running new.vbs/hello.bat need to display to the guest user.Please provide a script that accomplishes this. Thanks.

I am sorry to say that the guest account needs to have access to the script in order to run. Guest account does not have access to the admin account so therefor it can not read the .bat file. If you wish to run the .bat file from guest account you need to place it in a readable directory or run the vbs script with admin privileges.

MrComputer2010, Computer Support Specialist
Category: Computer
Satisfied Customers: 425
Experience: 15+ Years working with computers. Microsoft Partner, AMD Partner, Eset Partner, A+ Certified
MrComputer2010 and 8 other Computer Specialists are ready to help you
Customer: replied 10 months ago.
Thanks for your reply. This isn't the answer that I was looking for but unfortunately does makes sense.
Customer: replied 10 months ago.
I'd like to rate you 5 stars but they are grayed out at the top of my screen. In any case, I am fully satisfied Irvin. Thank you.