CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 3/21/2005 4:31:15 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 66 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
hitskyn
Asp.Net User
WshShell3/21/2005 4:31:15 PM

0/0

I have the following code that I currently use in the form of a vbs file to get the last logged in machine (along with other infor) for a user. I can get it to run in a Windows vb.net application But not a asp.net application.

I am getting "access is denied for the operation. access is denied for the operation." as a results.

I have delegation turned on for the server and my account and i am using using Impersonation.

Is it Possible to get this info this way? Is there a better way?


Dim wsh As New WshShell
Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name)
Dim cmdstring As String = "netsh wins server" & sWinsServer & "show name Name= " & sUid & " EndChar=03"

Dim objfind As WshExecClass = wsh.Exec(cmdstring)
Dim sFindResults As String = LTrim(LCase(objfind.StdOut.ReadAll))
Response.Write(sFindResults)

1 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
VBScript Programmer's Reference: Programmer's Reference Authors: Adrian Kingsley-Hughes, Daniel Read, Pages: 773, Published: 2007
VBScript in a Nutshell: A Desktop Quick Reference Authors: Paul Lomax, Matt Childs, Ron Petrusha, Pages: 512, Published: 2003
Beginning Programming Authors: Adrian Kingsley-Hughes, Pages: 479, Published: 2005
Excel 2003 VBA Programming with XML and ASP Authors: Julitta Korol, Pages: 948, Published: 2006
WSH and ADSI Administrative Scripting Authors: Gerry O'Brien, Pages: 352, Published: 2001
Understanding WMI Scripting: Exploiting Microsoft's Windows Management Instrumentation in Mission-Critical Computing Infrastructures Authors: Alain Lissoir, Pages: 580, Published: 2003
Microsoft Windows XP Power Productivity Authors: Jim Boyce, Pages: 637, Published: 2005
Sams Teach Yourself Windows Script Host in 21 Days Authors: Thomas Fredell, Steve Campbell, Michael Morrison, Charles Williams, Ian Morrish, Pages: 607, Published: 1999
SAMS Teach Yourself Windows XP in 21 Days Authors: John Mueller, Pages: 768, Published: 2001
IT Administrator's Top 10 Introductory Scripts for Windows Authors: Jeff Fellinge, Pages: 424, Published: 2004

Web:
WshShell Object You create a WshShell object whenever you want to run a program locally, manipulate the ... The WshShell object provides the Environment collection. ...
Run Method (Windows Script Host) Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "%windir%\ notepad " & WScript.ScriptFullName. The following VBScript code does the same ...
Microsoft Windows 2000 Scripting Guide - WshShell Object The shell is the component of Windows that presents users with an interface to the operating system and provides familiar elements of the Windows desktop ...
DevGuru WSH Object: WshShell The WshShell object exposes some of the common shell functionalities of Microsoft ... The WshShell object is not instantiated automatically upon script ...
DevGuru WSH Method: WshShell.Run WshShell.Run strCommand [,intWindowStyle] [,bWaitOnReturn] ... intReturn = WshShell.Run("notepad " & WScript.ScriptFullName, 1, TRUE) WshShell. ...
WshShell.Run command question(s) - ASP Free WshShell.Run command question(s)- Windows Scripting. Visit ASP Free to discuss WshShell.Run command question(s)
Tuning the environment with WshShell Oct 5, 2005 ... Christa Anderson this month explains how to read the Registry and record the value of a key in the Event Viewer.
wsh run Syntax WshShell.Run (strCommand, [intWindowStyle], [bWaitOnReturn]) Parameters strCommand ... Set WshShell = WScript.CreateObject("WScript.Shell") WshShell. ...
VB Script: using the wshshell object in vbscript, raw scripts, wscript raw scripts, wscript, vb script: Im not specialist with ASP (WSH only) but you can try like this JScript: % var objMyObject = Server.CreateObject( Scripting ...
WshShell - VBScript WshShell - VBScript. Master the WshShell Object and see how to access the Windows Registry, Write to the Event Log, Run External Applications and much more ...

Videos:
How to show/hide hidden files with a vb script Use this link to view in higher quality http://youtube.com/watch?v=IeDFo_SBfDQ&fmt=18 How to turn hidden files on and off with a vb script good if u...
Backspace Loop Virus This is a funny virus that loops a command to hit the backspace key 4 times every 7 seconds. do set wshshell = wscript.createobject("Wscript.shell")...
Fake Virus and Computer Pranks(pt3) This is my 3rd video on how to make fake viruses. This one is Ghost Text. Save as a .vbs here is the code set wshshell = wscript.CreateObject("wscrip...
make a joke make a joke to a friend close his pc As i sad in the movie i'll put the code this is it: Dim wshshell set wshshell = wscript.CreateObject("WScript...
How To Make A Basic Windows Virus With Notepad A basic tutorial on making a virus that, when opened, opens 100's of command prompts forcing the victim to shut down. The Code Is: For i=1 to 10000...
How to: Make a script to irritate your frends on msn! Hello this is a script to irritate your frends on msn. This is a script to blok your frends 100 times. You can change the settings of the script now ...
Shutdown, Random pass, popup. Notepad 1337 files Here are all codes: 1. Annoying popup: On Error Resume Next Set WshShell = WScript.CreateObject("WScript.Shell" ) WshShell.RegWrite "HKCUSoftwareMi...
messenger spammer post if u have any questions read the following this shows how to spam some1 in a messenger but dont make the number to larger or it will make your...
How to close someone's computer This is how to close some1's comp very easy Text : msgbox "Hello,if you press ok,you will win 100$ cash." msgbox "Your click has been registered,cl...
How to Make a Virus Lesson #1 This is the code used in the video. Don't forget to put the following code in notepad and save it as a .vbs Also, check out my other videos for other...




Search This Site:










please enter a different password

dropdownlist requery

retrieving the user name problem

unable to diaply images.

windows identity & ldap user accounts

architecture [gcn 1.2] - a discussion

need help to reveal install errors==how and where to edit as listed

object expected (dynamic onclick)

how to run dnn on linux?

asp.net config tool error w\ custom membership provider - settings?

form authentication bypassed when users requesting word/excel files directly

c# help

error bc30455 - argument not specified for parameter 'password'

sending email automatically

breadcrumb root not a link?

software

roles from database :'(

account module error

survey module

dropdown list control(selected item)

cant find the script library... pls help

server.transfer() ignored in exception handling

treeview unable to change the img

missed dll files

internet and intranet site in iis

enterprise library may 2007 edition, problem with data access block

how to send data to sql database

works on my computer but not online

forms authentication signing the clients out automatically ?

digest authentication

 
All Times Are GMT