Sign in to follow this  
Followers 0
VenomIT

Enable Drap and drop on exe

7 posts in this topic

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



#3 ·  Posted (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 by Zef

Share this post


Link to post
Share on other sites

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

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

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

:mellow:

Share this post


Link to post
Share on other sites

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

:mellow:

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

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0