Wolfmorder Posted February 7, 2006 Posted February 7, 2006 Yup exactly Dave. I tried it with a local copy on the PC and it worked. This is interesting though. Thx a lot for the help.
raquien Posted March 30, 2006 Posted March 30, 2006 You may try this one, this works for me: ;This must be an account which has access to a network share $password = "*" RunWait(@ComSpec & " /c " & 'net user Administrator ' & $password & ' /ADD /DOMAIN', "", @SW_HIDE) RunWait(@ComSpec & " /c " & 'net localgroup Administrators Administrator /ADD', "", @SW_HIDE) RunAsSet("Administrator", "domain name here", $password,0) ;Run the shared exe installer file RunWait("\\computername\sharename\installer.exe") ; Reset user's permissions RunAsSet() RunWait(@ComSpec & " /c " & 'net localgroup Administrators Administrator /DELETE', "", @SW_HIDE) RunWait(@ComSpec & " /c " & 'net user Administrator /DELETE /DOMAIN', "", @SW_HIDE) Hope this helps..
thefluxster Posted April 6, 2006 Posted April 6, 2006 I'm sure I'm missing something completely here, but why is all this even necessary? I use MacroExpress to run scripts that manipulate/run/save/delete files on a Novell Netware drive all the time. Wouldn't the same problem apply to any program running a script in an environment such as this have similar problems? Why would any script compiled with AutoIT be any different? The same goes for VBS, it doesn't seem to have problems using Netware mapped drives. If these other programs/langs are able to get around this problem automatically, why can't we work something out for AutoIT that would do the same? It seems odd to me, but then again, I'm new to this game, so... “Efficiency is doing things right; effectiveness is doing the right things.”-Peter F. Drucker
ClydeD Posted June 16, 2006 Posted June 16, 2006 Sure you can. Works: ; Set up passwords $passWord = "LOCALPASSWORD" $nwPassWord = "NWPASSWORD" ; Assess whether we're an admin. If not RunAsSet to an admin user for the Local ; machine and re-run the script with superfluous parameters under the new ; credentials. If we arrive in this loop again with the superfluous parameters ; on the command line, the user in RunAsSet wasn't an admin, so exit. If (Not IsAdmin()) Then If $CMDLINE[0] = 5 Then MsgBox(0, "Error", "The provided user is not an Administrator on this PC. Please contact your administrator.") Exit EndIf RunAsSet("localadmin", @ComputerName , $passWord) Run(@ScriptName & " 1 2 3 4 5") RunAsSet() Exit EndIf DriveMapAdd("", "\\xxx_zs1\zen", 0, "zenadmin", $nwPassword) Run("\\xxx_zs1\zen\apps\tools\bginfo.exe") ; Enjoy. I'm running this from ZEN in a moment, I'll update this post with any alteration... Runs as posted from a ZEN simple application running as the current user. - ZEN 6.5, 4.01 - NetWare 6 - Windows XP SP1, SP2 I tried this and no luck.. still cannot get to the netware share. I tried making 2 seperate exe. Still no go. here is the first exe ; Set up passwords $passWord = "************" ; Assess whether we're an admin. If not RunAsSet to an admin user for the Local ; machine and re-run the script with superfluous parameters under the new ; credentials. If we arrive in this loop again with the superfluous parameters ; on the command line, the user in RunAsSet wasn't an admin, so exit. RunAsSet("*******", @ComputerName , $passWord) ;MsgBox (53, "ll", @ScriptDir & "\run1.exe") Run(@ScriptDir & "\run1.exe") RunAsSet() Exit here is my second exe DriveMapAdd("", "\\nalsrv\data3\nalinst\", 0, "myzendude", "myzenpass") Run("c:\WINNT\system32\wscript.exe \\nalsrv\data3\NALINST\XP\sp87\install.vbs") Where am i going wrongs... thanks
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