VenomIT 0 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 Share this post Link to post Share on other sites
jaberwacky 327 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? Share this post Link to post Share on other sites
zeffy 0 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 Share this post Link to post Share on other sites
VenomIT 0 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. Share this post Link to post Share on other sites
martin 85 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. Share this post Link to post Share on other sites
MHz 80 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 Share this post Link to post Share on other sites
VenomIT 0 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) Share this post Link to post Share on other sites