Ne...ne radi ):
Cuva mi string vrednost.
Ja sam sam pokusao nesto. Mislio sam da iz programa napisem neki .reg fajl i da ga potom pozovem shell funkcijom, al imam jedam problem: Windows me pita da li sam siguran da hocu da ubacim nekoime.reg u registry.
Kako da izbegnem to potvrdjivanje. Hocu reci gde da ubacim "/s" parametar. Evo sta sam ja uradio:
Prvo sam u global declarations upisao:
Code:
Private Declare Function ShellExecute Lib "SHELL32.DLL" Alias "ShellExecuteA"(ByVal hwnd As Long, _
ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Const SW_ShowNormal = 1
zatim i funkciju:
Code:
Function InputReg(filename As String)
If Dir(filename) = "" Then
MsgBox "Unknown error!", vbCritical, "Error": Exit Function
Else
Dim iReturn As Long
iReturn = ShellExecute(frmMain.hwnd, "Open", filename, vbNullString, App.Path, SW_ShowNormal)
End If
End Function
Ako mozes pomogni mi sa ovim ili sa onom SaveNumberLong funkcijom...