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
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..
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
Hack, the reg.exe is a microsoft resource kit tool that does not come installed on the clients.
kleinma
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...
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
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