mklink can be run from any command path, therefore I'm trying to run mklink though runas by means of runas /noprofile /users:AdminUser mklink but I can get error that The system cannot find the file specified ? How can I tell runas to run the command mklink as I would when running mklink from any command prompt ?

Recommended Answers

If it can't find runas, then why not use the full path. This might vary from PC to PC but here it was C:\Windows\System32\runas.exe
If it can't find mklink then that path could be supplied.

Jump to Post

All 4 Replies

If it can't find runas, then why not use the full path. This might vary from PC to PC but here it was C:\Windows\System32\runas.exe
If it can't find mklink then that path could be supplied.

You don'y need to enable the admin account. You can create a shkrtcut to an elevated task via the task scheduler. See here for details.

Passing in the /k flag then the command "mklink cmd" then and only then does it execute.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.