Jump to content

UNC Path Using Local Account


Recommended Posts

Hey all...

i know this has GOT to be a simple script, but i am going crazy here...been doing lots of searches on here, but just can't seem to find it.

I am trying to run several commands (like File Copy, Run, etc etc), but all of these are on a Shared network on the server. I need to figure out how to run all of these on a workstation using the local admin account.

Mapping a drive is not an option, because one of the Run commands is to install an application, and that application requires to be run from a UNC Path.

Is there ANY code that i can use that will allow me to have network access from a local account?

I love RunAsSet, but it only works with Run commands...need something similar to that with File Copy etc etc. Thanks a bundle!

Link to comment
Share on other sites

Never hurts to try :P. Well if the admin account doesn't have access how are you supposed to run the installation from UNC paths? Or is that part of why you need this? Also why does it have to be run from a UNC path? Most installers work from any path (all that I've ever seen but there are always exceptions).

Link to comment
Share on other sites

Never hurts to try :P. Well if the admin account doesn't have access how are you supposed to run the installation from UNC paths? Or is that part of why you need this? Also why does it have to be run from a UNC path? Most installers work from any path (all that I've ever seen but there are always exceptions).

lol...i know what you mean.

I am trying to copy some files, and install an application on a remote location. The remote users do not have admin rights, so i need to run this using Unsecured System User account (which has local admin rights, but it's not really a user persay). The Unsecured System User is a local user so it has no access on anything that is on the Domain.

When i was using Winbatch, i would add a Network Extender (WWWNT32.DLL), and it would work fine. The Unsecured System User had access to the network share, and started to do whatever. On AutoIt, it fails on me.

I NEED to run this particular app from a unc path cause, the program (after it is installed), when launched goes BACK to the installation location to find a particular file to verify its version. But the thing is, not everyone (like 1000 workstations), have the same drive mapped, so using a UNC path is the best.

I hope i made sense....lol.

Link to comment
Share on other sites

Hey all...

i know this has GOT to be a simple script, but i am going crazy here...been doing lots of searches on here, but just can't seem to find it.

I am trying to run several commands (like File Copy, Run, etc etc), but all of these are on a Shared network on the server. I need to figure out how to run all of these on a workstation using the local admin account.

Mapping a drive is not an option, because one of the Run commands is to install an application, and that application requires to be run from a UNC Path.

Is there ANY code that i can use that will allow me to have network access from a local account?

I love RunAsSet, but it only works with Run commands...need something similar to that with File Copy etc etc. Thanks a bundle!

If you love RunAsSet(), then you are running an out-of-date version of AutoIt, since that function was removed several versions ago!

The current functions are RunAs() and RunAsWait().

You are describing a confusing chain of authentication here. What account is going to launch the initial script? Is a different account required to access the files, and what account is that? It sounds like you could have one script launch a second script with RunAs(), but it's hard to tell from your description.

There is no magic in AutoIt. If the network resource requires domain authentication, then a script run by a local admin will have to provide domain credentials at some point.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

OK...i've decided to just forget the way i was gonna do it, and do a round about way...map the network drive and edit the locations where it looks for the installation path from.

Now, i would like to use the DriveMapAdd command to map a drive, however, do it silently or hidden. Right now, when i do that command, it opens up a window with that drive mapping...how do i make it so that i map a drive without that window opening up?

Thanks for all your help....i'm gonna do a search on this forum to see if someone already answered that question, but just in case...lol.

Link to comment
Share on other sites

OK...i've decided to just forget the way i was gonna do it, and do a round about way...map the network drive and edit the locations where it looks for the installation path from.

Now, i would like to use the DriveMapAdd command to map a drive, however, do it silently or hidden. Right now, when i do that command, it opens up a window with that drive mapping...how do i make it so that i map a drive without that window opening up?

Thanks for all your help....i'm gonna do a search on this forum to see if someone already answered that question, but just in case...lol.

You can also try runas.exe

I use it run a script locally that needs to access a network location.

runas.exe /user:DOMAIN\username /netonly

Edited by spudw2k
Link to comment
Share on other sites

  • 1 year later...

You can also try runas.exe

I use it run a script locally that needs to access a network location.

runas.exe /user:DOMAIN\username /netonly

I know this is an old thread, but to install a program on a remote computer where the user doesn't have access, I would build a silent installer, copy that down to the end-point's temp directory and schedule a task to install it. The scheduled task uses your credentials (and hopefully you are an admin) to run - or using schtasks can be set to run as local admin - if you know the password.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...