Reading registry keys in vbscript from ASP page 
Author Message
 Reading registry keys in vbscript from ASP page

We need to be able to authorize users to use our software
locally. To do this we need to set registry keys from our
ASP page.

Have tried to following VBScript but it did not work.

Set WshShell = Wscript.CreateObject("Wscript.Shell")
strOrigVal = WshShell.RegRead
("HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\AcroRd32.exe\Path")

<html>
<body>
        Reg. Value <%=strOrigVal2%>
</html>
</body>

Any suggestions, or is there a better way to do it? May be
allowing the user to install a small ActiveX control that
would add the authorization to the registry. Any advice or
links (URL) on this?

Thanks.



Wed, 29 Jun 2005 01:31:15 GMT  
 Reading registry keys in vbscript from ASP page
I don't think this will work because of obvious security issues -- scanning
someone's registry from a website is a bad thing, especially when you don't
know it. :)

You may want to look into using an HTA...  Create it and have them click on
the Open button when they click on the link to the HTA.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/ht...
iew/htaoverview.asp

Rob


Quote:
> We need to be able to authorize users to use our software
> locally. To do this we need to set registry keys from our
> ASP page.

> Have tried to following vbscript but it did not work.

> Set WshShell = Wscript.CreateObject("Wscript.Shell")
> strOrigVal = WshShell.RegRead
> ("HKLM\Software\Microsoft\Windows\CurrentVersion\App
> Paths\AcroRd32.exe\Path")

> <html>
> <body>
> Reg. Value <%=strOrigVal2%>
> </html>
> </body>

> Any suggestions, or is there a better way to do it? May be
> allowing the user to install a small ActiveX control that
> would add the authorization to the registry. Any advice or
> links (URL) on this?

> Thanks.



Wed, 29 Jun 2005 08:50:41 GMT  
 Reading registry keys in vbscript from ASP page
Thanks for the suggestion.

Recognize the possibility of potential abuse, but cannot think of
another way to easily, safely and automatically authorize users --
without at the same time opening oursleves to piracy.  

Do you think HTAs would serve both purposes?  Incidentally, the link you
gave didn't quite work, although a simple supplemental search did.  

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Wed, 29 Jun 2005 22:51:25 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Read/write registry key using .asp or .hta

2. Read Registry Keys and Trees / API Call for Registry access

3. How to read all registry keys in VBScript ???

4. Reading the Registry from VBSCRIPT under W98 - keys with space embedded

5. REGISTRY How can I read a registry key?

6. Read Registry key via JScript

7. Reading Registry keys??

8. reading a registry key

9. Reading Binary Registry Keys

10. Reading key in registry

11. read/set registry key

12. Registry key reading

 

 
Powered by phpBB® Forum Software