successliwei Posted December 14, 2007 Share Posted December 14, 2007 I want to install the wizip by users,so i have to use Runasset functionCode:if NOT FileExists("c:\Program Files\WinZip\WINZIP32") THEN if not IsAdmin() Then RunAsSet("myadmininame","mydomain","mypassword",2) RunWait("S:\winzip81.exe") ;s:\ is a network mapping driver,and everyone can access Else run("notepad") run("s:\winzip81.exe") EndIfElse ExitEndIfError:Unable to execute external program The system cannot find the path specifiedNote:When i marked RunAsSet line(RunAsSet("myadmininame","mydomain","mypassword",2)),there is no error,but the winzip cannot be installed .because of no administrator prevliage Link to comment Share on other sites More sharing options...
successliwei Posted December 14, 2007 Author Share Posted December 14, 2007 NOTE:The AU3 script run normally on windows 2000 Pro/Server,but not on XP and 2003 Link to comment Share on other sites More sharing options...
Developers Jos Posted December 14, 2007 Developers Share Posted December 14, 2007 The Map to S: is not available under the RunAs account credentials. options: 1. Use the UNC to run the installler : \\servername\path-to-file\winzip81.exe 2. First do a FileCopy() to copy the file from the server to local disk and then run it with the orther credentials. 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...
rudi Posted December 14, 2007 Share Posted December 14, 2007 I want to install the wizip by users,so i have to use Runasset function You can use "autoit" in squared brackets to to make code appear in a easy to read fashion, see below if NOT FileExists("c:\Program Files\WinZip\WINZIP32") THEN if not IsAdmin() Then RunAsSet("myadmininame","mydomain","mypassword",2) RunWait("S:\winzip81.exe") ;s:\ is a network mapping driver,and everyone can access Else run("notepad") run("s:\winzip81.exe") EndIf Else Exit EndIfoÝ÷ ÙK¶4*Z¶®¢Ý=ÛOv±êïz½=ÚÈZí=ÚOvÂ)ó5{ªºkjØ^®ØZ©¦v¸¯zWµêȲë)yËm«mërêâ·'(×±¶Ì"µÈb׫}êÞ³Ø^v¸¯zf©¦)à±ú+¶§{rêâ·'(×±µ.r¥uÈ^rKaÌ"¶®¶sdbfÆTW7G2gV÷C·3¢b3#·vç¦æWRgV÷C²FVà ×6v&÷cBÂgV÷CµFW7BgV÷C²ÂgV÷C´ô²gV÷C²¤VÇ6P ×6v&÷CÂgV÷CµFW7BgV÷C²ÂgV÷CµFæ÷Bf÷VæBgV÷C²¤VæF` ... just before the line run("s:\winzip81.exe") regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
successliwei Posted December 27, 2007 Author Share Posted December 27, 2007 The Map to S: is not available under the RunAs account credentials. options: 1. Use the UNC to run the installler : \\servername\path-to-file\winzip81.exe2. First do a FileCopy() to copy the file from the server to local disk and then run it with the orther credentials.Josthanks Link to comment Share on other sites More sharing options...
successliwei Posted December 27, 2007 Author Share Posted December 27, 2007 thanks 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