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

Working Directory for Custom Action

CChong
By Level 11 Flexeran
Level 11 Flexeran
I am trying to create a custom action that calls an EXE file from C:\WINNT\Utils. I would like the custom action to use this location as a variable so it can run on other OS'

I have created a Directory entry as follows:

Directory Directory_Parent DefaultDir
UTILS WindowsFolder UTILS

I have set the Custom Action Working Directory to UTILS.

This is not working, it tries to call the EXE from C:\WINNT what ever I try and do.

Can anyone see what I am doing wrong?

Thanks

Dan
(3) Replies
For others to get a better picture on your problem, you will need to provide complete configurations on your custom action.
CChong
By Level 11 Flexeran
Level 11 Flexeran
I need to disable a service as part of my installation (if I do not do this, the application produces an error message when launched).

I am using an NT Resource Kit utility called SC.exe that lets you disable a service. The file is located in C:\WINNT\UTILS.

I have created an EXE Custom Action with Path referencing a directory. The working directory is UTILS and the filename and command line is:

sc config PolicyAgent start= disabled

It is set for Synchronous (ignores exit code), Deferred Execution and the Install Exec Sequence is After InstallFiles.
You are using Custom Action Type 34 (EXE file having a path referencing a directory), the Target column of the CustomAction table contains the full path and name of the executable file followed by optional arguments to the executable. You will want to use full path to sc.exe.[code][UTILS]sc.exe config PolicyAgent start=disabled[/code]You will want to familiarize yourself with basic types of custom actions, and expected parameter in Source column, and Target column of CustomAction table, as illustrated in Summary List of All Custom Action Types.