473,508 Members | 2,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to call exact file location using Win32::OLE->new()?

2 New Member
Hello All,
I'm very much new to PERL scripting. I'm the admin for an online tool which has some Perl scripts. And i have a problem executing one of the script. I'm just writing a problematic code in the script:
Expand|Select|Wrap|Line Numbers
  1. my $ex = Win32::OLE->new('CamCad.application') or die "oops\n";
  2. my @args = (25,"$basedir\\SYM.TXT,$basedir\\RTE.TXT,$basedir\\BRD.TXT,$basedir\\PAD.TXT",'');
  3. $ex->Invoke('Import',@args);
  4.  
Now when the first line is executed, a different version of CamCad application is getting called. My requirement is to call excatly "C:\MentorGraphics\SDD_HOME\CAMCADPRO.EXE /Professional", that is an EXE is called with a Switch (/Professional).

Is there any way I can replace the code in line1 so that the next lines works fine.
or
How is new('Camcad.application') know which EXE/application it has to execute. If i know this may be i can directly point here to call "C:\MentorGraphics\SDD_HOME\CAMCADPRO.EXE /Professional".

Thanks in Advance.
Jan 24 '11 #1
4 2373
Oralloy
988 Recognized Expert Contributor
Naga,

I'm not an expert in OLE; however, you'll notice that your code is going to the class CamCad.application that's maintained in the windoze registry.

You can then create a new class in the registry by copying the existing class and updating the methods to use the "professional" version.

That's likely the easiest approach. Otherwise you can try manually searching through the registry for all instances of Mentor and look to see if any are already installed with the "/Professional" switch.

Failing that, try a quick search through the uSoft documentation.
Jan 24 '11 #2
RonB
589 Recognized Expert Moderator Contributor
Windows is not very smart in this area of having multiple versions of the same application. This is only one of the areas where *nix systems outshine Windows.

Why are you running 2 different versions? Is one of them for development and the other for production? If so, then it would be better to use 2 different systems.
Jan 24 '11 #3
Naga Prakash
2 New Member
Oralloy:
I had look at all the registries, but nothing found with /Professional switch.
And changing the registry worked for one time, means once I submit a request from my application it calls CAMCAD correctly with the newly changed value, but the next time the original data value for that clsid is restored. Is there any other technique to replace win32:OLE in PERL which works in a similar way? Or in some other script or language so that I can replace PERL with that.
Thanks for the information provided.
Jan 25 '11 #4
Oralloy
988 Recognized Expert Contributor
Naga,

It sounds like the program is "self repairing"; even though you don't want it to be.

Try copying the clsid to one of your creation, perhaps 'CamCad.application.professional', and see if that helps resolve your problem.

Luck!
Oralloy
Jan 25 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1438
by: Kory Postma | last post by:
I would like to know if there is anyway to get the exact file location on a harddrive? For instance, you pass a filename and you can then get the head, track, sector, etc.. of the file (and its...
1
1432
by: Jim Heavey | last post by:
Hello, I have done some volunteer work for my club and develop a web site in ASP.Net. I have the code working fine and now I am ready to move the code up to their web hosting company. I have...
5
3356
by: aiki727 via DotNetMonster.com | last post by:
Hello everyone, Where do I store a bitmap or jpeg that I am using for a forms background image when I deploy the application? Or do I link these files to the app during the deployment? Thanks...
4
6226
by: David | last post by:
Hi I'm using this code to import data from an excel spreadsheet: DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9, "tblStudents", _ "\\Egusersrv\Staff - Shared Work\PE Teach &...
5
2910
by: evenlater | last post by:
I know how to determine the file location of the current Access database in VBA. But I'm trying to figure out how to determine the file location of my back-end. Anybody know how I can call up the...
4
2067
by: Bob Altman | last post by:
Hi all, When I create a new website (click on "Create: Website" from the start page), I'm prompted for the location of the project files, but VS 2005 always creates a SLN file under the Visual...
7
2798
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
2
2853
by: ahmurad | last post by:
Dear Brothers, I am using a 'text file location' at my code to read the file contents- which is working fine in my local server. The web contents/php files and the specified txt file are at the...
0
1213
by: bluethunder | last post by:
Good day! I'm having a problem with my program with regards in reports. I'm using VB 6, .mdb as my back end and Crystal Report 8.5 for my reports. After I input the required data and press the...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.