Initial commit: Inno Setup installer packages
Installer packages for GE manufacturing tools: - BlueSSOFix: Blue SSO authentication fix - HIDCardPrinter: HID card printer setup - HPOfflineInstaller: HP printer offline installer - MappedDrive: Network drive mapping - PrinterInstaller: General printer installer - ShopfloorConnect: Shopfloor connectivity tool - XeroxOfflineInstaller: Xerox printer offline installer 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
311
ShopfloorConnect/IMPROVEMENTS.md
Normal file
311
ShopfloorConnect/IMPROVEMENTS.md
Normal file
@@ -0,0 +1,311 @@
|
||||
# ShopfloorConnect Installer Improvements
|
||||
|
||||
**Date**: 2025-10-10
|
||||
**Version**: 1.1
|
||||
|
||||
## Changes Made
|
||||
|
||||
### 1. Fixed Output Directory Path (Line 16)
|
||||
|
||||
**Before**:
|
||||
```pascal
|
||||
OutputDir=C:\Users\570005354\Downloads\Output
|
||||
```
|
||||
|
||||
**After**:
|
||||
```pascal
|
||||
OutputDir=.\Output
|
||||
```
|
||||
|
||||
**Reason**: The hardcoded user path would fail when building on different machines. Using a relative path `.\Output` creates the output directory next to the `.iss` script file.
|
||||
|
||||
---
|
||||
|
||||
### 2. Added Comprehensive Error Handling
|
||||
|
||||
**Before**:
|
||||
- No error checking on `Exec()` calls
|
||||
- No validation of result codes
|
||||
- Installation continued even if steps failed
|
||||
- No feedback if something went wrong
|
||||
|
||||
**After**:
|
||||
- ✅ Checks both `Exec()` return value AND `ResultCode`
|
||||
- ✅ Shows detailed error messages with error codes
|
||||
- ✅ Exits installation on failure (prevents cascading errors)
|
||||
- ✅ Provides remediation steps in error messages
|
||||
- ✅ Validates that configuration file was created
|
||||
|
||||
---
|
||||
|
||||
### 3. Fixed Batch File Pause Issue (Line 61)
|
||||
|
||||
**Problem**: The `install.bat` file has a `pause` command at the end (line 93), which would hang the installer waiting for user input.
|
||||
|
||||
**Solution**: Added `echo. |` to pipe a newline to the batch file, automatically responding to the pause:
|
||||
|
||||
```pascal
|
||||
// Before
|
||||
Exec('cmd.exe', '/c cd /d "C:\ShopFloorConnect\MachineToolClient_Service" && call install.bat', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
|
||||
|
||||
// After
|
||||
Exec('cmd.exe', '/c cd /d "C:\ShopFloorConnect\MachineToolClient_Service" && echo. | call install.bat', '', SW_SHOW, ewWaitUntilTerminated, ResultCode);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. Added Comprehensive Installation Validation (Lines 73-130)
|
||||
|
||||
**New Features**: After running installation steps, the installer now performs multiple validation checks:
|
||||
|
||||
#### 4a. Verify FIT-MI_Server Folder Created (Lines 73-85)
|
||||
```pascal
|
||||
if not DirExists('C:\ShopFloorConnect\FIT-MI_Server') then
|
||||
begin
|
||||
MsgBox('Installation Error: FIT-MI_Server folder not created!' + ...);
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
This checks that the Ant build script successfully created the service folder structure.
|
||||
|
||||
#### 4b. Verify Windows Service Registration (Lines 87-106)
|
||||
```pascal
|
||||
// Query the Windows service
|
||||
if not Exec('cmd.exe', '/c sc query SFCMTCService', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
begin
|
||||
MsgBox('Warning: Unable to query Windows service!' + ...);
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if ResultCode <> 0 then
|
||||
begin
|
||||
MsgBox('Service Registration Failed!' + ...);
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
This verifies that the Windows service "SFCMTCService" was actually registered and is queryable.
|
||||
|
||||
#### 4c. Verify Configuration File Created (Lines 121-130)
|
||||
```pascal
|
||||
if not FileExists('C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini') then
|
||||
begin
|
||||
MsgBox('Configuration Error: mi_server.ini not found!' + ...);
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
This ensures the critical configuration file was created and populated.
|
||||
|
||||
**Why These Checks Matter**: These validations catch installation failures early and provide specific error messages with remediation steps, preventing the "Installation Complete!" message from showing when installation actually failed.
|
||||
|
||||
---
|
||||
|
||||
### 5. Enhanced Error Messages and Success Confirmation
|
||||
|
||||
All error messages now include:
|
||||
- Clear description of what failed
|
||||
- Error codes when available
|
||||
- Specific file paths involved
|
||||
- Remediation steps (what to do manually)
|
||||
|
||||
**Example Error**:
|
||||
```
|
||||
Service Registration Failed!
|
||||
|
||||
The Windows service "SFCMTCService" was not created.
|
||||
Error Code: 1060
|
||||
|
||||
The installation may have completed, but the service was not registered.
|
||||
|
||||
You may need to manually register the service by running:
|
||||
C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin\SFC_MTC_Tomcat_service.bat install
|
||||
```
|
||||
|
||||
**Enhanced Success Message** (Lines 132-145):
|
||||
The completion message now includes service details and instructions:
|
||||
```
|
||||
Installation Complete!
|
||||
|
||||
The ShopfloorConnect MTC Service has been installed and configured.
|
||||
|
||||
Windows Service: SFCMTCService (Registered)
|
||||
Startup Type: Delayed Automatic
|
||||
Site Configuration: West Jefferson CA-LR
|
||||
Teamcenter Server: 10.233.113.141
|
||||
Shop Floor PC FQDN: Auto-detected
|
||||
|
||||
Config file: C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini
|
||||
|
||||
To start the service:
|
||||
1. Open Services (services.msc)
|
||||
2. Find "SFCMTCService"
|
||||
3. Right-click → Start
|
||||
|
||||
Or run: sc start SFCMTCService
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Installation Flow (Updated)
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ 1. Copy files to C:\ShopFloorConnect│
|
||||
│ (169MB - Java + MTC Service) │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ 2. Set Environment Variable │
|
||||
│ setx /m TCFITDIR=C:\ShopFloorConnect
|
||||
│ ✓ Error check: Exit if failed │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ 3. Install MTC Service │
|
||||
│ cd MachineToolClient_Service │
|
||||
│ echo. | call install.bat │
|
||||
│ (Ant build creates FIT-MI_Server)│
|
||||
│ (Registers SFCMTCService) │
|
||||
│ ✓ Error check: Exit if failed │
|
||||
│ ✓ Auto-respond to pause │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼ (Sleep 3 seconds)
|
||||
│
|
||||
┌─────────────────────────────────────┐
|
||||
│ 3a. Verify FIT-MI_Server Created │
|
||||
│ Check folder exists │
|
||||
│ ✓ Error: Exit if not found │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ 3b. Verify Service Registration │
|
||||
│ sc query SFCMTCService │
|
||||
│ ✓ Error: Exit if not registered │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ 4. Configure Site Settings │
|
||||
│ cd C:\ShopFloorConnect │
|
||||
│ call 3 - West_Jeff_CA_LR_Update_ini_File.bat
|
||||
│ ✓ Error check: Exit if failed │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ 4a. Verify Configuration File │
|
||||
│ Check mi_server.ini exists │
|
||||
│ ✓ Error: Exit if not found │
|
||||
└──────────────┬──────────────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────────────┐
|
||||
│ ✓ Installation Complete! │
|
||||
│ Show success message with: │
|
||||
│ - Service name and status │
|
||||
│ - Configuration details │
|
||||
│ - Instructions to start service │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Testing Recommendations
|
||||
|
||||
### Test Case 1: Successful Installation
|
||||
1. Run installer on clean Windows PC with admin rights
|
||||
2. Verify all 3 steps execute without errors
|
||||
3. Confirm success message appears
|
||||
4. Check that `mi_server.ini` file exists and contains correct settings
|
||||
|
||||
### Test Case 2: Missing Admin Rights
|
||||
1. Run installer without admin rights
|
||||
2. Should fail at Step 2 (setx /m)
|
||||
3. Should show error: "Failed to set TCFITDIR environment variable!"
|
||||
|
||||
### Test Case 3: Installation Failure Recovery
|
||||
1. Simulate failure by renaming `install.bat` temporarily
|
||||
2. Run installer
|
||||
3. Should fail at Step 3 with error message
|
||||
4. Should NOT show "Installation Complete!" message
|
||||
5. Should provide manual remediation steps
|
||||
|
||||
### Test Case 4: Configuration File Verification
|
||||
1. Run installer normally
|
||||
2. If `install.bat` fails silently (doesn't create FIT-MI_Server folder)
|
||||
3. Should catch this at Step 5 (file validation)
|
||||
4. Should show: "Configuration file not found"
|
||||
|
||||
---
|
||||
|
||||
## Compatibility Notes
|
||||
|
||||
- **Inno Setup Version**: Requires Inno Setup 6 or later
|
||||
- **Windows**: Windows 7 and later (x64)
|
||||
- **Admin Rights**: Required for `setx /m` and Windows service installation
|
||||
- **Dependencies**: None (all files included in installer)
|
||||
|
||||
---
|
||||
|
||||
## Known Limitations
|
||||
|
||||
1. **Site-Specific**: Hardcoded for West Jefferson CA-LR
|
||||
- To change sites, must edit line 59 and rebuild installer
|
||||
- Future: Could add wizard page for site selection
|
||||
|
||||
2. **Single Installation Path**: Fixed to `C:\ShopFloorConnect`
|
||||
- Cannot be changed by user during installation
|
||||
- This is intentional (service expects this path)
|
||||
|
||||
3. **No Rollback**: If installation fails mid-way
|
||||
- Files remain in C:\ShopFloorConnect
|
||||
- Environment variable may be set
|
||||
- User must manually clean up or re-run installer
|
||||
|
||||
---
|
||||
|
||||
## Files Modified
|
||||
|
||||
- `ShopfloorConnect.iss` - Main installer script (improved error handling)
|
||||
- `README.md` - Enhanced troubleshooting section
|
||||
- `IMPROVEMENTS.md` - This file (new)
|
||||
|
||||
## Files Unchanged
|
||||
|
||||
- `Run_ShopfloorConnect_Installer.bat` - Batch launcher (still valid)
|
||||
- `ShopFloorConnect/` - Source files (no changes needed)
|
||||
- `*.bmp`, `*.ico` - Image assets (no changes)
|
||||
|
||||
---
|
||||
|
||||
## Next Steps (Optional Enhancements)
|
||||
|
||||
1. **Add Site Selection Wizard Page**
|
||||
- Let user choose between West Jeff / Rotating Parts / Wilmington
|
||||
- Eliminates need to rebuild installer for different sites
|
||||
|
||||
2. **Add Installation Logging**
|
||||
- Create `C:\ShopFloorConnect\install.log` with timestamps
|
||||
- Log each step and result code
|
||||
- Helpful for troubleshooting
|
||||
|
||||
3. **Add Pre-Installation Checks**
|
||||
- Verify Windows version
|
||||
- Check available disk space (needs ~200MB)
|
||||
- Detect if service already installed
|
||||
|
||||
4. **Add Uninstaller Enhancements**
|
||||
- Stop service before uninstalling
|
||||
- Remove environment variable
|
||||
- Prompt to keep configuration files
|
||||
|
||||
---
|
||||
|
||||
**Reviewed By**: Claude Code
|
||||
**Status**: Ready for testing and deployment
|
||||
193
ShopfloorConnect/README.md
Normal file
193
ShopfloorConnect/README.md
Normal file
@@ -0,0 +1,193 @@
|
||||
# ShopfloorConnect MTC Service Installer
|
||||
|
||||
Single-click installer for the ShopfloorConnect Machine Tool Client (MTC) Service for West Jefferson CA-LR facility.
|
||||
|
||||
## Overview
|
||||
|
||||
This Inno Setup installer automates the manual 9-step installation process for the MTC Service, which integrates shop floor machines with the Teamcenter PLM system.
|
||||
|
||||
**Configuration:**
|
||||
- **Site**: West Jefferson CA-LR
|
||||
- **Teamcenter Server**: 10.233.113.141
|
||||
- **Shop Floor PC FQDN**: Auto-detected (hostname.logon.ds.ge.com format)
|
||||
- **Installation Path**: C:\ShopFloorConnect\
|
||||
|
||||
## What the Installer Does
|
||||
|
||||
1. **Copies Files** - Installs 175MB of MTC Service files to C:\ShopFloorConnect\
|
||||
- Java runtime environment
|
||||
- MTC Service application
|
||||
- Configuration scripts
|
||||
- Documentation
|
||||
|
||||
2. **Sets Environment Variable** - Creates `TCFITDIR=C:\ShopFloorConnect`
|
||||
|
||||
3. **Installs MTC Service** - Runs `install.bat` to register Windows service
|
||||
|
||||
4. **Configures Connection** - Runs West Jefferson configuration batch file to:
|
||||
- Auto-detect local PC's FQDN
|
||||
- Configure mi_server.ini with Teamcenter IP and local FQDN
|
||||
- Set site-specific parameters
|
||||
|
||||
## Files
|
||||
|
||||
```
|
||||
ShopfloorConnect/
|
||||
├── ShopfloorConnect.iss # Main installer script
|
||||
├── Run_ShopfloorConnect_Installer.bat # Batch launcher (admin check)
|
||||
├── gea-logo.ico # GE Aerospace logo
|
||||
├── patrick.bmp # Wizard image
|
||||
├── patrick-sm.bmp # Small wizard image
|
||||
└── ShopFloorConnect/ # Source files (175MB)
|
||||
├── Java/ # Java runtime
|
||||
├── MachineToolClient_Service/ # MTC service files
|
||||
├── FIT-MI_Server/ # Server configuration
|
||||
└── *.bat # Installation scripts
|
||||
```
|
||||
|
||||
## Building the Installer
|
||||
|
||||
**Requirements:**
|
||||
- Windows machine with Inno Setup 6 installed
|
||||
- All source files in ShopFloorConnect/ directory
|
||||
|
||||
**Steps:**
|
||||
1. Copy entire ShopfloorConnect project folder to Windows machine
|
||||
2. Open `ShopfloorConnect.iss` in Inno Setup Compiler
|
||||
3. Press F9 to compile
|
||||
4. Output: `ShopfloorConnect_Installer.exe` in configured OutputDir
|
||||
|
||||
## Running the Installer
|
||||
|
||||
### Method 1: Direct (Requires Admin)
|
||||
```cmd
|
||||
ShopfloorConnect_Installer.exe
|
||||
```
|
||||
|
||||
### Method 2: Using Batch Launcher (Recommended)
|
||||
```cmd
|
||||
Run_ShopfloorConnect_Installer.bat
|
||||
```
|
||||
The batch file checks for admin privileges and shows clear error messages if not running as administrator.
|
||||
|
||||
## Post-Installation
|
||||
|
||||
**Windows Service:**
|
||||
- **Service Name**: `SFCMTCService`
|
||||
- **Display Name**: ShopfloorConnect MTC Service
|
||||
- **Startup Type**: Delayed Automatic
|
||||
- **Status**: Installed (not started automatically)
|
||||
|
||||
**To Start the Service:**
|
||||
1. Open Services (Win+R, type `services.msc`)
|
||||
2. Find "SFCMTCService"
|
||||
3. Right-click → Start
|
||||
|
||||
Or via command line:
|
||||
```cmd
|
||||
sc start SFCMTCService
|
||||
```
|
||||
|
||||
**Configuration File Location:**
|
||||
```
|
||||
C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini
|
||||
```
|
||||
|
||||
**Key Settings:**
|
||||
- `fsw_ip=10.233.113.141` (Teamcenter server)
|
||||
- `local_ip=<your-hostname>.logon.ds.ge.com` (Auto-detected)
|
||||
- `fsw_port=8080/tcdnc/services` (Teamcenter port)
|
||||
|
||||
## Manual Installation Alternative
|
||||
|
||||
If you need to install manually, see the Word document in the extracted files for the 9-step process:
|
||||
```
|
||||
ShopFloorConnect/ShopFloorConnect_Installation_Instructions.doc
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Issue**: Installer fails with "Access Denied"
|
||||
- **Solution**: Run as Administrator using the batch launcher
|
||||
|
||||
**Issue**: "Failed to set TCFITDIR environment variable"
|
||||
- **Solution**: Ensure you're running as Administrator
|
||||
- Manually set via: System Properties → Advanced → Environment Variables
|
||||
- Add system variable: `TCFITDIR=C:\ShopFloorConnect`
|
||||
|
||||
**Issue**: "Failed to execute MTC Service installer"
|
||||
- **Solution**: Check that all files were copied to C:\ShopFloorConnect
|
||||
- Verify Java runtime exists at C:\ShopFloorConnect\Java\j2sdk
|
||||
- Check Windows Event Viewer for detailed errors
|
||||
|
||||
**Issue**: "Failed to configure site settings"
|
||||
- **Solution**: The service may be installed but not configured
|
||||
- Manually run: `C:\ShopFloorConnect\3 - West_Jeff_CA_LR_Update_ini_File.bat`
|
||||
- Verify FIT-MI_Server folder was created by install.bat
|
||||
|
||||
**Issue**: "FIT-MI_Server folder not created"
|
||||
- **Solution**: The install.bat Ant build script failed
|
||||
- Check that TCFITDIR environment variable was set
|
||||
- Verify Java runtime exists at: `C:\ShopFloorConnect\Java\j2sdk`
|
||||
- Check you have write permissions to C:\ShopFloorConnect
|
||||
- Try running install.bat manually from: `C:\ShopFloorConnect\MachineToolClient_Service\`
|
||||
|
||||
**Issue**: "Service Registration Failed"
|
||||
- **Solution**: The Windows service SFCMTCService was not created
|
||||
- Check Windows Event Viewer for service registration errors
|
||||
- Verify you're running as Administrator
|
||||
- Manually register the service:
|
||||
```cmd
|
||||
cd C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin
|
||||
SFC_MTC_Tomcat_service.bat install
|
||||
```
|
||||
|
||||
**Issue**: "Configuration file not found"
|
||||
- **Solution**: The mi_server.ini file was not created
|
||||
- This usually means the Ant build script didn't complete
|
||||
- Verify FIT-MI_Server folder exists
|
||||
- Check that install.bat completed without errors
|
||||
|
||||
**Issue**: Service won't start
|
||||
- **Solution**: Check that TCFITDIR environment variable is set correctly
|
||||
- Verify mi_server.ini configuration exists and is valid
|
||||
- Check Windows Event Viewer for service errors
|
||||
- Verify Windows service "SFCMTCService" is registered
|
||||
|
||||
**Issue**: Cannot connect to Teamcenter
|
||||
- **Solution**: Verify network connectivity to 10.233.113.141
|
||||
- Check FQDN in mi_server.ini matches your PC
|
||||
- Verify Windows Firewall settings
|
||||
- Check if port 8080 is accessible
|
||||
|
||||
## Configuration for Other Sites
|
||||
|
||||
This installer is configured specifically for West Jefferson CA-LR. For other sites:
|
||||
|
||||
1. Edit `ShopfloorConnect.iss` line 59
|
||||
2. Change to appropriate batch file:
|
||||
- `3 - West_Jeff_CA_LR_Update_ini_File.bat` (current)
|
||||
- `3 - Rotating_Parts_Lean_Lab_Update_ini_File.bat`
|
||||
- `3 - Wilmington_Update_ini_File.bat`
|
||||
3. Update welcome message in `[Messages]` section
|
||||
4. Rebuild installer
|
||||
|
||||
## Technical Details
|
||||
|
||||
**Installer Engine**: Inno Setup 6
|
||||
**Compression**: Solid compression (lzma)
|
||||
**Admin Required**: Yes
|
||||
**Install Directory**: Fixed (C:\ShopFloorConnect)
|
||||
**Uninstaller**: Standard Windows uninstall
|
||||
|
||||
**Source Files**: Extracted from `ShopFloorConnect.zip` (175MB)
|
||||
|
||||
## Support
|
||||
|
||||
For issues or questions:
|
||||
- **Internal URL**: http://tsgwp00524.logon.ds.ge.com
|
||||
- **Project Location**: `/home/camp/projects/inno/ShopfloorConnect/`
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-10-10
|
||||
59
ShopfloorConnect/Run_ShopfloorConnect_Installer.bat
Normal file
59
ShopfloorConnect/Run_ShopfloorConnect_Installer.bat
Normal file
@@ -0,0 +1,59 @@
|
||||
@echo off
|
||||
REM ShopfloorConnect Installer Launcher
|
||||
REM This batch file runs the ShopfloorConnect installer with admin privileges
|
||||
|
||||
echo ========================================
|
||||
echo ShopfloorConnect MTC Service Installer
|
||||
echo ========================================
|
||||
echo.
|
||||
echo This will install the ShopfloorConnect MTC Service.
|
||||
echo.
|
||||
echo Requirements:
|
||||
echo - Administrator privileges
|
||||
echo - Windows 7 or newer
|
||||
echo - Approximately 200MB disk space
|
||||
echo.
|
||||
pause
|
||||
|
||||
REM Check if running as administrator
|
||||
net session >nul 2>&1
|
||||
if %errorLevel% == 0 (
|
||||
echo Running as Administrator... OK
|
||||
echo.
|
||||
) else (
|
||||
echo ERROR: This script must be run as Administrator!
|
||||
echo.
|
||||
echo Please right-click this file and select "Run as administrator"
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Check if installer exists
|
||||
if not exist "%~dp0ShopfloorConnect_Installer.exe" (
|
||||
echo ERROR: ShopfloorConnect_Installer.exe not found!
|
||||
echo.
|
||||
echo Please ensure the installer is in the same folder as this batch file.
|
||||
echo Current location: %~dp0
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Run the installer
|
||||
echo Starting installer...
|
||||
echo.
|
||||
"%~dp0ShopfloorConnect_Installer.exe"
|
||||
|
||||
REM Check exit code
|
||||
if %errorLevel% == 0 (
|
||||
echo.
|
||||
echo Installation completed successfully.
|
||||
) else (
|
||||
echo.
|
||||
echo Installation failed or was cancelled.
|
||||
echo Exit code: %errorLevel%
|
||||
)
|
||||
|
||||
echo.
|
||||
pause
|
||||
401
ShopfloorConnect/SERVICE_VALIDATION.md
Normal file
401
ShopfloorConnect/SERVICE_VALIDATION.md
Normal file
@@ -0,0 +1,401 @@
|
||||
# Windows Service Validation in ShopfloorConnect Installer
|
||||
|
||||
**Date**: 2025-10-10
|
||||
**Feature**: Automated Windows Service Registration Verification
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The ShopfloorConnect installer now includes comprehensive validation to ensure the Windows service `SFCMTCService` is properly registered during installation.
|
||||
|
||||
---
|
||||
|
||||
## What Service Gets Installed?
|
||||
|
||||
### Service Details
|
||||
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Service Name** | `SFCMTCService` |
|
||||
| **Display Name** | Shop Floor Connect MTC Service |
|
||||
| **Description** | Machine Tool Client Service for Teamcenter integration |
|
||||
| **Executable** | `C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin\SFCMTCService.exe` |
|
||||
| **Startup Type** | Delayed Automatic |
|
||||
| **Account** | Local System (default) |
|
||||
| **Dependencies** | None |
|
||||
|
||||
### Service Architecture
|
||||
|
||||
The service is based on **Apache Tomcat 5.0** wrapped as a Windows service:
|
||||
- Uses `tomcat8_64.exe` service wrapper (renamed to `SFCMTCService.exe`)
|
||||
- Hosts the MTC web application (`wut.war`)
|
||||
- Communicates with Teamcenter PLM server (10.233.113.141)
|
||||
- Listens on local ports:
|
||||
- HTTP: 8090
|
||||
- HTTPS: 8493
|
||||
- Shutdown: 8006
|
||||
|
||||
---
|
||||
|
||||
## How Service Registration Works
|
||||
|
||||
### Installation Chain
|
||||
|
||||
```
|
||||
ShopfloorConnect.iss
|
||||
│
|
||||
└─► Step 2: install.bat
|
||||
│
|
||||
├─► Sets TCFITDIR environment variable
|
||||
│
|
||||
└─► Calls: Java + Apache Ant + ant_install.xml
|
||||
│
|
||||
├─► Extracts mi_server.jar
|
||||
├─► Copies Tomcat files to FIT-MI_Server/
|
||||
├─► Renames tomcat8_64.exe → SFCMTCService.exe
|
||||
├─► Creates setenv.bat with paths
|
||||
│
|
||||
└─► Executes: SFC_MTC_Tomcat_service.bat install SFCMTCService delayed
|
||||
│
|
||||
└─► Registers Windows Service using Tomcat wrapper
|
||||
✓ Service: SFCMTCService
|
||||
✓ Startup: Delayed Automatic
|
||||
✓ Status: Stopped (installed but not started)
|
||||
```
|
||||
|
||||
### Key Files Involved
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `install.bat` | Detects TCFITDIR, calls Ant build |
|
||||
| `ant_install.xml` | Apache Ant build script (588 lines) |
|
||||
| `mi_server.jar` | Contains Tomcat server and web app |
|
||||
| `tomcat8_64.exe` | Apache Tomcat service wrapper |
|
||||
| `SFC_MTC_Tomcat_service.bat` | Service registration script |
|
||||
| `mi_server.ini` | MTC configuration (created by Ant) |
|
||||
|
||||
---
|
||||
|
||||
## Validation Checks in Installer
|
||||
|
||||
The installer performs **three validation checks** after running `install.bat`:
|
||||
|
||||
### Check 1: FIT-MI_Server Folder Exists
|
||||
```pascal
|
||||
if not DirExists('C:\ShopFloorConnect\FIT-MI_Server') then
|
||||
begin
|
||||
MsgBox('Installation Error: FIT-MI_Server folder not created!');
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
**What it validates**:
|
||||
- The Ant build script successfully extracted and copied files
|
||||
- The folder structure was created
|
||||
|
||||
**Typical failure reasons**:
|
||||
- TCFITDIR not set before running install.bat
|
||||
- Java runtime not found
|
||||
- Disk write permissions issue
|
||||
|
||||
---
|
||||
|
||||
### Check 2: Windows Service Registered
|
||||
```pascal
|
||||
// Query the service using sc.exe
|
||||
if not Exec('cmd.exe', '/c sc query SFCMTCService', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then
|
||||
begin
|
||||
MsgBox('Warning: Unable to query Windows service!');
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// Check if service exists
|
||||
if ResultCode <> 0 then
|
||||
begin
|
||||
MsgBox('Service Registration Failed!');
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
**What it validates**:
|
||||
- Windows service `SFCMTCService` is registered in Service Control Manager
|
||||
- Service is queryable via `sc.exe`
|
||||
|
||||
**Typical failure reasons**:
|
||||
- SFC_MTC_Tomcat_service.bat failed to execute
|
||||
- Insufficient admin privileges
|
||||
- Service wrapper executable missing
|
||||
- Service name conflict (service already exists with different config)
|
||||
|
||||
**Return Codes**:
|
||||
- `0` = Service exists and is queryable ✓
|
||||
- `1060` = Service does not exist (ERROR_SERVICE_DOES_NOT_EXIST)
|
||||
- `5` = Access denied (not admin)
|
||||
|
||||
---
|
||||
|
||||
### Check 3: Configuration File Created
|
||||
```pascal
|
||||
if not FileExists('C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini') then
|
||||
begin
|
||||
MsgBox('Configuration Error: mi_server.ini not found!');
|
||||
Exit;
|
||||
end;
|
||||
```
|
||||
|
||||
**What it validates**:
|
||||
- The Ant script completed successfully
|
||||
- Configuration file was created from template
|
||||
- Web application structure is intact
|
||||
|
||||
**Typical failure reasons**:
|
||||
- Ant build interrupted or failed
|
||||
- Template file missing in mi_server.jar
|
||||
- Web app deployment failed
|
||||
|
||||
---
|
||||
|
||||
## Service Commands
|
||||
|
||||
### Query Service Status
|
||||
```cmd
|
||||
sc query SFCMTCService
|
||||
```
|
||||
|
||||
**Sample Output (Stopped)**:
|
||||
```
|
||||
SERVICE_NAME: SFCMTCService
|
||||
TYPE : 10 WIN32_OWN_PROCESS
|
||||
STATE : 1 STOPPED
|
||||
WIN32_EXIT_CODE : 1077 (0x435)
|
||||
SERVICE_EXIT_CODE : 0 (0x0)
|
||||
CHECKPOINT : 0x0
|
||||
WAIT_HINT : 0x0
|
||||
```
|
||||
|
||||
**Sample Output (Running)**:
|
||||
```
|
||||
SERVICE_NAME: SFCMTCService
|
||||
TYPE : 10 WIN32_OWN_PROCESS
|
||||
STATE : 4 RUNNING
|
||||
WIN32_EXIT_CODE : 0 (0x0)
|
||||
SERVICE_EXIT_CODE : 0 (0x0)
|
||||
CHECKPOINT : 0x0
|
||||
WAIT_HINT : 0x0
|
||||
```
|
||||
|
||||
### Start Service
|
||||
```cmd
|
||||
sc start SFCMTCService
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```cmd
|
||||
net start SFCMTCService
|
||||
```
|
||||
|
||||
### Stop Service
|
||||
```cmd
|
||||
sc stop SFCMTCService
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```cmd
|
||||
net stop SFCMTCService
|
||||
```
|
||||
|
||||
### Delete Service (Uninstall)
|
||||
```cmd
|
||||
sc delete SFCMTCService
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```cmd
|
||||
cd C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin
|
||||
SFC_MTC_Tomcat_service.bat remove
|
||||
```
|
||||
|
||||
### View Service Configuration
|
||||
```cmd
|
||||
sc qc SFCMTCService
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Manual Service Registration
|
||||
|
||||
If the installer fails to register the service, you can do it manually:
|
||||
|
||||
### Method 1: Using Batch File (Recommended)
|
||||
```cmd
|
||||
cd C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin
|
||||
SFC_MTC_Tomcat_service.bat install SFCMTCService delayed
|
||||
```
|
||||
|
||||
### Method 2: Using Service Wrapper Directly
|
||||
```cmd
|
||||
cd C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin
|
||||
SFCMTCService.exe //IS//SFCMTCService --DisplayName="Shop Floor Connect MTC Service" --Startup=delayed
|
||||
```
|
||||
|
||||
### Verify Registration
|
||||
```cmd
|
||||
sc query SFCMTCService
|
||||
```
|
||||
|
||||
Should return service information (not error 1060).
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting Service Issues
|
||||
|
||||
### Service Shows "Error 1060" (Not Found)
|
||||
**Cause**: Service was not registered
|
||||
|
||||
**Solutions**:
|
||||
1. Check installer error messages for clues
|
||||
2. Manually register using batch file (see above)
|
||||
3. Verify service executable exists:
|
||||
```cmd
|
||||
dir "C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\bin\SFCMTCService.exe"
|
||||
```
|
||||
|
||||
### Service Won't Start (Error 1053)
|
||||
**Cause**: Service failed to start within timeout period
|
||||
|
||||
**Solutions**:
|
||||
1. Check TCFITDIR environment variable is set:
|
||||
```cmd
|
||||
echo %TCFITDIR%
|
||||
```
|
||||
Should output: `C:\ShopFloorConnect`
|
||||
|
||||
2. Verify Java runtime exists:
|
||||
```cmd
|
||||
"C:\ShopFloorConnect\Java\j2sdk\jre\bin\java.exe" -version
|
||||
```
|
||||
|
||||
3. Check Windows Event Viewer:
|
||||
- Windows Logs → Application
|
||||
- Look for errors from "SFCMTCService" or "Apache Tomcat"
|
||||
|
||||
4. Check service logs:
|
||||
```
|
||||
C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\logs\
|
||||
```
|
||||
|
||||
### Service Installed but Not Visible in Services GUI
|
||||
**Cause**: Services console needs refresh
|
||||
|
||||
**Solution**:
|
||||
1. Close Services console (services.msc)
|
||||
2. Reopen it
|
||||
3. Or use `sc query SFCMTCService` from command line
|
||||
|
||||
### Service Starts but Immediately Stops
|
||||
**Cause**: Configuration error or port conflict
|
||||
|
||||
**Solutions**:
|
||||
1. Check if ports are already in use:
|
||||
```cmd
|
||||
netstat -ano | findstr ":8090"
|
||||
netstat -ano | findstr ":8493"
|
||||
```
|
||||
|
||||
2. Verify `mi_server.ini` configuration:
|
||||
```cmd
|
||||
notepad "C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini"
|
||||
```
|
||||
|
||||
3. Check Tomcat configuration:
|
||||
```cmd
|
||||
notepad "C:\ShopFloorConnect\FIT-MI_Server\Tomcat 5.0\conf\server.xml"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Service Startup Process
|
||||
|
||||
When the service starts:
|
||||
|
||||
1. **Windows Service Manager** launches `SFCMTCService.exe`
|
||||
2. **Service Wrapper** reads configuration from registry
|
||||
3. **Wrapper** sets environment variables from `setenv.bat`:
|
||||
- `TCFITDIR=C:\ShopFloorConnect`
|
||||
- `JAVA_HOME=C:\ShopFloorConnect\Java\j2sdk`
|
||||
4. **Wrapper** launches Java process with Tomcat
|
||||
5. **Tomcat** starts and deploys `wut.war` web application
|
||||
6. **MTC Application** reads `mi_server.ini` configuration
|
||||
7. **MTC** connects to Teamcenter server at 10.233.113.141
|
||||
8. **Service** reports "Running" status to Service Control Manager
|
||||
|
||||
**Total startup time**: ~30-60 seconds (delayed start adds additional delay)
|
||||
|
||||
---
|
||||
|
||||
## Registry Locations
|
||||
|
||||
Service configuration is stored in Windows Registry:
|
||||
|
||||
### Service Definition
|
||||
```
|
||||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SFCMTCService
|
||||
```
|
||||
|
||||
### Service Parameters
|
||||
```
|
||||
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SFCMTCService\Parameters
|
||||
```
|
||||
|
||||
**Key Values**:
|
||||
- `ImagePath`: Path to SFCMTCService.exe
|
||||
- `DisplayName`: "Shop Floor Connect MTC Service"
|
||||
- `Start`: 2 (Automatic - Delayed)
|
||||
- `Type`: 16 (SERVICE_WIN32_OWN_PROCESS)
|
||||
|
||||
---
|
||||
|
||||
## Comparison: Before vs After Validation
|
||||
|
||||
### Before (Original Installer)
|
||||
```
|
||||
install.bat runs → [unknown if successful] → Show "Installation Complete!"
|
||||
```
|
||||
|
||||
❌ No validation
|
||||
❌ Silent failures
|
||||
❌ No service verification
|
||||
❌ User discovers issues later when trying to start service
|
||||
|
||||
### After (Improved Installer)
|
||||
```
|
||||
install.bat runs → Validate folder → Validate service → Validate config → Success
|
||||
↓ ↓ ↓
|
||||
Show error Show error Show error
|
||||
```
|
||||
|
||||
✓ Comprehensive validation
|
||||
✓ Early error detection
|
||||
✓ Specific error messages
|
||||
✓ Remediation guidance
|
||||
✓ Only shows success when truly successful
|
||||
|
||||
---
|
||||
|
||||
## Related Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `ShopfloorConnect.iss` | Main installer script with validation |
|
||||
| `IMPROVEMENTS.md` | Full list of installer improvements |
|
||||
| `README.md` | User documentation with troubleshooting |
|
||||
| `SERVICE_VALIDATION.md` | This file |
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-10-10
|
||||
**Version**: 1.1 (with service validation)
|
||||
@@ -0,0 +1 @@
|
||||
setx /m TCFITDIR "C:\ShopFloorConnect"
|
||||
@@ -0,0 +1,2 @@
|
||||
cd "C:\ShopFloorConnect\MachineToolClient_Service\"
|
||||
call install.bat
|
||||
@@ -0,0 +1,86 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Define variables for the fields to be updated
|
||||
set "original_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini"
|
||||
set "backup_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server_backup.ini"
|
||||
set "fsw_ip=10.233.108.152"
|
||||
set "fsw_port=8080/tcdnc/services"
|
||||
|
||||
:: Get the computer's Fully Qualified Domain Name (FQDN) using PowerShell
|
||||
for /f "usebackq delims=" %%A in (`powershell -NoProfile -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) do set "fqdn=%%A"
|
||||
|
||||
:: Display the FQDN for verification
|
||||
echo Computer FQDN: !fqdn!
|
||||
|
||||
|
||||
:: Create a temporary file for the updated content
|
||||
set "temp_file=%original_file%.tmp"
|
||||
|
||||
|
||||
:: Retry mechanism for deleting the temporary file
|
||||
set "retry_count=0"
|
||||
:retry_delete
|
||||
if exist "%temp_file%" (
|
||||
echo Attempting to delete temporary file "%temp_file%"...
|
||||
del "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to delete temporary file "%temp_file%". Retrying...
|
||||
set /a retry_count+=1
|
||||
if %retry_count% GEQ 5 (
|
||||
echo Error: Unable to delete temporary file after 5 attempts.
|
||||
exit /b 1
|
||||
)
|
||||
timeout /t 2 >nul
|
||||
goto retry_delete
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
:: Test temporary file creation
|
||||
echo Creating temporary file...
|
||||
echo Test > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to create temporary file "%temp_file%".
|
||||
echo Possible reasons:
|
||||
echo - File is locked or in use by another process.
|
||||
echo - Insufficient permissions to create files in the directory.
|
||||
echo - Disk space or file system issues.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Update the fields in the file
|
||||
echo Updating the ini file...
|
||||
(for /f "usebackq delims=" %%A in ("%original_file%") do (
|
||||
set "line=%%A"
|
||||
echo Processing line: !line! >nul
|
||||
:: Check for specific field names and update the entire line
|
||||
if /i "!line:local_ip =!" NEQ "!line!" (
|
||||
echo local_ip = !fqdn!
|
||||
) else if /i "!line:fsw_ip =!" NEQ "!line!" (
|
||||
echo fsw_ip = %fsw_ip%
|
||||
) else if /i "!line:fsw_port =!" NEQ "!line!" (
|
||||
echo fsw_port = %fsw_port%
|
||||
) else if /i "!line:RxEndTimeout =!" NEQ "!line!" (
|
||||
echo RxEndTimeout = 6000
|
||||
echo.
|
||||
) else (
|
||||
echo !line!
|
||||
)
|
||||
)) > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to update the fields in the file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Replace the original file with the updated file
|
||||
move /y "%temp_file%" "%original_file%" >nul
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to replace the original file with the updated file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo File updated successfully.
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Define variables for the fields to be updated
|
||||
set "original_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini"
|
||||
set "backup_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server_backup.ini"
|
||||
set "fsw_ip=10.233.113.141"
|
||||
set "fsw_port=8080/tcdnc/services"
|
||||
|
||||
:: Get the computer's Fully Qualified Domain Name (FQDN) using PowerShell
|
||||
for /f "usebackq delims=" %%A in (`powershell -NoProfile -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) do set "fqdn=%%A"
|
||||
|
||||
:: Display the FQDN for verification
|
||||
echo Computer FQDN: !fqdn!
|
||||
|
||||
|
||||
:: Create a temporary file for the updated content
|
||||
set "temp_file=%original_file%.tmp"
|
||||
|
||||
|
||||
:: Retry mechanism for deleting the temporary file
|
||||
set "retry_count=0"
|
||||
:retry_delete
|
||||
if exist "%temp_file%" (
|
||||
echo Attempting to delete temporary file "%temp_file%"...
|
||||
del "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to delete temporary file "%temp_file%". Retrying...
|
||||
set /a retry_count+=1
|
||||
if %retry_count% GEQ 5 (
|
||||
echo Error: Unable to delete temporary file after 5 attempts.
|
||||
exit /b 1
|
||||
)
|
||||
timeout /t 2 >nul
|
||||
goto retry_delete
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
:: Test temporary file creation
|
||||
echo Creating temporary file...
|
||||
echo Test > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to create temporary file "%temp_file%".
|
||||
echo Possible reasons:
|
||||
echo - File is locked or in use by another process.
|
||||
echo - Insufficient permissions to create files in the directory.
|
||||
echo - Disk space or file system issues.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Update the fields in the file
|
||||
echo Updating the ini file...
|
||||
(for /f "usebackq delims=" %%A in ("%original_file%") do (
|
||||
set "line=%%A"
|
||||
echo Processing line: !line! >nul
|
||||
:: Check for specific field names and update the entire line
|
||||
if /i "!line:local_ip =!" NEQ "!line!" (
|
||||
echo local_ip = !fqdn!
|
||||
) else if /i "!line:fsw_ip =!" NEQ "!line!" (
|
||||
echo fsw_ip = %fsw_ip%
|
||||
) else if /i "!line:fsw_port =!" NEQ "!line!" (
|
||||
echo fsw_port = %fsw_port%
|
||||
) else if /i "!line:RxEndTimeout =!" NEQ "!line!" (
|
||||
echo RxEndTimeout = 6000
|
||||
echo.
|
||||
) else (
|
||||
echo !line!
|
||||
)
|
||||
)) > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to update the fields in the file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Replace the original file with the updated file
|
||||
move /y "%temp_file%" "%original_file%" >nul
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to replace the original file with the updated file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo File updated successfully.
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Define variables for the fields to be updated
|
||||
set "original_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server.ini"
|
||||
set "backup_file=C:\ShopFloorConnect\FIT-MI_Server\webapps\wut\WEB-INF\conf\mi_server_backup.ini"
|
||||
set "fsw_ip=10.233.112.145"
|
||||
set "fsw_port=8080/tcdnc/services"
|
||||
|
||||
:: Get the computer's Fully Qualified Domain Name (FQDN) using PowerShell
|
||||
for /f "usebackq delims=" %%A in (`powershell -NoProfile -Command "[System.Net.Dns]::GetHostEntry('localhost').HostName"`) do set "fqdn=%%A"
|
||||
|
||||
:: Display the FQDN for verification
|
||||
echo Computer FQDN: !fqdn!
|
||||
|
||||
|
||||
:: Create a temporary file for the updated content
|
||||
set "temp_file=%original_file%.tmp"
|
||||
|
||||
|
||||
:: Retry mechanism for deleting the temporary file
|
||||
set "retry_count=0"
|
||||
:retry_delete
|
||||
if exist "%temp_file%" (
|
||||
echo Attempting to delete temporary file "%temp_file%"...
|
||||
del "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to delete temporary file "%temp_file%". Retrying...
|
||||
set /a retry_count+=1
|
||||
if %retry_count% GEQ 5 (
|
||||
echo Error: Unable to delete temporary file after 5 attempts.
|
||||
exit /b 1
|
||||
)
|
||||
timeout /t 2 >nul
|
||||
goto retry_delete
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
:: Test temporary file creation
|
||||
echo Creating temporary file...
|
||||
echo Test > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to create temporary file "%temp_file%".
|
||||
echo Possible reasons:
|
||||
echo - File is locked or in use by another process.
|
||||
echo - Insufficient permissions to create files in the directory.
|
||||
echo - Disk space or file system issues.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Update the fields in the file
|
||||
echo Updating the ini file...
|
||||
(for /f "usebackq delims=" %%A in ("%original_file%") do (
|
||||
set "line=%%A"
|
||||
echo Processing line: !line! >nul
|
||||
:: Check for specific field names and update the entire line
|
||||
if /i "!line:local_ip =!" NEQ "!line!" (
|
||||
echo local_ip = !fqdn!
|
||||
) else if /i "!line:fsw_ip =!" NEQ "!line!" (
|
||||
echo fsw_ip = %fsw_ip%
|
||||
) else if /i "!line:fsw_port =!" NEQ "!line!" (
|
||||
echo fsw_port = %fsw_port%
|
||||
) else if /i "!line:RxEndTimeout =!" NEQ "!line!" (
|
||||
echo RxEndTimeout = 6000
|
||||
echo.
|
||||
) else (
|
||||
echo !line!
|
||||
)
|
||||
)) > "%temp_file%"
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to update the fields in the file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: Replace the original file with the updated file
|
||||
move /y "%temp_file%" "%original_file%" >nul
|
||||
if errorlevel 1 (
|
||||
echo Error: Failed to replace the original file with the updated file.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo File updated successfully.
|
||||
|
||||
Binary file not shown.
63
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/NOTICE
Normal file
63
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/NOTICE
Normal file
@@ -0,0 +1,63 @@
|
||||
# Notices for Eclipse Temurin
|
||||
|
||||
This content is produced and maintained by the Eclipse Temurin project.
|
||||
|
||||
* Project home: https://projects.eclipse.org/projects/adoptium.temurin
|
||||
|
||||
## Trademarks
|
||||
|
||||
Eclipse Temurin is a trademark of the Eclipse Foundation. Eclipse, and the
|
||||
Eclipse Logo are registered trademarks of the Eclipse Foundation.
|
||||
|
||||
Java and all Java-based trademarks are trademarks of Oracle Corporation in
|
||||
the United States, other countries, or both.
|
||||
|
||||
## Copyright
|
||||
|
||||
All content is the property of the respective authors or their employers.
|
||||
For more information regarding authorship of content, please consult the
|
||||
listed source code repository logs.
|
||||
|
||||
## Declared Project Licenses
|
||||
|
||||
This program and the accompanying materials are made available under the terms
|
||||
of the GNU General Public License, version 2, with the Classpath Exception.
|
||||
|
||||
Additional information relating to the program and accompanying materials
|
||||
license and usage is available as follows.
|
||||
* For Eclipse Temurin version 8 see the LICENSE and ASSEMBLY_EXCEPTION files
|
||||
in the top level directory of the installation.
|
||||
* For Eclipse Temurin version 9 or later see the files under the legal/
|
||||
directory in the top level directory of the installation.
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0 WITH Classpath-exception-2.0
|
||||
|
||||
## Source Code
|
||||
|
||||
The project maintains the following source code repositories which may be
|
||||
relevant to this content:
|
||||
|
||||
* https://github.com/adoptium/temurin-build
|
||||
* https://github.com/adoptium/jdk
|
||||
* https://github.com/adoptium/jdk8u
|
||||
* https://github.com/adoptium/jdk11u
|
||||
* https://github.com/adoptium/jdk17u
|
||||
* https://github.com/adoptium/jdk20
|
||||
* and so on
|
||||
|
||||
## Third-party Content
|
||||
|
||||
This program and accompanying materials contains third-party content.
|
||||
* For Eclipse Temurin version 8 see the THIRD_PARTY_LICENSE file in the
|
||||
top level directory of the installation.
|
||||
* For Eclipse Temurin version 9 or later see the files under the legal/
|
||||
directory in the top level directory of the installation.
|
||||
|
||||
## Cryptography
|
||||
|
||||
Content may contain encryption software. The country in which you are currently
|
||||
may have restrictions on the import, possession, and use, and/or re-export to
|
||||
another country, of encryption software. BEFORE using any encryption software,
|
||||
please check the country's laws, regulations and policies concerning the import,
|
||||
possession, or use, and re-export of encryption software, to see if this is
|
||||
permitted.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/awt.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/awt.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/extnet.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/extnet.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/j2gss.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/j2gss.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/j2pcsc.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/j2pcsc.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jaas.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jaas.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/java.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/java.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jawt.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jawt.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jdwp.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jdwp.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jimage.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jimage.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jli.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jli.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jsound.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/jsound.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/lcms.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/lcms.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/le.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/le.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/net.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/net.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/nio.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/nio.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/prefs.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/prefs.dll
Normal file
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/rmi.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/rmi.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/sunec.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/sunec.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/unpack.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/unpack.dll
Normal file
Binary file not shown.
Binary file not shown.
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/verify.dll
Normal file
BIN
ShopfloorConnect/ShopFloorConnect/Java/j2sdk/jre/bin/verify.dll
Normal file
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user