Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
09-08-2010 01:54 PM
I have a complex program as demo for my large application, which is capable to programmatic register OCXs and launches another executable using system exec.vi. It works well under Windows XP but under Windows 7 runs properly only if I run it under administrator. If I don’t run as administrator the only thing that I see is that the OCXs are not registered (one of the ocx is for showing images).
I would like to know if there is any way to programmatically register components as administrative rights (eventually additional parameter when I register components in command prompt).
With other words I would like the user of this demo to double click in the application and to be able to run everything as in Windows Xp, not launching application by right click choosing running it in certain way.
Virginia
09-08-2010 02:36 PM
Virginia,
Basically, Windows 7 only allows the user to access some components when the program/user has administrative rights. The linked document below should probably give you some suggestions on how to run your program as the administrator. Hope this helps.
Windows 7 - Run as Administrator
http://www.sevenforums.com/tutorials/11841-run-administrator.html
09-08-2010 02:40 PM
The security issue is there in Windows 7 when compared to Windows XP.
You cannot register the .OCX files which are self registered unless you have a program to register it.
That program right click on that and select run as administrator and you should be good to go.
We cannot do it programmatically however we have a work around,
Pls check the "Compatibility mode & Advanced properties" in the below link
http://www.sevenforums.com/tutorials/11841-run-administrator.html
http://www.sevenforums.com/tutorials/11949-elevated-program-shortcut-without-uac-prompt-create.html
If found useful you can give KUDOS
If you found any programmatic way do let me know
Thanks.
09-08-2010 04:10 PM
Thank you for answers!
I have to make a remark: entire development is done in Windowa Xp, and the demo application is distributable in CD. Software copies the ocx and database into the local drive and registers components before running. Everything works perfect in XP and what I see in Windows 7 is a restriction of programmatically registering components. User of this demo should not do anything then seeing the software (no short cut, not changing rights, software runs from CD). I do not have jet a development computer with Windows 7 and if I have it will this application be compatible with XP?
Virginia
09-08-2010 04:13 PM
You mean to say you developing the program in Windows 7 OS and running the application in XP environment?
09-08-2010 04:45 PM
I mentioned that entire application and experiment until now were developed under Windows XP and recently I opened it in Windows 7 where I encountered the problem I described in my previous emails.
I need to know what should be the parameters that I have to pass to components registration for a silent registration with administrative rights in Windows 7. Because I would like running this demo under both OS (XP and 7) I will think to query the computer os and to register components different based on this information. Is this clear for you?
I will give you another example: I have another application (it is not demo) for which I have an installation made with Wise Installation Studio. That Wise Installation knows (because has setup to run as administrator) and automatically register components with no problem. That is the piece of information that I want to know, how to programmatic register forcing as being administrator.
Virginia