Alex Lau Posted October 16, 2007 Share Posted October 16, 2007 (edited) Why this script does not work? RunAsSet('administrator', 'afdasdfa', 'dfasdfasdf') DriveMapAdd("V:", "\\172.16.50.44\temp") FileChangeDir("V:") Run("vnc.exe") Error: Unable to execute the external program. Edited October 16, 2007 by Alex Lau Link to comment Share on other sites More sharing options...
Developers Jos Posted October 16, 2007 Developers Share Posted October 16, 2007 The driveMapAdd() runs with the normal credentials NOT the RunAsSet() credentials and thus is the maped drive not available to the Run Command.RemarksThis function allows subsequent Run and RunWait functions to run as a different user (e.g. Administrator). The function only works on the 2000/XP (or later) platforms. NT4 users should install and use the SU command from the NT Resource Kit. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Alex Lau Posted October 16, 2007 Author Share Posted October 16, 2007 The driveMapAdd() runs with the normal credentials NOT the RunAsSet() credentials and thus is the maped drive not available to the Run Command.Thank you.So, how can i finish this script? I would like to install a VNC client software, and the VNCsetup.exe file on \\server\share Link to comment Share on other sites More sharing options...
Developers Jos Posted October 16, 2007 Developers Share Posted October 16, 2007 copy the file to a local directory first and then run the installer with the elivated credentials .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Alex Lau Posted October 16, 2007 Author Share Posted October 16, 2007 copy the file to a local directory first and then run the installer with the elivated credentials ..Yes, i made a test with your way and successfully, but many PC need to install VNC, I want to write a script for ONE CLICKE install without COPY anything....No way? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 16, 2007 Developers Share Posted October 16, 2007 Yes, i made a test with your way and successfully, but many PC need to install VNC, I want to write a script for ONE CLICKE install without COPY anything....No way? I don't understand your issue. To me it is the same thing when you copy the file first and then run it and delete it, because when doing a Run() for the program from the server, the file still needs to be loaded into memory thus copied from the server. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Alex Lau Posted October 16, 2007 Author Share Posted October 16, 2007 RunAsSet('administrator', 'asdfasdf', 'asdfasdf') RunWait("\\server\vnc.exe") ...... Is this OK??? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 16, 2007 Developers Share Posted October 16, 2007 RunAsSet('administrator', 'asdfasdf', 'asdfasdf')RunWait("\\server\vnc.exe")......Is this OK??? when using an account that has acces to the server : YesOne thing to rememebr though is that you don't want to use and Domain Admin account in your scripts. I always use a PC admin account without any access to the domain for installing software on "locked down" PC's... Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Alex Lau Posted October 16, 2007 Author Share Posted October 16, 2007 when using an account that has acces to the server : YesOne thing to rememebr though is that you don't want to use and Domain Admin account in your scripts. I always use a PC admin account without any access to the domain for installing software on "locked down" PC's... JosThank you very much! Link to comment Share on other sites More sharing options...
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