Jump to content

Self destructing app - one time use


Kunal
 Share

Recommended Posts

Hi I have the below script which makes a shortcut then copys it to a network area.

What i would like to do is when it copys the shortcut over and after i run the program for which the shortcut is for, the shortcut needs to delete itself and make sure that a local copy of the program does not get cached for security reasons. How can i do this? temp files maybe?

$comp_name = InputBox("What's the computer name?", "Please provide Computer Name?")

If Not $comp_name = "" Then
    FileCreateShortcut(@ProgramFilesDir & "\MyProgram\file.exe", @ScriptDir & "\file.lnk", @ProgramFilesDir & "\MyProgram")
    FileCopy(@ScriptDir & "\file.lnk", "\\" & $comp_name & "\c:\Documents and Settings\All users\Desktop")
EndIf
Link to comment
Share on other sites

Shared disk c: in Network c$

CODE
FileCopy(@ScriptDir & "\file.lnk", "\\" & $comp_name & "\c$\Documents and Settings\All users\Desktop")

thanks but how does this delete the shortcut when you have finished with the program.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...