Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to migrate 2 VBScripts into one.

Featured Replies

One of the problems I had was how the New OS Key was processed by Win 7 and Vista, if

you removed the dash between the 5 characters it would cause an error. If you leave the

dashes in then it ran without errors, that why in the V7 function there is no On Error

Resume Next.

It was not that it was hard to figure out how to merge the 2 scripts, when you break it

down to separate functions.

Thank you and I was glad to help getting the script to work.

Here is a VBS script that meant to have One File Drag Drop or Use in Cmd Line

with One File, to be run with Admin Access.

RunAsDragDrop.vbs

'-> Script By Gunsmokingman AKA Jake1Eye'->   This Script And Or Any Code Is The Property Of Gunsmokingman Or'->  Jake1Eye, Except Where Acknowledgement Comments Exists for Code'->  Written By Other Coders.'->   If Any Part Of This Code Is Used In Other Coding Project, There'->  Must Be An Acknowledgement Comments To The Original Coder Must Be '->  Included In Any Other Coding Project.'-> Objects For Runtime Dim Act :Set Act = CreateObject("Wscript.Shell") Dim Fso :Set Fso = CreateObject("Scripting.FileSystemObject") Dim Reg :Set Reg = GetObject("winmgmts://./root/default:StdRegProv")'-> Varibles For Various Run Time Dim A, c34, Ts, Txt  c34 = Chr(34)  Txt = Act.ExpandEnvironmentStrings("%Temp%\DragDropItem.txt")'-> Makes Sure One Item Has Been Drag And Drop Or Cmd Lines Arguments A = WScript.Arguments.Count  If A = 0 Then    call Msg("You Must Drag And Drop One File" & vbCrLf & _   "Type On To This Script.", "Error No File Drop")   WScript.Quit(0)  ElseIf A >= 2 Then    call Msg("This Script Only Allow For One File To" & vbCrLf & _   "Be Drag And Drop. Total Files Drag And Drop : " & A,"Errpr To Many Files")   WScript.Quit(1)  End If '-> Original Link To Script At StackOverFlow'-> http://stackoverflow.com/questions/18504036/is-is-possible-to-have-run-as-prompt-for-vbscript'-> Script Modified By Gunsmokingman Aka Jake1eye   If Reg.GetStringValue(&h80000003, "S-1-5-19\Environment", "TEMP", val) = 5 Then   If WScript.Arguments.Count = 1 Then    MkT(WScript.Arguments.Item(0))    CreateObject("Shell.Application").ShellExecute "wscript.exe" _      , Chr(34) & WScript.ScriptFullName & Chr(34) & " relaunch", "", "runas", 1    WScript.Quit(2)    Else     call Msg("Can Not Acquire Admin Privileges", "Error No Admin Access")     WScript.Quit(3)    End If   Else'-> Code Here With Admin Access    Set Ts = Fso.OpenTextFile(Txt)     A=Ts.ReadAll      Ts.Close()    Act.Run(A),1,True    Fso.DeleteFile(Txt),True     End If'-> Makes Text File With WScript.Arguments.Item(0) Passed On'-> As Varible To Run With Admin Access   Function MkT(T)      Set Ts = Fso.CreateTextFile(Txt)    Ts.WriteLine c34 & T & c34    Ts.Close()     End Function'-> Makes All The Msgbox For The Script   Function Msg(T, L)       MsgBox T, 4128, L   End Function
Rename RunAsDragDrop.vbs.txt to RunAsDragDrop.vbs to make active

RunAsDragDrop.vbs.txt


Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.