VenomIT Posted May 29, 2010 Share Posted May 29, 2010 Hi to all i know this is going to be an easy question. I have got an exe the name is comexp.exe now if i have got an Dll i can only drag and drop the dll on the comexp.exe and it shall be regsitered. Now my question is i wont to make and linked exe so if you drag and drop an dll it should regsiter at the master exe and not the linked exe Possible. If $CMDLINE[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CMDLINE[1], 4) Case '.msi', '.exe' If FileInstall('comexp.exe', @TempDir & '\comexp.exe') Then $exitcode = RunWait('"' & @TempDir & '\comexp.exe""' & $CMDLINE[1] & '"') Need Help Link to comment Share on other sites More sharing options...
jaberwacky Posted May 30, 2010 Share Posted May 30, 2010 Doesn't FIleInstall need a complete source path? FileInstall("C:/comexp.exe", ...) for example. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
zeffy Posted May 30, 2010 Share Posted May 30, 2010 (edited) Hi to all i know this is going to be an easy question. I have got an exe the name is comexp.exe now if i have got an Dll i can only drag and drop the dll on the comexp.exe and it shall be regsitered. Now my question is i wont to make and linked exe so if you drag and drop an dll it should regsiter at the master exe and not the linked exe Possible. If $CMDLINE[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CMDLINE[1], 4) Case '.msi', '.exe' If FileInstall('comexp.exe', @TempDir & '\comexp.exe') Then $exitcode = RunWait('"' & @TempDir & '\comexp.exe""' & $CMDLINE[1] & '"') Need Help Try this If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case ".msi", ".exe" If FileInstall("comexp.exe", @TempDir & '\comexp.exe') Then $exitcode = RunWait(@TempDir & "\comexp.exe " & $CmdLine[1]) ... Doesn't FIleInstall need a complete source path? FileInstall("C:/comexp.exe", ...) for example. No. Not if it's in the same directory as the script. Edited May 30, 2010 by Zef Link to comment Share on other sites More sharing options...
VenomIT Posted May 31, 2010 Author Share Posted May 31, 2010 Try this If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case ".msi", ".exe" If FileInstall("comexp.exe", @TempDir & '\comexp.exe') Then $exitcode = RunWait(@TempDir & "\comexp.exe " & $CmdLine[1]) ... No. Not if it's in the same directory as the script. Hi i tryit it but it keeks giveing me error to compile and cant seem to get it fixed. Think is about the format If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case '.msi', '.exe' If FileInstall("comexp.exe", @TempDir & '\comexp.exe') Then $exitcode = RunWait(@TempDir & "'\comexp.exe' , /R'" & $CmdLine[1]) i have searched other meens also and found. I that i have change but does not work the application is executed by an switch /R So i need so add the Switch also Is this Correct. Link to comment Share on other sites More sharing options...
martin Posted May 31, 2010 Share Posted May 31, 2010 Hi i tryit it but it keeks giveing me error to compile and cant seem to get it fixed. Think is about the format If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case '.msi', '.exe' If FileInstall("comexp.exe", @TempDir & '\comexp.exe') Then $exitcode = RunWait(@TempDir & "'\comexp.exe' , /R'" & $CmdLine[1]) i have searched other meens also and found. I that i have change but does not work the application is executed by an switch /R So i need so add the Switch also Is this Correct. It isn't correct because I think you need a space after /R. You need to tell us what the compile error is. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
MHz Posted May 31, 2010 Share Posted May 31, 2010 With an /R switch would be like this: If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case '.msi', '.exe' If FileInstall('comexp.exe', @TempDir & '\') Then $exitcode = RunWait('"' & @TempDir & '\comexp.exe" /R "' & $CmdLine[1] & '"') EndIf EndSwitch EndIf Link to comment Share on other sites More sharing options...
VenomIT Posted May 31, 2010 Author Share Posted May 31, 2010 With an /R switch would be like this: If $CmdLine[0] Then ; get 4 chars on the right of the passed switch Switch StringRight($CmdLine[1], 4) Case '.msi', '.exe' If FileInstall('comexp.exe', @TempDir & '\') Then $exitcode = RunWait('"' & @TempDir & '\comexp.exe" /R "' & $CmdLine[1] & '"') EndIf EndSwitch EndIf Im Getting this Error Please C:\Documents and Settings\10012137\Desktop\Com.au3(4,1) : ERROR: missing EndIf. (illegal character) ^ C:\Documents and Settings\10012137\Desktop\Com.au3(1,20) : REF: missing EndIf. If $CmdLine[0] Then ~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\10012137\Desktop\Com.au3 - 1 error(s), 0 warning(s) 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