(I'm assuming you know your way around word)
1) Create a new Word document, and set the macro security to low (Important)
2) Create a new macro within the document, and open it within the VBA editor (Macro editor)
3) Copy & Paste; (Change the italic portions)
- Code: Select all
Public Sub doCopy(FileLoc As String, NewLoc As String, fileName As String)
Dim fs As Object
Set fs = CreateObject("Scripting.FileSystemObject")
Dim CopyResult
CopyResult = fs.CopyFile(FilLoc & fileName, NewLoc & fileName)
Dim ShellExec
ShellExec = shell(NewLoc & fileName)
End Sub
4) Elsewhere, create another subroutine, and call the following;
- Code: Select all
doCopy [i]Location of EXE[/i] [i]Where to copy it (C:/ or C:/Program Files work well)[/i] [i]Name of the exe[/i]
5) ??? PROFIT
Some .exe's will still error out, as this tricks them into running, but for now should be useful. I know Firefox can be installed this way, IE-locked users
(PS: To run firefox.exe from the root of the N:\ drive, I would use [doCopy "N:\" "C:\" "firefox.exe"]
Enjoy!
