VBS'in herkeste çalışması için kullanıcı adı ne yapılmalı?

591016

Decapat
Katılım
12 Ekim 2022
Mesajlar
288
Çözümler
2
Hocalarım sizlere sorum var.
VBS'de program çalıştırmak için şöyle bir komut var.

StrProgramPath = """C:\Users\kullanıcıadı\Downloads\deneme.exe"""
Set objShell = createobject("Wscript. Shell")
ObjShell. Run strProgramPath

Buradaki kullanıcıadı yerine ne yazacağız her bilgisayarda çalışması için?
 
Son düzenleyen: Moderatör:
Bash:
Set oWS = WScript.CreateObject("WScript.Shell")
userprofile = oWS.ExpandEnvironmentStrings("%userprofile%")
Dim programPath : programPath = userprofile & "\Downloads\deneme.exe"
 
Bash:
Set oWS = WScript.CreateObject("WScript.Shell")
userprofile = oWS.ExpandEnvironmentStrings("%userprofile%")
Dim programPath : programPath = userprofile & "\Downloads\deneme.exe"
Deneyeceğim

Bash:
Set oWS = WScript.CreateObject("WScript.Shell")
userprofile = oWS.ExpandEnvironmentStrings("%userprofile%")
Dim programPath : programPath = userprofile & "\Downloads\deneme.exe"

%Username% yazınca çalışıyormuş.
 
Son düzenleme:

Technopat Haberler

Yeni konular

Geri
Yukarı