The problem:
Error message during installation on Windows Vista / 7:
The installer encountered an unexpected error installing this package. This may indicate a problem with the package. The error code is 2869.
Reason:
The MSI contains a custom action that require more privileges than the current user have.
Due to UAC (user access control) even if you're administrator, you're not REALLY administrator unless specifically run as such.
Resolution:
- Simple option - Install as administrator.
- If you wrote the package in Visual Studio 2005/2008 add the following to require administrator privileges to begin installation:
1. Right click on the setup project -> View -> Launch Conditions
2. In the Launch conditions window, right-click the node "Launch Conditions" and select "Add launch condition".
3. Rename the new launch condition to something like "Require Administrator".
4. In the new launch condition property window set "Condition" to "AdminUser"
5. Set the error message to something meaningful ("Only administrator can install this software").
6. Check the following post & add "NoImpersonate.js"
7. Rebuild the package.
Wednesday, February 10, 2010
Thursday, January 28, 2010
MAPIInitialize fails with code 0x80010106 in C#
I've tried to use MAPI in C# but MAPIInitialize keeped on failing with error code: 0x80010106.
The clue I found only is that this error code is related to multi-threading.
The answer was simple - set the application attribute:
[STAThread]
The clue I found only is that this error code is related to multi-threading.
The answer was simple - set the application attribute:
[STAThread]
Thursday, January 21, 2010
WinSNMP C# wrapper fails in 64 bit systems
Some time ago I wrote a C# wrapper for WinSNMP. Recently I moved to Win7 64 bit and that application failed to run. I thought it's because of Win32 API change, but it seems like the issue was with 32 bit vs. 64 bit.
Solution: (work-around) compile the application to x32:
Right click the project -> Build -> Platform Target -> x86
It could be that I did something wrong in the wrapper, but I really don't have the time to check it out.
Solution: (work-around) compile the application to x32:
Right click the project -> Build -> Platform Target -> x86
It could be that I did something wrong in the wrapper, but I really don't have the time to check it out.
Sunday, January 10, 2010
Convert SQL Server Database to Access MDB
I tried looking around the web how to accomplish the following task:
Convert SQL Server Database to Access MDB
I couldn't find any answer online, but on the way to work it hit me: use SQL Server Management Studio "Export". I just checked it and it works like a charm. In 2 minutes I was able to export the SQL Server database to Access MDB.
Just do:
1. Open SQL Server Management Studio & connect to the SQL Server database.
2. Right click the database and select - "Tasks" => "Export"
3. Select the source database & select Access MDB as destination.
Continue with the instructions.
Convert SQL Server Database to Access MDB
I couldn't find any answer online, but on the way to work it hit me: use SQL Server Management Studio "Export". I just checked it and it works like a charm. In 2 minutes I was able to export the SQL Server database to Access MDB.
Just do:
1. Open SQL Server Management Studio & connect to the SQL Server database.
2. Right click the database and select - "Tasks" => "Export"
3. Select the source database & select Access MDB as destination.
Continue with the instructions.
Labels:
Access,
MDB,
SQL Server
Tuesday, December 15, 2009
TFS Error: HTTP code 403: TF53011: DOMAIN\USER is not a licensed user.
While adding a new user to the TFS I got the following error:
HTTP code 403: TF53011: DOMAIN\USER is not a licensed user.
There are many talks in the web, but the solution might be VERY simple (it was in my case):
Add the new user to the TFS group "Team Foundation Licensed Users Group":
- In the 'Team Explorer', right click on the TFS Server -> Team Project Settings -> Group Membership
- Add the new user to the following group:
[SERVER]\Team Foundation Licensed Users Group
HTTP code 403: TF53011: DOMAIN\USER is not a licensed user.
There are many talks in the web, but the solution might be VERY simple (it was in my case):
Add the new user to the TFS group "Team Foundation Licensed Users Group":
- In the 'Team Explorer', right click on the TFS Server -> Team Project Settings -> Group Membership
- Add the new user to the following group:
[SERVER]\Team Foundation Licensed Users Group
Labels:
TFS
Sunday, November 22, 2009
Scheduled Task fails: Could not start
I just got a new machine for a customer and started to set it up. I've defined multiple scheduled tasks, and I got: "Could not start" error for one of the tasks... That specific task was a batch job.
I've found few resources on the web and solved the problem. I would recommend the following protocol for such an error:
*. Check the log file of the scheduled tasks: open the scheduled tasks in explorer window and select "Advanced"->"View Log".
Option 1:
*. Check the following policy: Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments "Log on as a batch job" (also - someone wrote that his problem was that there was a group policy overriding the local computer policy).
Option 2:
If the error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
Try resolving it using the protocol defined here:
*. Check the user you are trying to run as can run the script:
---- Start - Run - RunAs /user:username@domain (Your Command)
*. If it doesn't run, try giving the user privileges:
Cacls c:\windows\system32\cmd.exe /e /g username@domain:r
I've found few resources on the web and solved the problem. I would recommend the following protocol for such an error:
*. Check the log file of the scheduled tasks: open the scheduled tasks in explorer window and select "Advanced"->"View Log".
Option 1:
*. Check the following policy: Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments "Log on as a batch job" (also - someone wrote that his problem was that there was a group policy overriding the local computer policy).
Option 2:
If the error is:
0x80070005: Access is denied.
Try using the Task page Browse button to locate the application.
Try resolving it using the protocol defined here:
*. Check the user you are trying to run as can run the script:
---- Start - Run - RunAs /user:username@domain (Your Command)
*. If it doesn't run, try giving the user privileges:
Cacls c:\windows\system32\cmd.exe /e /g username@domain:r
Labels:
Scheduled Task
Tuesday, October 27, 2009
Open a new browser tab from ASP.NET control
To open a new browser tab from ASP.NET control client side scripting must be used (not ASP.NET OnClick). There are few answers on the web how to do that. Some don't work & some are incomplete. The following works with any browser version I've checked:
button.Attributes.Add("onclick", "javascript: window.open('your_url','',''); return false;");
This add a client side event handler "onclick", which overrides the ASP.NET OnClick event. If you put both ASP.NET OnClick event handler & this "onlick" client side handler, only the client side will be executed. You may choose if to add the client side handler at run-time.
button.Attributes.Add("onclick", "javascript: window.open('your_url','',''); return false;");
This add a client side event handler "onclick", which overrides the ASP.NET OnClick event. If you put both ASP.NET OnClick event handler & this "onlick" client side handler, only the client side will be executed. You may choose if to add the client side handler at run-time.
Subscribe to:
Posts (Atom)