risrollout Posted August 12, 2004 Share Posted August 12, 2004 I am converting Logon scripts to one AutoIt exe and need to know how to do what these bat files do in AutoIt code? Any help would be apreciated. c:\Xcacls.exe c:\CRM /T /E /G "Power Users":f net localgroup "power users" "AGENTS" /add copy I:\install\Axtsapi2.* %windir%\system32\ copy I:\install\1stCallLogger2.* %windir%\system32\ copy I:\Install\Xtimers.* %windir%\system32\ c: cd .. cd %windir%\system32\ regsvr32.exe Axtsapi2.dll regsvr32.exe 1stcalllogger2.dll regsvr32.exe Xtimers.dll Link to comment Share on other sites More sharing options...
SlimShady Posted August 12, 2004 Share Posted August 12, 2004 Here it is: RunWait('c:\Xcacls.exe c:\CRM /T /E /G "Power Users":f', @ScriptDir, @SW_HIDE) RunWait('net localgroup "power users" "AGENTS" /add', @ScriptDir, @SW_HIDE) FileCopy("I:\install\Axtsapi2.*", @SystemDir, 1) FileCopy("I:\install\1stCallLogger2.*", @SystemDir, 1) FileCopy("I:\Install\Xtimers.*", @SystemDir, 1) RunWait("regsvr32.exe Axtsapi2.dll", @SystemDir, @SW_HIDE) RunWait("regsvr32.exe 1stcalllogger2.dll", @SystemDir, @SW_HIDE) RunWait("regsvr32.exe Xtimers.dll", @SystemDir, @SW_HIDE) PS: The run functions may not work because they're not executed using the Windows command line. If that's the case, replace RunWait(" with... RunWait(@ComSpec & " /c Link to comment Share on other sites More sharing options...
risrollout Posted August 14, 2004 Author Share Posted August 14, 2004 Thanks for the help. One more question; How do you place a icon on the desktop for All Users in AuotIt? Here is the VBS code for it. path = "c:\crm\" Set shell = createobject("wscript.shell") cmd = "attrib """ & path & "\*.*"" -r /S /D" shell.run cmd,0,True oFso.CopyFile "I:\Install\phone.ico" , "c:\crm\" Set objShell = WScript.CreateObject("WScript.Shell") strDesktopFolder = objShell.SpecialFolders("AllUsersDesktop") Set objShortCut = objShell.CreateShortcut(strDesktopFolder & "\CRM.lnk") objShortCut.TargetPath = "C:\CRM\Office\MSACCESS.EXE" objShortCut.Arguments = "/runtime /wrkgrp c:\crm\system.mdw w:\system\central.mde" objShortCut.IconLocation = "C:\Crm\Phone.ico" objShortCut.Description = "CRM" objShortCut.Save Wscript.Quit Link to comment Share on other sites More sharing options...
Developers Jos Posted August 14, 2004 Developers Share Posted August 14, 2004 Thanks for the help. One more question; How do you place a icon on the desktop for All Users in AuotIt? Here is the VBS code for it.Have a look at FileCreateShortcut and @DesktopDir in the helpfile... 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...
risrollout Posted August 14, 2004 Author Share Posted August 14, 2004 I have but I do not see how to add the arguments to it. Link to comment Share on other sites More sharing options...
emmanuel Posted August 14, 2004 Share Posted August 14, 2004 I have but I do not see how to add the arguments to it. <{POST_SNAPBACK}>Look at the "Args" option. FileCreateShortcut ( "file", "lnk" [, "workdir", "args", "desc", "icon", "hotkey"] ) "I'm not even supposed to be here today!" -Dante (Hicks) 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