inno include .exe with vb6 app
Not sure of the forum rules.... but can I ask a question about inno setup compiler as it pertains to this question??
the question would be on what screen during the wizard would I add the reg.exe file that is location on my hard drive in c:\admintools\reg\ and where do I declare in inno that that file needs to be installed in the c:\winnt\system32 computer of the person installing the software.....
newbie to both inno and vb6 so any simple steps would be appreciated
thanks
Re: inno include .exe with vb6 app
I figured out the problem and used inno for attaching .exe file
change the code to the following
Code:
Private Sub cmdCitrixKey_Click()
Dim sysDir As String
sysDir = Environ$("windir")
Shell sysDir & "\reg delete HKLM\Software\Microsoft\MSLicensing\test2 /force", vbNormalFocus
Shell sysDir & "\reg delete HKLM\Software\Microsoft\MSLicensing\test1 /force", vbNormalFocus
End Sub
The app does the job but I know I can improve on the code since when I run the app two cmd windows popup and close right away. How can I run just one shell function?? to do the job that the two shell functions are doing. I want to clean the code up if I can..
Re: inno include .exe with vb6 app
VB Code:
Private Sub cmdCitrixKey_Click()
Dim sysDir As String
sysDir = Environ$("windir")
Shell sysDir & "\reg delete HKLM\Software\Microsoft\MSLicensing\test2 /force", vbHide
Shell sysDir & "\reg delete HKLM\Software\Microsoft\MSLicensing\test1 /force", vbHide
End Sub
Try that, almost the same code, but, uses VbHide.
Re: inno include .exe with vb6 app
This is just a curiousity question, but why would you need to distribute reg.exe?
Isn't that something that should already be installed on your target machines?
Re: inno include .exe with vb6 app
you know you can use API functions to interact with the registry directly from VB code.. no need to include reg.exe, no need to shell to an external app..
its really much nicer and cleaner that way, and you can do things like verify that the action completed properly
1 Attachment(s)
Re: inno include .exe with vb6 app
here is a module you can plop into your VB6 app, and use its functions to interact with the registry
[EDIT]: I uploaded the bas file instead of posting the code (was too big :wave: )
Re: inno include .exe with vb6 app
Hack, the reg.exe is a microsoft resource kit tool that does not come installed on the clients.
kleinma
Quote:
you know you can use API functions to interact with the registry directly from VB code.. no need to include reg.exe, no need to shell to an external app..
I have never used API before.. just a newbie trying to learn.... I will have to find a site to explain API functions to me...
Re: inno include .exe with vb6 app
no you won't.. because the bas module I posted is basically a wrapper... it handles all the API stuff for you so you don't have to. You just call the public functions in that module as if you wrote them yourself.. it has easy functions to work with to read and write keys
for example if you put that module in your app, and called it modReg, you would access it from your code like
VB Code:
modReg.SaveSettingString(HKEY_LOCAL_MACHINE, "SOFTWARE\MyComp\MyApp\", "MyKey","MyValue")
this would save a string in the HKEY LOCAL MACHINE part of the registry, in the software node, and MyComp and MyApp could be substituted to suite your needs. MyKey is the registry key name, and of course MyValue is the string value of MyKey