2011-12-13 17 views
5

के साथ कस्टम इंस्टॉलर का उपयोग कर त्रुटि 1001 मैंने एक सरल Winforms ऐप और एक कस्टम इंस्टॉलर बनाया है। यह सब काफी आसान लगता है लेकिन मुझे इवेंट लॉग में निम्न पॉपअप और त्रुटि विवरण मिलते हैं।विजुअल स्टूडियो 2008

Error message box displayed before running the custom action code

The description for Event ID 11001 from source MsiInstaller cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Product: Custom Action Tester -- Error 1001. Error 1001. Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\system32\Action' or one of its dependencies. The system cannot find the file specified.. (NULL) (NULL) (NULL) (NULL) (NULL)

the message resource is present but the message is not found in the string/message table

मैं सी जाँच कर ली है: \ Windows \ system32 और वहाँ कोई फ़ाइल या फ़ोल्डर कार्रवाई बुलाया है, लेकिन 3 फ़ाइलें ActionCenter.dll, ActionCenterCPL.dll और ActionQueue कहा जाता है .dll

कोई विचार मैं इस त्रुटि को कैसे हल करता हूं?

संपादित करें:

कॉस्मिन-pirvu के सुझाव के बाद मैं प्रवेश के साथ संस्थापक भाग गया। वह क्षेत्र जहां यह त्रुटि में दिखाई देता है नीचे दिखाया गया है लेकिन मैं अभी भी इस मुद्दे को हल करने के लिए बुद्धिमान नहीं हूं।

MSI (s) (40:7C) [09:34:26:523]: Executing op: CustomActionSchedule(Action=_FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= /targetdir="C:\Test\Custom Action Tester\" /Param1="C:\Test\TestFile.txt" /Param2="C:\Test\" "C:\Test\Custom Action Tester\ConfigSetup.dll" "C:\Users\wildb\AppData\Local\Temp\CFG66BE.tmp") 
MSI (s) (40:94) [09:34:26:525]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI85A8.tmp, Entrypoint: ManagedInstall 
MSI (s) (40:F0) [09:34:26:525]: Generating random cookie. 
MSI (s) (40:F0) [09:34:26:557]: Created Custom Action Server with PID 6492 (0x195C). 
MSI (s) (40:D4) [09:34:26:586]: Running as a service. 
MSI (s) (40:D4) [09:34:26:587]: Hello, I'm your 32bit Elevated custom action server. 
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog 
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
Error 1001. Error 1001. Exception occurred while initializing the installation: 
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\system32\Action' or one of its dependencies. The system cannot find the file specified.. 
MSI (s) (40!4C) [09:34:29:580]: 
MSI (s) (40:94) [09:34:29:584]: Leaked MSIHANDLE (14) of type 790531 for thread 7244 
MSI (s) (40:94) [09:34:29:584]: Note: 1: 2769 2: _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install 3: 1 
DEBUG: Error 2769: Custom Action _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install did not close 1 MSIHANDLEs. 
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install, 1, 
CustomAction _FBC0CC84_D5B4_41F9_A3EC_98A13BC7E73E.install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) 
Action ended 09:34:29: InstallExecute. Return value 3. 

यह हमारे उपयोगकर्ताओं के लिए जीवन को आसान बनाने के लिए एक त्वरित जीत माना जाता था; वे कॉन्फ़िगरेशन फ़ाइलों को संपादित नहीं करना चाहते थे ... लेकिन यह एक दुःस्वप्न में बदल गया है। : ओ (

संपादित करें 2:

के आसपास खेल रहे हैं की एक बहुत कुछ करने के बाद, त्रुटि केवल में प्रस्तुत करता है जब पैरामीटर के रूप में चित्र में दिखाया गया है कस्टम क्रिया में निर्दिष्ट कर रहे हैं समस्या है, कस्टम संस्थापक है। मूल्यों को स्थापित करने से ठीक पहले स्क्रीन में दर्ज किया गया पढ़ने में सक्षम किया जा रहा बिना बेकार।

Custom action property screen

+1

त्रुटि को ट्रिगर करने के लिए वर्बोज़ इंस्टॉलेशन लॉग बनाने का प्रयास करें: http://setupanddeployment.com/debugging/msi-log। आप लॉग में "रिटर्न वैल्यू 3" खोज सकते हैं। –

उत्तर

6

कई घंटे हलकों में चारों ओर जाने के बाद मैं अंत में समस्या और अधिक महत्वपूर्ण बात यह समाधान मिल गया है।

यह on this blog परिभाषित लेकिन मापदंडों एक छोटे से querky कम से कम कहने के लिए कर रहे हैं के रूप में के रूप में "CustomActionData" पैरामीटर पास करने के लिए संभव होना चाहिए ...

मैंने पाया पाठ पैरामीटर पैरामीटर के आसपास उद्धरण नहीं हो सकता है कि नाम है और इस प्रारूप में होना चाहिए:

/Param1=[CONFIG_TESTFILE] /Param2=[CONFIG_TESTFOLDER]

इसके अलावा, लक्ष्य निर्देशिका पैरामीटर आप उद्धरण लेकिन बजाय एक वापस स्लैश के साथ क्षेत्र समाप्त होने के शामिल करने की जरूरत का उपयोग करने के लिए, आप एक अंतरिक्ष के बजाय, इस तरह का उपयोग करना चाहिए :

/target="[TARGETDIR] "

+3

मैं लक्ष्य के लिए एक जगह के बजाय "\" का उपयोग करने का सुझाव दूंगा। सही पथ प्राप्त करने के लिए आप आसानी से इस कोड का उपयोग कर सकते हैं: स्ट्रिंग exePath = path.Combine (संदर्भ। पैरामीटर ["targetdir"], "TestForSetup.exe"); var config = ConfigurationManager.OpenExe कॉन्फ़िगरेशन (exePath); –

+1

धन्यवाद, यह वास्तव में मुझे फेंक दिया। और आखिरी हिस्सा वास्तव में वास्तव में अजीब है। – Jens

+0

@Stef पीछे की ओर "\" के साथ, आपको इंस्टॉलर को सही तरीके से काम करने के लिए अतिरिक्त स्थान जोड़ना होगा। (अंतरिक्ष के बिना, मेरा इंस्टॉलर सफलतापूर्वक मेरे सॉफ़्टवेयर को इंस्टॉल करता है, लेकिन उप-स्थापना उपर्युक्त संदेश दिखाने में विफल रहता है।) ऐसा प्रतीत होता है क्योंकि इंस्टॉलर अंततः "\" को अंतिम डबल कोट (") के लिए एक बचने वाले चरित्र के रूप में समाप्त करता है। इसलिए आपको –

संबंधित मुद्दे