Solved

register DLL in ASP..

Posted on 2002-05-09
14
381 Views
Last Modified: 2012-05-04
I want to register certain Dll at runtime from an ASP page, without using shell command. I mean, there should not be any command line displayed while registering, this has to be done at the background. using regsvr32.exe will take the control to the command line. Is there a way i can use any server objects to accomplish this task.
0
Comment
Question by:sureshrao72
  • 6
  • 4
  • 3
  • +1
14 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6999721
Suresh,
I am not sure you can do it at all.

You need adminitrative access to run regsvr32 from your web pages
WHat do you mean by background ? A scheduled process ?

Questions Asked 6
Last 10 Grades Given B C  
Please close few questions Suersh, you are getting free help here and we spend time to solve your problems and on return you should encourage people with some good grades
0
 
LVL 15

Expert Comment

by:robbert
ID: 6999733
jitganguly is right. I'd have a solution which would require VB/COM knowledge.
0
 

Author Comment

by:sureshrao72
ID: 6999737
well, in the singon page of ASP im gonna call a DLL which is gonna download some files (includes dll's,ocx,mdb) to the client machine. These dll's and ocx's has to be registered without the users interaction, the user is a dumb user.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
LVL 20

Expert Comment

by:jitganguly
ID: 6999744
>>well, in the singon page of ASP im gonna call a DLL which is gonna download some files

Nope. Download automatically ? then automatically start registerting ? Impossible to achieve that.
Thats the security. You can't really forcefully do it, even on a lowest security setup in your users browser
0
 
LVL 15

Expert Comment

by:robbert
ID: 6999750
For that purpose, you would probably use a regular setup program, like generated by the VB P&D wizard, or Wise, or Installshield.

You can do all that by client-side script but this would require the user to lower his Internet Explorer security settings, and thus, would only work for intranet users.
0
 

Author Comment

by:sureshrao72
ID: 6999755
Impossible!!! When a VB exe can be called from a ASP page where the VB exe resides in the client machine, why not do the same to download those files..into client machine..
0
 
LVL 15

Expert Comment

by:robbert
ID: 6999756
You can delete this question now.
0
 

Author Comment

by:sureshrao72
ID: 6999760
Impossible!!! When a VB exe can be called from a ASP page where the VB exe resides in the client machine, why not do the same to download those files..into client machine..
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6999762
Becuase security does not allow you . and Robbert is right with his last posting
0
 

Author Comment

by:sureshrao72
ID: 6999763
Impossible!!! When a VB exe can be called from a ASP page where the VB exe resides in the client machine, why not do the same to download those files..into client machine..
0
 

Author Comment

by:sureshrao72
ID: 6999769
I dont know how my comments got posted thrice. sorry about that. But Mr. Robert i know whether to delete or save my question, u r not supposed to tell me that..
0
 

Accepted Solution

by:
RCFox earned 60 total points
ID: 7005222
'  An example ASP file
'Find the full path to the DLL
'Enter the path\filename in the text input
'Check radio button for 'Register'
'Uncheck the box for 'Unregister'
'The following would be a file named RegUnReg.asp:

<%
Dim Scriptname
ScriptName = "RegUnReg.asp"
if Request.Form("SUBMIT") = "" Then
With Response
.write "<CENTER><FORM ACTION=""" & ScriptName & """ METHOD=POST>"
.write "<INPUT TYPE=TEXT NAME=FILEPATH SIZE=120>Full Path/Filename to Reg/UnReg<BR>"
.write "<INPUT TYPE=CHECKBOX NAME=ACTIONTYPE CHECKED>Checked=Register; Unchecked=Unregister<BR>"
.write "<INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT></CENTER>"
.write "</FORM>"
end with
else
Set fso = Server.CreateObject("Scripting.FileSystemObject")
RegSrv = fso.GetSpecialFolder(1) & "\REGSVR32.EXE /s "
Set WshShell =CreateObject("WScript.Shell")
runstring = "CMD /C " & RegSrv & " /u "
if Request.Form("ACTIONTYPE")="on" then runstring = "CMD /C " & RegSrv
Return = WshShell.Run(runstring & Request.Form("FILEPATH"), 1, True)
Response.Write "Result: " & Return
Set fso=Nothing
Set WshShell = Nothing
end if
%>
0
 

Author Comment

by:sureshrao72
ID: 7006786
well, i have'nt tried RCFox's answer. meanwhile i have a question..how will i search a string in a textfile using FSO object..
0
 
LVL 15

Expert Comment

by:robbert
ID: 7009477
Try Instr(). ;-)
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSON error 4 63
How to show result of a NULL value at random? 32 50
Display first 3 lines of text from database field, vbscript asp 4 52
ASP CDO - Limiting Connections 2 50
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now