Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-23-2003, 11:19 AM
philip philip is online now
Registered User
 
Join Date: 09-23-2003
Posts: 5
Scheduled task fails with unspecified error at VB compile step

I have set up a Visual Build project (using a registered installation of Visual Build Pro v5.0) that succeeds when I am logged in, but not when run as a scheduled task when no-one is logged in.

The operating system on the machine is NT4-SP6a with IE 6.0. I set up the build project to run as a scheduled task (and changed the command line from VisBuildPro.exe to VisBuildCmd.exe so that it should run without a logged-in user). The build project runs successfully when run interactively and also when the scheduled task is run while I am logged in to the system. However, if I am not logged in when the shceduled task runs, it fails partway through. The build is able to start, checkout some files from Visual SourceSafe, etc, but when it attempts to compile a VB DLL, it logs this error:

Building subroutine step 'Build DLL'...
setting version...setting project compatibility...building...Unspecified error

and terminates.
Reply With Quote
  #2  
Old 09-23-2003, 10:47 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Typically, you specify a user that the scheduled task will run under ('Task | Run as' in the task properties), and that user's credentials are used for that task, independent of any logged in user (or no logged in user). Is your task somehow configured to run as the Interactive user or something? Which version/SP of Windows are you running on?
Reply With Quote
  #3  
Old 09-24-2003, 10:00 AM
philip philip is online now
Registered User
 
Join Date: 09-23-2003
Posts: 5
Using valid username/password

For testing, I have set up the scheduled task to run as my own (Windows domain) username/password. The scheduled task starts correctly and is able to perform other operations before the failed step (read a value from an INI file, get files and checkout files from a remote SourceSafe database, etc). It starts to compile the VB project and fails with the "unspecified error" message. I have tried changing the first VB project that is compiled in the build, but it always fails with the "unspecified error" regardless of which VB project is being compiled. The build runs successfully to completion if I am logged in to the system when the scheduled task starts.

The operating system is Windows NT4 with service pack 6a(revised) and with the latest version of Internet Explorer (IE6 with SP1) installed.
Reply With Quote
  #4  
Old 09-24-2003, 03:23 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
The step is failing at the point that the Make VB6 action tries to retrieve the TEMP environment variable. For some reason, on Windows NT, a scheduled task doesn't get the user environment variables of the user the task is run under (it appears to use the system variables if no user is logged on and the interactive user's variables if someone is logged on). Also, by default, Windows NT doesn't define a TEMP environment variable at the system level (only for users), and so the step fails retrieving the variable because it doesn't exist.

The problem can be resolved by adding a system level TEMP environment variable (Control Panel | System | Environment) and setting it to a valid path. Make sure to reboot as well, since the change doesn't seem to take effect until after you do.
Reply With Quote
  #5  
Old 09-25-2003, 03:42 PM
philip philip is online now
Registered User
 
Join Date: 09-23-2003
Posts: 5
System level TEMP variable fixed this

Adding the system level TEMP environment variable fixed the problem. Thanks very much.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:29 PM.


Copyright © 1999-2023 Kinook Software, Inc.