NYCPackager Posted October 23, 2008 Posted October 23, 2008 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!
dbzfanatic Posted October 23, 2008 Posted October 23, 2008 Run("\\server\path")? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
NYCPackager Posted October 23, 2008 Author Posted October 23, 2008 Run("\\server\path")?Can't run it like this cause the Local Admin Account has no access to Domain Resources...I wish it was this simple....lol.
dbzfanatic Posted October 23, 2008 Posted October 23, 2008 Never hurts to try . 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). Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
NYCPackager Posted October 23, 2008 Author Posted October 23, 2008 Never hurts to try . 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.
PsaltyDS Posted October 23, 2008 Posted October 23, 2008 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. 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
NYCPackager Posted October 23, 2008 Author Posted October 23, 2008 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.
spudw2k Posted October 23, 2008 Posted October 23, 2008 (edited) 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.exeI use it run a script locally that needs to access a network location.runas.exe /user:DOMAIN\username /netonly Edited October 23, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
Graywalker Posted September 2, 2010 Posted September 2, 2010 You can also try runas.exeI use it run a script locally that needs to access a network location.runas.exe /user:DOMAIN\username /netonlyI 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now