manuelmoser
Goto Top

Virtual Basic Script in ASPX-Seite einfügen

Hallo Leute!

Hab hier einen VB Code und würde dieses gerne in eine ASPX-Seite einfügen!
Nur bin ich auf dem Gebiet noch Neuling und hoff das ihr mir helfen könnt!

Set objArgs = WScript.Arguments


For Each arg in objArgs
	counter = counter + 1
	
	if (counter >= 2) then 
		fullname = fullname & " " & arg  
	elseif (counter = 1) then 
		fullname = arg
	else
		'fullname = fullname & arg  
	end if

Next
	

	REM Set sh = Wscript.CreateObject("Wscript.Shell")  
	REM Set env = sh.Environment("PROCESS")  
	REM command = env("ProgramFiles") & "\_guglerparameter.vbs 2 " & objArgs(0)  
	REM sh.Run command , 0, False

	Set sh = Wscript.CreateObject("Wscript.Shell")  
	
	'fullname = replace(fullname, " ","%20", 1, -1, 1)  
	fullname = URLEncode(fullname)
	sh.Run "cmd.exe /C start iexplore.exe http://www.google.at/search?q=" & fullname, 0, True  


Set Sh = Nothing
Set env = Nothing

Function URLEncode(sRawURL ) 
'    On Error Goto Catch  
    Dim iLoop 
    Dim sRtn 
    Dim sTmp 
    Const sValidChars = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz:/.?=_-$(){}~&"  


    If Len(sRawURL) > 0 Then
        ' Loop through each char  


        For iLoop = 1 To Len(sRawURL)
            sTmp = Mid(sRawURL, iLoop, 1)


            If InStr(1, sValidChars, sTmp, vbBinaryCompare) = 0 Then
                ' If not ValidChar, convert to HEX and p  
                '     refix with %  
                sTmp = Hex(Asc(sTmp))


                If sTmp = "20" Then  
                    sTmp = "+"  
                ElseIf Len(sTmp) = 1 Then
                    sTmp = "%0" & sTmp  
                Else
                    sTmp = "%" & sTmp  
                End If
            End If
            sRtn = sRtn & sTmp
        Next 
        URLEncode = sRtn
    End If

End Function

function getemail()
	on error resume next
	Set objUser = CreateObject("ADSystemInfo")  
	Set CurrentUser = GetObject("LDAP://" & objUser.UserName)  
	getemail = CurrentUser.mail 									'Abfrage der eigenen E-Mail Adresse aus Exchange-Server  
	Set objUser = Nothing
	Set CurrentUser = Nothing
end function

danke!
lg

Content-Key: 62926

Url: https://administrator.de/contentid/62926

Ausgedruckt am: 28.03.2024 um 07:03 Uhr