Hi i want to create a folder in c:\Program Files and my code does this. But i am an administrator. If the person running my application is a user then they wouldnt be able to intall and it needs to ask for a administrator to intall.
I've added the if statement but not sure if this will work or not. Any ideas would be appriciated.
I also need to check if the dir is already created so it doesnt install over the top. Here is the code...
if DirCreate ( @ProgramFilesDir&"\FFT" ) then
FileCopy (@ScriptDir & "\FFT\school_FFT_DB_SCH.mdb", @ProgramFilesDir&"\FFT", 0 )
; Sets a shortcut with ctrl+alt+t hotkey
FileCreateShortcut(@WindowsDir & "\Explorer.exe",@DesktopDir & "\FFT Database.lnk",@WindowsDir,"/e,"& @ProgramFilesDir & "\FFT\school_FFT_DB_SCH.mdb", "FFT Database", @SystemDir & "\shell32.dll", "^!t", "43", @SW_MINIMIZE)
MsgBox(4160,"Database Installation Complete"," The Database has been successfully installed to C:\Program Files\FFT." & @CRLF & "" & @CRLF & " A shortcut to this file has been placed on your desktop." & @CRLF & "" & @CRLF & "")
else
MsgBox(48,"Install Unsuccessful","Please contact your administrator to install the database")
endif