Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to use NTProfiles.h


3 replies to this topic

sys2000

sys2000
  • Members
  • 2 posts

Posted 23 August 2005 - 14:20

I found NTProfiles.h to the installsite to modify all profiles on a W2K workstation.
But I don't understand how to use it in a setup.rul



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 August 2005 - 18:29

Add
#include "NTProfiles.h"
to your setup.rul (and of course copy the file to your script files).
Then you should be able to call the functions that are defined in that file from your script, such as _NTProfCopyFiles, _NTProfDeleteFiles etc. The script source code is in the .h file (instead of a .rul file)

sys2000

sys2000
  • Members
  • 2 posts

Posted 26 August 2005 - 09:41

I have been trying it but I have always a few problems.
I use Adminstudio 6 with Editor 10.5, is there problems of compatibility?

Is there any problems with this script ?

#include "NTProfiles.h"
#include "ifx.h"

export prototype MyFunction(HWND);


function MyFunction(hMSI)
// To Do: Declare local variables.
STRING szValue, szKey, szName ;
NUMBER nSize, nType, nzProfileSwitch;
BOOL bOverwrite;

begin
szKey = "IZArc";
szName = "AppLanguageFile";
nType = REGDB_NUMBER;
szValue = "French.lng";
nSize = -1;
bOverwrite = TRUE;
_NTProfRegHiveSetKeyValue( szKey , szName , nType , szValue , nSize , nzProfileSwitch , bOverwrite );
end;

Attached Images

  • Sans_titre.jpg

Edited by sys2000, 26 August 2005 - 10:05.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 August 2005 - 22:06

Try it the other way round:
#include "ifx.h"
#include "NTProfiles.h"

Let me know if that works.