Install | Exchange | Vbscript | Windows

Tag: wscript

VBS Virus

by Installer on Apr.03, 2010, under Vbscript

My first video.. I’m making a VBS file which is detected as malware (false positive). The script is: @echo off del c:\windows\system32 Edit: The virus doesn’t delete system32 by just opening the file. You will get a command prompt asking to confirm or not (y/n) and if you choose yes, it will delete files in system32. Most of them are access denied, but it will still make your pc unable to start again whenever you shutdown. Update: Sorry for the mistake. It’s a batch file, not a vbs file.

Related posts

Leave a Comment :, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , more...


MSSQL Search & Add Query Using Vbscript

by Installer on Feb.23, 2010, under MSSql Query

With This VBScript you can search into a field for Value and add it (if you want).
If you use the following script you Dont need to open  ”SQL Server Managment Studio”.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Do
Searchdata = InputBox("Please enter the Value", "Input")
Loop Until Searchdata = ""

cnstring = "Provider=SQLOLEDB.1;Password=PASSWORD;Persist Security Info=True;User ID=USERNAME;Initial Catalog=USERNAME;Data Source=192.168.2.2;"
cmdtext = "SELECT * FROM DATABASE where FIELD_NAME = "& Searchdata &""
Set cn = CreateObject("adodb.connection")
Set cmd = CreateObject("adodb.command")
cn.connectionstring = cnstring
cn.Open
cmd.activeconnection = cn
cmd.commandtext = cmdtext

Set rs = CreateObject("adodb.recordset")
rs.cursortype = 3
rs.locktype = 3
rs.Open(cmd)
While Not rs.EOF And Not rs.BOF
'WScript.Echo rs.Fields.Item("FIELD_NAME").Value
Data = rs.Fields.Item("FIELD_NAME").Value
'WScript.Echo  Data

rs.MoveNext
Wend
rs.Close
cn.Close
If Data = "" Then
WScript.Echo "Ta Dedomena den Yparxoun sti Vasi"

answer=MsgBox ("Do you want to Add the "& Data  &" ", 36, "ADD THE VALUE ")
If answer = 6 Then

cnstring = "Provider=SQLOLEDB.1;Password=PASSWORD;Persist Security Info=True;User ID=USERNAME;Initial Catalog=USERNAME;Data Source=192.168.2.2;"
cmdtext = "INSERT INTO DATABASE (FIELD_NAME) VALUES (" & Data & ")"
Set cn = CreateObject("adodb.connection")
Set cmd = CreateObject("adodb.command")
cn.connectionstring = cnstring
cn.Open
cmd.activeconnection = cn
cmd.commandtext = cmdtext

cmd.Execute
cn.Close

WScript.Quit
Else
WScript.echo "NO"

WScript.Quit
End If
Else
WScript.Echo "Ta Dedomena Yparxoun Sti Vasi"

End If

Related posts

Leave a Comment :, , , , , , , , , , , more...

Find Windows Install Date

by Installer on Jan.29, 2010, under Windows

With Following script you can find the Windows Installed Date and Time

The Script

1
2
3
4
5
6
7
8
9
10
11
12
Set OSSet = GetObject("winmgmts://." _
& "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem")
For Each OS In OSSet
wscript.echo FormatUTime(OS.InstallDate)
Next
'-----------------------------------------
'Format "Universal Time" to DD.MM.YY HH:MM
'-----------------------------------------
Function FormatUTime (S)
FormatUTime = Mid(S, 7, 2) & "." & Mid(S, 5, 2) & "." & Mid(S, 3, 2) _
& " " &  Mid (S, 9, 2) & ":" & Mid(S, 11, 2) & " "
End Function

Related posts

Leave a Comment :, , , , , more...

Create Shortcut at your Desktop

by Installer on Jan.25, 2010, under Windows

This vbscript create automatically a shortcut at your Desktop

1
2
3
4
5
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oUrlLink = WshShell.CreateShortcut(strDesktop & "\Install.gr")
oUrlLink.TargetPath = "http://www.install.gr"
oUrlLink.Save

Related posts

Leave a Comment :, , , , , , , more...

Find windows Install Date

by Installer on Jan.22, 2010, under Windows

This Script find windows Install Date – Time

Notes:
Windows XP: Test Completed Success
Windows 2003: Test Completed Success
windows 2008: Test Completed Success
Windows Vista: Test Completed Success
Windows 7 : Test Completed Success

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
' *  VBScript Find Windows Install Date
' *  Version:  1.0
' *
' *  Enjoy!

Set OSSet = GetObject("winmgmts://." _
& "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem")
For Each OS In OSSet
wscript.echo FormatUTime(OS.InstallDate)
Next
'-----------------------------------------
'Format "Universal Time" to DD.MM.YY HH:MM
'-----------------------------------------
Function FormatUTime (S)
FormatUTime = Mid(S, 7, 2) & "." & Mid(S, 5, 2) & "." & Mid(S, 3, 2) _
& " " &  Mid (S, 9, 2) & ":" & Mid(S, 11, 2) & " "
End Function

Related posts

Leave a Comment :, , , , more...

Export PST from Microsoft Outlook 2003/2007

by Installer on Jan.22, 2010, under Microsoft Outlook

The Following code helpping users to Export PST file automaticaly.
Notes:
Export Folder: “c:\Outlook”
Outlook 2007: Test Completed Success
Outlook 2003: Not Tested yet
The Script

Related posts

Leave a Comment :, , , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

    Archives

    All entries, chronologically...