BJseal91
-
Total Posts
:
18
- Scores: 0
-
Reward points
:
0
- Joined: 4/4/2009
-
Status: offline
|
shortcuts to Aplications with VBscript Password and run as
Friday, May 22, 2009 8:11 PM
( permalink)
 Hi All this is the new script it has - welcome messeage
- password Aria
- Run As Administor Aria
- 10 Application Shortcuts
- Exit Message
IMPORTANT INFORMATION: If you enjoy or copy this script please comment and leave feedback on what could be done better or just your genral views on the script weather you liked it ect i have other scripts and there are more to come this scripts works on windows xp home edition and xp professionel along with windows 2000 and vista The password to this script is sealed123 but you can change it to what you like i will be adding vista scripts next week so for those who are waiting for vista scripts they are coming to thank you for taking the time to read this the code is as follows :- onclick=msgbox("Welcome to vbscript manager shortcuts",48,"Welcome Screen") Sub Run(ByVal sFile) Dim shell Set shell = CreateObject("WScript.Shell") shell.Run Chr(34) & sFile & Chr(34), 1, false Set shell = Nothing End Sub Dim storedPassword storedPassword ="sealed123" password = InputBox("Please type the Password.") if password = storedPassword Then Set objSh = CreateObject("Shell.Application") objSh.ShellExecute "runas", "" , "", "runas", 1 Set wshshell=wscript.createobject("wscript.shell") Dim msg,input msg = "Open Program:" & vbCR msg = msg & "" & vbCR msg = msg & "1. Cmd " & vbCR msg = msg & "2. Regedit " & vbCR msg = msg & "3. MSconfig " & vbCR msg = msg & "4. Sfc scan " & vbCR msg = msg & "5. System.ini " & vbCR msg = msg & "6. Windows System32 " & vbCR msg = msg & "7. System Restore " & vbCR msg = msg & "8. Network Connections" & vbCR msg = msg & "9. Device Manager " & vbCR msg = msg & "10.System Information" & vbCR input = InputBox(msg,"title") Select Case input case "1" wshshell.run("cmd") case "2" wshshell.run("Regedit") case "3" wshshell.run("msconfig") case "4" wshshell.run("Sfc /scannow") case "5" wshshell.run("System.ini") case "6" wshshell.run("C:\WINDOWS\system32") case "7" wshshell.run("%SystemRoot%\System32\restore\rstrui.exe") case "8" wshshell.run("%SystemRoot%\explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{7007acc7-3202-11d1-aad2-00805fc1270e}") case "9" wshshell.run("mmc devmgmt.msc") case "10" wshshell.run("msinfo32.exe") End Select Else WScript.Echo "That was the wrong Password!" End if onclick=msgbox("Thankyou for using this service",0,"GoodBye")
|
|
|
|
Amida
-
Total Posts
:
30
- Scores: 0
-
Reward points
:
0
- Joined: 5/31/2009
- Location: Codoria
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Wednesday, June 03, 2009 11:33 PM
( permalink)
I'm trying to edit the file for my own uses. I'm trying to get it to open firefox.exe which is currently in C:\Program Files\Mozilla Firefox How could I get it to open firefox.
|
|
|
|
mbouchard
-
Total Posts
:
2110
- Scores: 29
-
Reward points
:
0
- Joined: 5/15/2003
- Location: USA
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 1:50 AM
( permalink)
To add to the script you should only have to copy 2 lines. 1) msg = msg & "10.System Information" & vbCR Copy this line and edit as needed. I.e. Change 10.System Information to 11.My App here, leave everything else as is. 2) Find the case that most resembles what yo uwant and copy and paste it just above the End Select i.e. Copy case "6" wshshell.run("C:\WINDOWS\system32") and change it to case "11" 'NOTE must be the same number you used above wshshell.run("c:\program files\My Apphere\App.exe") Follow up note, since there are spaces in the path, you will need to play with quotes to get it working correctly.
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
|
|
Amida
-
Total Posts
:
30
- Scores: 0
-
Reward points
:
0
- Joined: 5/31/2009
- Location: Codoria
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 1:59 AM
( permalink)
I tried it as you said and it still didn't work. I'm getting annoyed with trying to add firefox.
|
|
|
|
mbouchard
-
Total Posts
:
2110
- Scores: 29
-
Reward points
:
0
- Joined: 5/15/2003
- Location: USA
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 2:11 AM
( permalink)
What is the code you used? What is the error you got?
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
|
|
Amida
-
Total Posts
:
30
- Scores: 0
-
Reward points
:
0
- Joined: 5/31/2009
- Location: Codoria
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 2:46 AM
( permalink)
Well I limited it to stuff I'd likely use so it is onclick=msgbox("Welcome to vbscript manager shortcuts",48,"Welcome Screen")
Sub Run(ByVal sFile)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34), 1, false
Set shell = Nothing
End Sub
Set objSh = CreateObject("Shell.Application")
objSh.ShellExecute "runas", "" , "", "runas", 1
Set wshshell=wscript.createobject("wscript.shell")
Dim msg,input
msg = "Open Program:" & vbCR
msg = msg & "" & vbCR
msg = msg & "1. Cmd " & vbCR
msg = msg & "2. Calculator " & vbCR
msg = msg & "3. Notepad" & vbCR
msg = msg & "4. Firefox" & vbCR
input = InputBox(msg,"title")
Select Case input
case "1"
wshshell.run("cmd")
case "2"
wshshell.run("calc.exe")
case "3"
wshshell.run("notepad.exe")
case "4"
wshshell.run("C:\Program Files\Mozilla Firefox\firefox.exe")
End Select
onclick=msgbox("Thankyou for using this service",0,"GoodBye")
and the error is that on line 27 at char. 1 the system cannot find the file specified.
|
|
|
|
mbouchard
-
Total Posts
:
2110
- Scores: 29
-
Reward points
:
0
- Joined: 5/15/2003
- Location: USA
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 2:57 AM
( permalink)
When there is a space in the path you need to add extra quotes. i.e. "c:\program files\Firefox.exe" would be come """c:\program files\firefox.exe""" Just need to play with them. It can be a pain.
Mike For useful Scripting links see the Read Me First stickey! Always remember Search is your friend.
|
|
|
|
Amida
-
Total Posts
:
30
- Scores: 0
-
Reward points
:
0
- Joined: 5/31/2009
- Location: Codoria
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 3:14 AM
( permalink)
ok lets hope then -------------edit------------ it does work thanks, also are a VB Script god?
<message edited by Amida on Thursday, June 04, 2009 3:19 AM>
|
|
|
|
BJseal91
-
Total Posts
:
18
- Scores: 0
-
Reward points
:
0
- Joined: 4/4/2009
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 7:45 PM
( permalink)
I Will find out for you No Problem
|
|
|
|
BJseal91
-
Total Posts
:
18
- Scores: 0
-
Reward points
:
0
- Joined: 4/4/2009
-
Status: offline
|
RE: shortcuts to Aplications with VBscript Password and run as
Thursday, June 04, 2009 7:55 PM
( permalink)
Thanks for your help and replying to the posts when i was not able to you are very knogleable i have got another script on its way so keep an eye out you will love the next one it is more complex but does a lot more to it will pull up a lot of system informtion and enable and disable tools speak soon
|
|
|
|
spitfire5637
-
Total Posts
:
1
- Scores: 0
-
Reward points
:
0
- Joined: 11/6/2009
-
Status: offline
|
Re: RE: shortcuts to Aplications with VBscript Password and run as
Tuesday, November 10, 2009 5:06 AM
( permalink)
Actually for the double-quotes, you would want to put it like this: wshshell.run(chr(34)&"C:\Program Files\Mozilla Firefox\firefox.exe"&chr(34))
|
|
|
|