cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hjsunj
Level 6

Can I use the SdRMFileInUse in Windows XP?

my question as the Title, thanks all.
Labels (1)
0 Kudos
(7) Replies
DebbieL
Level 17

I don't believe that the SdRMFilesInUse dialog works on Windows XP, since SdRMFilesInUse works with the Restart Manager, which was introduced for Windows Vista. On Windows XP systems, you'd want to use SdFilesInUse.

I hope that helps.

Debbie Landers
Macrovision Corporation
0 Kudos
hjsunj
Level 6

Thanks DebbieL:
I have noticed that a SdFilesInUse dialog can be manually used in InstallScript to show the Files-in-use dialog

For the following syntax:
SdFilesInUse ( byval string szTitle, byval string szMsg, byval string szFilesInUse, byref LIST nvlistApps );

I must give a string list of applications that are locking files, but where to get the application list since I don't know which file will be locked?
0 Kudos
DebbieL
Level 17

I think that you would need to identify the files that would cause problems if they were locked during your installation, and add if statements in your script that would check to see if they are locked; if so, add them to the list of files that would be passed to SdFilesInUse. The SdFilesInUse Example help topic has some sample script.

Debbie Landers
Macrovision Corporation
0 Kudos
hjsunj
Level 6

I don't want to specify them manually for too many file types in my project. And I have seen the OnFileLocked event which can detect file in used.
But it only detect one file each time and how to add it into SdFilesInUse's nvlistApps to construct a full file-in-use list?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Are you trying to call SdFilesInUse or SdRMFilesInUse directly? Normally this is only called through the events which correspond to callbacks from Windows Installer. It will have done the work to identify which files are in use, and expects feedback from the user.

If you are trying to call the function manually, then yes, you will have to prepare the file list; these dialogs do not find out the information, they merely display it.
0 Kudos
hjsunj
Level 6

I know that
1. In Basic Msi project, InstallValidation action will launch the SdFilesInUse dialog automatically.
2. In InstallScript MSI project, OnFilesInUse event is available to launch SdFilesInUse automatically.
But what's for InstallScript project? It's seems no way but to add dialog manually.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

That is correct - InstallScript doesn't natively use this dialog; it handles in-use files differently from MSI. If you want to use the dialog, you will have to create your list before calling the dialog, and process the response accordingly.
0 Kudos