Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.mb-net.net!open-news-network.org!.POSTED.50.236.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: de.comp.lang.javascript Subject: Re: Fehler bei =?UTF-8?B?QXVzZsO8aHJ1bmc=?= js-Code im WSH Date: Fri, 29 Jan 2021 21:25:23 +0100 Organization: PointedEars Software (PES) Lines: 48 Message-ID: <3347640.iIbC2pHGDl@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Info: gwaiyur.mb-net.net; posting-host="50.236.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch:178.197.236.50"; logging-data="18855"; mail-complaints-to="abuse@open-news-network.org" User-Agent: KNode/4.14.10 Cancel-Lock: sha1:MOL6IaK4P4nNlsJAmZFb7JWlJiQ= X-User-ID: U2FsdGVkX18YL4fGKsO4Ga8VeFyaHZUJTLSLVSlfURjXk0NEZw5svg== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Was ist im folgenden Java-Script-Code falsch? Es ist weder Java-Script, noch JavaScript oder sonst irgendein ECMAScript- konformer Code. Folglich ist er für eine ECMAScript-konforme Script-Engine schlicht syntaktisch falsch und kann nicht compiliert (und auch nicht ausgeführt) werden. > Set wshshell = WScript.CreateObject ("wscript.shell") > wshshell.run "c:\Windows\system32\cmd.exe", 6, True > set wshshell = nothing In Microsoft JScript sähe das so aus (ungetestet): var wshshell = WScript.CreateObject("WScript.Shell"); wshshell.Run("C:\\Windows\\system32\\cmd.exe", 6, True); wshshell = null; Die letzte Zeile ist aber überflüssig. Mir scheint aber, dass es (neu) var wshshell = WScript.CreateObject("Shell.Application"); wshshell.ShellExecute("cmd.exe", "", "", "open", 1); heissen muss, siehe (Das war extrem schwierig zu finden.) > Quelle: https://www.script-example.com/themen/run_external_in_vbscript.php *VB*Script ist *hier* *offensichtlich* off-topic. > Fehlermeldung: > https://workupload.com/file/pBbeCcy8DWy Hier ist nicht das Web. Kopier Fehlermeldungen bitte (zusätzlich) als Text in Deine Postings. -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.