Search found 7 matches

by milend1966
Tue Feb 28, 2012 3:37 am
Forum: VBScript
Topic: objWMIService.ExecQuery
Replies: 1
Views: 1976

objWMIService.ExecQuery

I'm querying remotely by RDP....
by milend1966
Tue Feb 28, 2012 1:29 am
Forum: VBScript
Topic: objWMIService.ExecQuery
Replies: 1
Views: 1976

objWMIService.ExecQuery

Hi, i need to run the script below:'On Error Resume NextstrComputer = "."Wscript.Echo "PC "&strComputer Set objWMIService = GetObject("winmgmts:" & strComputer & "rootcimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)For Each objItem in colItems Wscript.Echo "Use...
by milend1966
Tue Feb 21, 2012 9:47 pm
Forum: VBScript
Topic: Open txt file with administrator privilege
Replies: 0
Views: 3727

Open txt file with administrator privilege

Hi, i have a vbs script that need to open a file txt and write a text. is it possible open this file with administrator privilege also the file it is running as user belongs to User group ?Actually i use objFSO.OpenTextFile to open file.Thanks
by milend1966
Wed Feb 01, 2012 9:41 am
Forum: VBScript
Topic: RUNAS
Replies: 3
Views: 1970

RUNAS

Ok, thank you !
by milend1966
Wed Feb 01, 2012 3:02 am
Forum: VBScript
Topic: RUNAS
Replies: 3
Views: 1970

RUNAS

Sorry, maybe my description was not very clear..I need to run a vbs script as administrator but this file register the logon information on a TXT file(logon.txt): the user that is logged on pC, the computer NAME and the date. If i run this script as administrator with task scheduler on the logon.txt...
by milend1966
Wed Feb 01, 2012 1:45 am
Forum: VBScript
Topic: RUNAS
Replies: 3
Views: 1970

RUNAS

Thanks. I need that the file vbs and login.txt can only modified by one user because it contain login information and no other users can modify the information inside file...
by milend1966
Wed Feb 01, 2012 12:56 am
Forum: VBScript
Topic: RUNAS
Replies: 3
Views: 1970

RUNAS

Hi, i need to run a vbs script at logon with scheduled task and the task run as administrator user . These script run at logon of any users and write to a file USERNAME, PCNAME and DATE. The problem is that using task scheduer the record in the file is always with USERNAME parameter as Administrator...