You need a setup program. You can actually write them yourself, which is what I do. I would have responded to your question a long time ago if I had C or C++ code to share as an example, but the best I can do is post a PowerBASIC example. PowerBASIC is a low level language like C, but with a lot of high level features like C++. In any case, the most important starting point are various functions exported from shell32.lib that obtain the user's private directories, where, from reading your post, things should go. In the example I'm going to post, the code first calls SHGetFolderPath(), and upon successful completion, the szPath output parameter will contain the null terminated string consisting of the user's path, i.e....
C:\Users\User_Whoever\Documents
Then the code below creates various directories and copies various files to those directories. Note I'm not exactly sure of the Windows Api functions one would use in C to do the various things the program below does, such as test whether a directory already exists or not (I guess that's why I have a PowerBAIC example and not a C++ example).
But I believe the code does the kinds of things you are interested in doing. Like I said, I kind of like writing my own setup programs. Hope this helps.
Code:
%Debug = 1
%UNICODE = 1
#Compile Exe
#Dim All
#Include Once "Windows.inc"
#Include Once "ShlObj.inc"
Function PBMain() As Long
Local szTallies As WStringz*128
Local szPath As WStringz*128
Local strReturn As WString
Local strCurDir As WString
Local strPath As WString
Register i As Long
Local fp As Long
Local hr As Long
Console.Screen = 40, 100
hr=SHGetFolderPath(%NULL,%CSIDL_PERSONAL,%NULL,%SHGFP_TYPE_CURRENT,szPath)
If SUCCEEDED(hr) Then
szTallies = szPath & "\Tallies"
#If %Def(%Debug)
Con.Print "szPath = " szPath
Con.Print "szTallies = " szTallies
#EndIf
strReturn=Dir$(szTallies,%SUBDIR)
If strReturn="" Then
#If %Def(%Debug)
Con.Print szTallies & " Doesn't Exist. We'll Create It..."
#EndIf
MkDir szTallies
Else
#If %Def(%Debug)
Con.Print szTallies & " Already Existed!"
#EndIf
End If
fp=Freefile
Open szTallies & "\DBConnection.txt" For Output As #fp
Print #fp,"\\NRFORBOFS02\SIL\SALEDATA.MDB"
'Print #fp, szTallies & "\DBFILES\SALEDATA.MDB"
Print #fp, "\\NRFORBOFS02\SIL\SALEDATA.MDB"
Close #fp
strReturn=Dir$(szTallies & "\DBFiles",%SUBDIR)
If strReturn="" Then ' The C:\Tallies\DBFiles Directory Apparently Doesn't Exist
#If %Def(%Debug)
Con.Print szTallies & "\DBFiles" & " Doesn't Exist. We'll Create It..."
#EndIf
MkDir szTallies & "\DBFiles"
#If %Def(%Debug)
Con.Print szTallies & "\DBFiles" & " Created!"
#EndIf
Else
#If %Def(%Debug)
Con.Print szTallies & "\DBFiles" & " Already Existed!"
#EndIf
End If
strReturn=Dir$(szTallies & "\Documents",%SUBDIR)
If strReturn="" Then ' The C:\Tallies\Documents Directory Apparently Doesn't Exist
#If %Def(%Debug)
Con.Print szTallies & "\Documents" & " Doesn't Exist. We'll Create It..."
#EndIf
MkDir szTallies & "\Documents"
#If %Def(%Debug)
Con.Print szTallies & "\Documents" & " Created!"
#EndIf
Else
#If %Def(%Debug)
Con.Print szTallies & "\Documents" & " Already Existed!"
#EndIf
End If
strReturn=Dir$(szTallies & "\RawData",%SUBDIR)
If strReturn="" Then ' The C:\Tallies\RawData Directory Apparently Doesn't Exist
#If %Def(%Debug)
Con.Print szTallies & "\RawData" & " Doesn't Exist. We'll Create It..."
#EndIf
MkDir szTallies & "\RawData"
#If %Def(%Debug)
Con.Print szTallies & "\RawData" & " Created!"
#EndIf
Else
#If %Def(%Debug)
Con.Print szTallies & "\RawData" & " Already Existed!"
#EndIf
End If
strReturn=Dir$(szTallies & "\TxtFiles",%SUBDIR)
If strReturn="" Then ' The C:\Tallies\TxtFiles Directory Apparently Doesn't Exist
#If %Def(%Debug)
Con.Print szTallies & "\TxtFiles" & " Doesn't Exist. We'll Create It..."
#EndIf
MkDir szTallies & "\TxtFiles"
#If %Def(%Debug)
Con.Print szTallies & "\TxtFiles" & " Created!"
#EndIf
Else
#If %Def(%Debug)
Con.Print szTallies & "\TxtFiles" & " Already Existed!"
#EndIf
End If
strCurDir=CurDir$
Con.Print "strCurDir = " strCurDir
FileCopy strCurDir & "\TbrBst.exe", szTallies & "\TbrBst.exe"
FileCopy strCurDir & "\FCVols.txt", szTallies & "\FCVols.txt"
FileCopy strCurDir & "\FHGrid9.dll", szTallies & "\FHGrid9.dll"
strPath=Environ$("PROGRAMFILES(x86)")
If strPath="" Then
Console.Print "strPath=" strPath " Must Be 32 Bit!"
FileCopy strCurDir & "\dllTally32.dll", szTallies & "\dllTally.dll"
FileCopy strCurDir & "\Tally32.exe", szTallies & "\Tally32.exe"
FileCopy strCurDir & "\SaleAdministrationXp.exe", szTallies & "\SaleAdministration.exe"
Else
Console.Print "strPath=" strPath " Must Be 64 Bit!"
FileCopy strCurDir & "\dllTally64.dll", szTallies & "\dllTally.dll"
FileCopy strCurDir & "\Tally64.exe", szTallies & "\Tally64.exe"
FileCopy strCurDir & "\SaleAdministrationEx.exe", szTallies & "\SaleAdministration.exe"
End If
FileCopy strCurDir & "\Mrk.cfg", szTallies & "\Mrk.cfg"
FileCopy strCurDir & "\Help.txt", szTallies & "\Help.txt"
FileCopy strCurDir & "\TbrBst_Cpp_x86.exe", szTallies & "\TB_Cpp_x86.exe"
FileCopy strCurDir & "\TbrBst_Cpp_x64.exe", szTallies & "\TB_Cpp_x64.exe"
FileCopy strCurDir & "\FHGrid32.dll", szTallies & "\FHGrid32.dll"
FileCopy strCurDir & "\FHGrid64.dll", szTallies & "\FHGrid64.dll"
FileCopy strCurDir & "\SaleData.mdb", szTallies & "\DBFiles\SaleData.mdb"
End If
Waitkey$
PBMain=0
End Function