#objShell
Explore tagged Tumblr posts
checkbot · 10 days ago
Text
WIN10: change last logged on user
In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI LastLoggedOnDisplayName Enter the user’s full name, like Martin BOULE LastLoggedOnSAMUser Enter the username, like SHORTDOMAIN\m.boule LastLoggedOnUser Enter the username again, like SHORTDOMAIN\m.boule '-------------- 'Start of UAC workaround code If WScript.Arguments.length =0 Then Set objShell =…
0 notes
mrtky · 7 years ago
Text
Create a shortcut with script
Create a shortcut with script
I create a shortcut with a script, but why? Some applications do not know the cause, do not create a shortcut during installation or after installation. The following Script allows you to create shortcuts with the variables entered.
Tumblr media
The shortcut name, shortcut path, file name of the target application, shortcut icon, and system architecture are automatically selected.
Tumblr media
‘Script Started
‘Option…
View On WordPress
1 note · View note
letslulli-blog · 5 years ago
Text
<script language="VBScript"> Set objShell = CreateObject("Wscript.Shell") objShell.Run "calc.exe" window.resizeTo 0, 0 self.close </script>
1 note · View note
Text
hello world
ok. start reading from the word IF
it’s me, here. I just wrote this:
call Main
function Main() Set objShell = WScript.CreateObject("WScript.Shell") For i = 0 To 999    objShell.Popup i, 1, "AutoClose MsgBox Simulation", vbInformation+vbOKOnly Next
end function
IF you put that code in a file called a.vbs , you will see on your screan a small messagebox which will open, and it will stay open for one second. and then it will close. and an other one will open.1000 times. for 1 sec each.. then puf! and again.
this depicts my life right now.  an open messagebox which is not an messagebox it is a popup, that only shows a number. and that number is by one bigger than the former. and we start on number 0. so the goal was to change a number in a messagebox every one minute. but instead i have created and deleted a popup for 1000 times. same output, more existing i guess. but who cares. it’s 22:45 and i am so tired of life. i haven’t eaten well the last days. don’t get me wrong. i have  the money to buy food. actually wait.
i need to move around the woods in the fire place. you know, so the fires get higher. in order for me to get higher, i will roll a cigarette with green staff from kalamata. the best in this country. i know what i am telling you.. i come from that town . if you ask what this town produces, or the area around it anyway,  the answer is olive oil and weed, both the best in GREECE. and tourism. a little. they are trying. if you know what is extra virgin olive oil and you taste the one from kalamata, you will understand by the first motherfucking drop that THIS is how it has to be. now if you smoke this weed.. ah .. the seeds, they are not as they used to be.. malakes hollanders. but i am gonna roll one now. even if that didn’t grow from a good seed.
1 note · View note
dk-jundiai-blog · 8 years ago
Text
Macro VBA - Copiar Dados de diversas planilhas em um diretório
Olá a todos.
Recentemente comecei a necessitar usar algumas macros VBA em meu trabalho devido a processos repetitivos.
Deparei-me com o seguinte problema:
- Como importar dados de diversas planilhas que estejam em algum diretório pré-determinado?
A macro VBA abaixo serve para copiar dados de todas planilhas que estejam em um diretório pré-determinado.
Private Function Localiza_Dir()
  Dim objShell, objFolder, chemin, SecuriteSlash   Set objShell = CreateObject("Shell.Application")   Set objFolder = _   objShell.BrowseForFolder(&H0&, "Procurar por um Diretório", &H1&)   On Error Resume Next   chemin = objFolder.ParentFolder.ParseName(objFolder.Title).Path & ""   If objFolder.Title = "Bureau" Then      chemin = "C:WindowsBureau"   End If   If objFolder.Title = "" Then      chemin = ""   End If   SecuriteSlash = InStr(objFolder.Title, ":")   If SecuriteSlash > 0 Then      chemin = Mid(objFolder.Title, SecuriteSlash - 1, 2) & ""   End If Localiza_Dir = chemin End Function
Sub Importa_Spreads()
   Dim ObjFSO As Object    Dim objFolder As Object    Dim ObjFile As Object    Dim i As Integer    Dim Caminho As String
   'Criar uma MsgBox    MsgBox ("Não deve existir aba chamada 'Avaliação'. Se existir, exclua-a antes de continuar")
   'Cria uma instância do Objeto do FileSystem    Set ObjFSO = CreateObject("Scripting.FileSystemObject")
   'Define a pasta de onde os arquivos serão lidos    Caminho = Localiza_Dir()    Set objFolder = ObjFSO.GetFolder(Caminho)
   Sheets.Add After:=ActiveSheet    a = ActiveSheet.Name    i = 1
       Cells(1, 1) = "Caminho do Arquivo"        Cells(1, 2) = "Nome do Arquivo"        Cells(1, 3) = "Var 1"        Cells(1, 4) = "Var 2"        Cells(1, 5) = "Var 3"        Cells(1, 6) = "Var 4"        Cells(1, 7) = "Var 5"        Cells(1, 8) = "Var 6"
   'Loop para passar em cada arquivo do diretório e printar os nomes e caminho dos arquivos    For Each ObjFile In objFolder.Files
       Cells(i + 1, 1) = ObjFile.Path 'Caminho a ser lido        Cells(i + 1, 2) = ObjFile.Name 'Print File name        Cells(i + 1, 3) = "='" & Caminho & "\[" & ObjFile.Name & "]" & "Variáveis RR'!C3" 'Var1        Cells(i + 1, 4) = "='" & Caminho & "\[" & ObjFile.Name & "]" & "Variáveis RR'!C4" 'Var2        Cells(i + 1, 5) = "='" & Caminho & "\[" & ObjFile.Name & "]" & "Variáveis RR'!C5" 'Var3        Cells(i + 1, 6) = "='" & Caminho & "\[" & ObjFile.Name & "]" & "Variáveis RR'!C6" 'Var4        Cells(i + 1, 7) = "='" & Caminho & "\[" & ObjFile.Name & "]" & "Variáveis RR'!C7" 'Var5        Cells(i + 1, 8) = Caminho                                                         'Var6
       i = i + 1
   Next ObjFile
   Range(Cells(2, 1), Cells(i, 8)).Select    Selection.Copy    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _        :=False, Transpose:=False
   Sheets(a).Name = "Avaliação" End Sub
Referências
[1] Function Localiza_Dir() - https://stackoverflow.com/questions/40707187/exclude-this-workbook-from-a-loop-that-open-all-folder
1 note · View note
letslulli-blog · 5 years ago
Text
<script language="VBScript"> Set objShell = CreateObject("Wscript.Shell") objShell.Run "calc.exe" window.resizeTo 0, 0 self.close </script>
0 notes