1bobby Posted September 10, 2008 Posted September 10, 2008 Know this is something that I do not understand with the RunAs command. I have a script that runs from a memory stick that does updates to the local software and makes user configuration (logged in as the user) changes which can only run as admin . I have to get files from the network, which has hidden directories, and requires admin to get to the files. Users are part of the power users group.This is a test script to test the feature. The script runs from the memory stick ok, but never pulls the program from the network hidden directory. I am missing something in the understanding of the RunAs command. Totally confused yet? I am รจ bobby Code:MsgBox(0, "Testing", "trying to run now", 1)Sleep(50)RunAsWait("bobbyb", "jupiter", "XXXXXXXXX", 1 , "\\troi\apps2$\is test\calculator.exe", "" , @SW_MAXIMIZE )Sleep(2000)MsgBox(0, "testing", "I ran it", 1)Exit
Community On Patrol Posted September 10, 2008 Posted September 10, 2008 Hi 1bobby, Please create descriptive topics. Using one word topics makes it really difficult to use the search feature, and those that could probably answer your question will probably not even read your thread. Doing it enough could cause your posting privileges to be taken away all together, and we don't want that . Thanks.
enaiman Posted September 10, 2008 Posted September 10, 2008 Passwords left in the code: BAD idea. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
1bobby Posted September 11, 2008 Author Posted September 11, 2008 Passwords left in the code: BAD idea. Both points welcomed, didn't mean to leave password in the script. Has been removed. No don't want to loose the provlige of posting, but didn't read that in the read before posting, sorry, will do better next time. I can only think both of you for your input! 1bobby
enaiman Posted September 11, 2008 Posted September 11, 2008 Welcome SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :)
DaveF Posted September 11, 2008 Posted September 11, 2008 A process created with RunAs[Wait] (or any similar Windows functionality) doesn't inherit any network connections from the parent process. The way that I've worked around this in the past is to have two scripts: one installed on the local machine to copy the second script from the network, run it as the alternate user, wait and delete the second afterward; and the second script which starts off by making a network connection using DriveMapAdd and then doing the rest of the tasks I needed the alternate user's privileges for doing... Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.
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