yclee99 Posted May 8, 2009 Share Posted May 8, 2009 Hi, Here is the sample of my batch file script C:\****\****\**** -j projname -p subproject -h pcname -o -nd Note: C:\****\****\**** is an application file. Anyone knows how to convert my batch file to .au3. Link to comment Share on other sites More sharing options...
Yashied Posted May 8, 2009 Share Posted May 8, 2009 Hi,Here is the sample of my batch file scriptC:\****\****\**** -j projname -p subproject -h pcname -o -ndNote: C:\****\****\**** is an application file.Anyone knows how to convert my batch file to .au3.ShellExecute("C:\****\****\****", "-j projname -p subproject -h pcname -o -nd") My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
yclee99 Posted May 8, 2009 Author Share Posted May 8, 2009 ShellExecute("C:\****\****\****", "-j projname -p subproject -h pcname -o -nd")Thanks a lot. It works!My next question:I'm using a batch file in PC1 to execute psexec to start another batch file in PC2. Can I do the same function without using batch file and psexec (eg. file1.au3 in PC1 execute file2.au3 in PC2)? Link to comment Share on other sites More sharing options...
Yashied Posted May 8, 2009 Share Posted May 8, 2009 Thanks a lot. It works!My next question:I'm using a batch file in PC1 to execute psexec to start another batch file in PC2. Can I do the same function without using batch file and psexec (eg. file1.au3 in PC1 execute file2.au3 in PC2)?Yes. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
yclee99 Posted May 8, 2009 Author Share Posted May 8, 2009 Yes.Do you mind to teach me how to do tat? As I try search in the help, but I can't get it. Link to comment Share on other sites More sharing options...
yclee99 Posted May 9, 2009 Author Share Posted May 9, 2009 I'm using a batch file in PC1 to execute psexec to start another batch file in PC2. Can I do the same function without using batch file and psexec (eg. file1.au3 in PC1 execute file2.au3 in PC2)?Anyone can help me on this issue? Link to comment Share on other sites More sharing options...
avery Posted May 9, 2009 Share Posted May 9, 2009 Do you mind to teach me how to do tat? As I try search in the help, but I can't get it.There are examples of this right in the install folder. The documentation the developers spent time writing is some of the best I've ever seen. It rivals that of languages that have been around for a decade. If you really want people around here to continue to help at least spend a little time helping yourself please. Save your questions for the hard stuff that you really can't figure out on your own. I made the same mistake when I first came here until I seen how awesome the docs and examples really are. www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org Link to comment Share on other sites More sharing options...
yclee99 Posted May 11, 2009 Author Share Posted May 11, 2009 There are examples of this right in the install folder. The documentation the developers spent time writing is some of the best I've ever seen. It rivals that of languages that have been around for a decade. If you really want people around here to continue to help at least spend a little time helping yourself please. Save your questions for the hard stuff that you really can't figure out on your own. I made the same mistake when I first came here until I seen how awesome the docs and examples really are.Dude, thanks for replied my post.I tried to search it in the help file and google it, but I still can't get the function that I want. Maybe you can suggest me any keyword that I should search for? Link to comment Share on other sites More sharing options...
exodius Posted May 11, 2009 Share Posted May 11, 2009 If you're an admin on the computers you're hoping to do this on, you may be able to use COM to do it (ie, the same stuff that vbscript uses)... This is code of a .vbs file that you could use to run notepad remotely, just replace the "NameOrIPAdressOfVirtualMachine" with a valid station... If it works for you, then you should be able to find an example of it on the forums that you can use, or maybe someone will come along nice enough to translate it for you. strComputer = "NameOrIPAdressOfVirtualMachine" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process") Error = objWMIService.Create("notepad.exe", null, null, intProcessID) If Error = 0 Then Wscript.Echo "Notepad was started with a process ID of " _ & intProcessID & "." Else Wscript.Echo "Notepad could not be started due to error " & _ Error & "." End If Link to comment Share on other sites More sharing options...
yclee99 Posted May 11, 2009 Author Share Posted May 11, 2009 If you're an admin on the computers you're hoping to do this on, you may be able to use COM to do it (ie, the same stuff that vbscript uses)... This is code of a .vbs file that you could use to run notepad remotely, just replace the "NameOrIPAdressOfVirtualMachine" with a valid station... If it works for you, then you should be able to find an example of it on the forums that you can use, or maybe someone will come along nice enough to translate it for you. strComputer = "NameOrIPAdressOfVirtualMachine" Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process") Error = objWMIService.Create("notepad.exe", null, null, intProcessID) If Error = 0 Then Wscript.Echo "Notepad was started with a process ID of " _ & intProcessID & "." Else Wscript.Echo "Notepad could not be started due to error " & _ Error & "." End IfThank for that script. Actually I was using psexec and it worked fine. Just that, I would like to my 'program' using purely AutoIT script, wonder it can be done or not? The main reason I don't to use other script is because I want to make it simple and second reason is I'm totally noob in programming. 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